Create 05-time-methods.md
This commit is contained in:
parent
6f2b3b9cc2
commit
6f56aa05ad
14
docs/reference/05-time-methods.md
Normal file
14
docs/reference/05-time-methods.md
Normal file
@ -0,0 +1,14 @@
|
||||
### Time Methods
|
||||
|
||||
Method | Options | Returns | Description |
|
||||
---|---|---|---|
|
||||
`setStep(step)` | `time numeric` | `this` | the value must be between 0 and the total number of `steps` in the animation
|
||||
`play()` | | `this` | starts the animation
|
||||
`stop()` | | `this` | stops the animation and set time to step 0
|
||||
`pause()` | | `this` | stops the animation but keep the current time (play enables the animation again)
|
||||
`toggle()` | | `this` | toggles (pause/play) the animation
|
||||
`getStep()` | | current animation step (integer) | gets the current animation step. A step is considered an animation frame
|
||||
`getTime()` | | current animation time (Date) | gets the real animation time
|
||||
`isRunning()` | | `true`/`false` | describes whether the Torque layer is playing or is stopped
|
||||
|
||||
**Note:** Torque.js interprets the beginning and ending date/time from your "Time Column" as one block, then divides that up into [Steps](https://carto.com/docs/carto-engine/cartocss/properties-for-torque/#torque-frame-count-number), depending on the number you set. It does not necessarily draw one frame for each row.
|
Loading…
Reference in New Issue
Block a user