A task is a function executed at the beginning of addAnimations,
before selector and properties information is processed,
and has the following goals:
Setup: A setup allows to prepare elements for further processing.
An example is text splitting. text splitting prepares DOM for individual
character manipulation.
Setup tasks can stop the processing of a addAnimations, and might not
require a selector..
Wrapping: Only addAnimations can be stored in a JSON file or sent
for remote rendering. In this case, methods such as addStills and scene transitions
need to be wrapped in a task.
Wrapping tasks can stop the processing of a addAnimations, and might not
require a selector.
Asset creation: A task can create an asset avoiding the need of loading external
assets such as svg shape files.
Complex animations: A task can simplify the creation of a complex animation.
F/X
If you just want to do a single-shot animation, use scene.addAnimations,
but if you want to reuse the animation or want to break down the complexity
into multiple parts, the best is to create a task.
A task implementation is a function with the following syntax:
Description
A task is a function executed at the beginning of
addAnimations, before selector and properties information is processed, and has the following goals:Setup: A setup allows to prepare elements for further processing. An example is text splitting. text splitting prepares DOM for individual character manipulation. Setup tasks can stop the processing of a
addAnimations, and might not require a selector..Wrapping: Only
addAnimationscan be stored in a JSON file or sent for remote rendering. In this case, methods such asaddStillsand scene transitions need to be wrapped in a task. Wrapping tasks can stop the processing of aaddAnimations, and might not require a selector.Asset creation: A task can create an asset avoiding the need of loading external assets such as svg shape files.
Complex animations: A task can simplify the creation of a complex animation.
F/X
If you just want to do a single-shot animation, use
scene.addAnimations, but if you want to reuse the animation or want to break down the complexity into multiple parts, the best is to create a task.A task implementation is a function with the following syntax:
And add this task to BeamToIX using
BeamToIX.pluginManager.addTasks([['my-task', myTaskFunc]]);.If the task just uses plain DOM, the simplest is to:
selector, and then