animation

Module(s): vncanvas-base, vncanvas-cmds
Description: Defines a set (or array) of custom reusable animation that can be used for scenes, overlays or actors.

  • Note: Makes use of standard TransEffects and/or plug-ins.
  • Caution should be observed when using TransEffects that may not be supported by the target object. For example, using 'translate' on an 'auto' positioned actor does not work.
  • Technically, a 'nowait' parameter for the effect is allowed, but may not produce the desired results. This is because a 'nowait' immediately executes the next script line after the current line. For example, a previous 'nowait' effect will be overriden by the next effect.
animation, ["id", duration_effect_pairs]
The first parameter gives the id of the animation set. When naming animations, make sure it's not the same as any standard or plugin TransEffects.
The succeeding parameters specify duration and effect pairs. The 'effect' is as if you'd enter it on the effect parameter of the target object.
An animation set named 'sample' is created and applied to scene and overlay elements.
chapter = [
	...
	/* this creates a 1-second dissolve,
	followed by a 0.5-second translate,
	and lastly by a 2-second rotate */
	animation, ["sample",
		1,   "dissolve",
		0.5, "translate 0 100",
		2,   "rotate 180"
	],
	scene, {src:"scene.jpg", effect:"sample"},
	overlay, {src:"overlay.jpg", effect:"sample"},
	...
	
	...
	/* the above is equivalent to the following */
	scene, {src:"scene.jpg", effect:"dissolve", time:1},
	scene, {effect:"translate 0 100", time:0.5},
	scene, {effect:"rotate 180", time:2},
	overlay, {src:"overlay.jpg", effect:"dissolve", time:1},
	overlay, {effect:"translate 0 100", time:0.5},
	overlay, {effect:"rotate 180", time:2},
	...
]