WanimScene
Defined in: wanimscene.ts:9
The base class for wanim animations. The run method essentially defines a script which the scene then performs.
Constructors
Constructor
new WanimScene():
WanimScene
Returns
WanimScene
Properties
container
container:
null|SVGElement=null
Defined in: wanimscene.ts:19
The DOM SVG container. This can be expected to be populated by the time the scene runs.
objects
objects:
WObject<SVGElement>[] =[]
Defined in: wanimscene.ts:13
The objects contained in the scene.
tweenLikes
tweenLikes:
WTweenLike[] =[]
Defined in: wanimscene.ts:14
Accessors
background
Set Signature
set background(
color):void
Defined in: wanimscene.ts:23
Parameters
color
ColorLike
Returns
void
Methods
add()
add<
T>(wobject):T
Defined in: wanimscene.ts:46
Adds an object to the scene.
Type Parameters
T
T extends WObject<SVGElement>
Parameters
wobject
T
Returns
T
play()
play(
tween):WTweenLike
Defined in: wanimscene.ts:36
Parameters
tween
Returns
run()
abstractrun():void|Promise<void>
Defined in: wanimscene.ts:28
Returns
void | Promise<void>
update()
update(
delta):void
Defined in: wanimscene.ts:30
Parameters
delta
number
Returns
void