Layers methods
These methods are available for all layers. For layer-specific methods, refer to the layer documentation.
Get the start date of the animated sequence
Date: Start date
Get the end date of the animated sequence
Date: End date
Get the current time of the animated sequence
Date: Animation current time
Changes the global opacity of the layer
Changes the speed of the animation. 0 to stop. The speed is in number of real world milliseconds per animation second. Example: if timePerSecond is set to 10*1000, then the animation will run 10x of real world speed.
Emits: playAnimation is timePerSecond is greater than 0
Emits: pauseAnimation is timePerSecond is 0
Animate by a factor of real life speed. 0 to stop. Exampe, if factor is 10, then the animation will play at 10 times the real life speed.
Emits: playAnimation is factor greater than 0
Emits: pauseAnimation is factor is 0
Get the value(s) as an object. Depending on the type of layer, the values returned can be in different units. Please refer to the layer documetation
Object: the value(s) as an object.
Async function corresponding to the "sourceReady" event. Resolves directly if source is already ready, or awaits the event "sourceReady" if not.
Promise: Resolves directly if source is already ready, or awaits the event "sourceReady" if not.