DeepZoom allows you to add events to a trip and or route and trigger them at specific times. Events fall into five main categories.
example, displaying marinas at the end of each route:
https://www.deepzoom.com/trip/yzp5ybrk
When you hit the play button in DeepZoom, or alternatively when you drag the time slider, events associated with the trip are triggered.
Events are associated with one of three groups, corresponding to the before, during, and after tabs in the script dialog.
Events are attached to either a trip or to a route, depending on the trip / route toggle.
event type | before | during | after |
---|---|---|---|
trip | once | during trip | end of trip |
route | start of route | during route | end of route |
Before trip events affect the starting conditions for the trip, and are a good place to put layer selection, opacities, playback rate, and timebase settings. When you save a trip with "Include view settings" set to Yes, all of these settings are saved for you automatically.
During trip events are triggered when a specified portion of the trip is complete. This is a relative measurement (0-1). In general, it's better to use route during events instead of trip during events since these relative offsets are less likely to be affected by changes in the overall trip containing multiple routes.
After trip events are triggered each time the trip animation completes. Finally, the loopcount
variable is incremented, which can be used change properties on even/odd or every nth pass through the trip.
Before route events affect the starting conditions for the route.
During route events are triggered when a specified portion of the route is complete. This is a relative measurement (0-1). In general, it's better to use route during events instead of trip during events since these relative offsets are less likely to be affected by changes in the overall trip containing multiple routes.
After route events are triggered each time the route is completed.
The during event are a linear measurement of relative progress through either a trip or route, expressed as a value of 0 to 1.
Note that the "Δt" button in the script dialog let's you re-assign the relative position for all selected events after dragging the slider.
Follow this sequence when adding events:
Any event can include a conditional if clause. For example, to trigger an event only on even or odd passes, add the following "if" property to any event
"if": "loopCount % 2 == 0" // all even loops
or
"if": "loopCount % 2 == 1" // all odd loops
Multiple web pages or media can be added to the info page arranged in a stack. See the info infoUrl event for inspiration.