The amount of time to stay visible per blink in milliseconds
The amount of time to stay not visible per blink in milliseconds
The number of times to blink
This method allows you to call an arbitrary method as the next action in the action queue. This is useful if you want to execute code in after a specific action, i.e An actor arrives at a destination after traversing a path
This method will delay the next action from executing for a certain amount of time (in milliseconds). This method is part of the actor 'Action' fluent API allowing action chaining.
The amount of time to delay the next action in the queue from executing in milliseconds
This method will add an action to the queue that will remove the actor from the scene once it has completed its previous Any actions on the action queue after this action will not be executed.
This method will move an actor by a specified vector offset relative to the current position given a duration and a EasingFunction. This method is part of the actor 'Action' fluent API allowing action chaining.
Vector offset relative to the current position
The duration in milliseconds
Optional
easingFcn: Util.EasingFunctionUse EasingFunction or a custom function to use to calculate position, Default is EasingFunctions.Linear
This method will move an actor by a specified x and y offset relative to the current position given a duration and a EasingFunction. This method is part of the actor 'Action' fluent API allowing action chaining.
The duration in milliseconds
Optional
easingFcn: Util.EasingFunctionUse EasingFunction or a custom function to use to calculate position, Default is EasingFunctions.Linear
This method will move an actor to the specified x
and y
position over the
specified duration using a given EasingFunctions and return back the actor. This
method is part of the actor 'Action' fluent API allowing action chaining.
The x,y vector location to move the actor to
The time it should take the actor to move to the new location in milliseconds
Optional
easingFcn: Util.EasingFunctionUse EasingFunction or a custom function to use to calculate position, Default is EasingFunctions.Linear
This method will move an actor to the specified x
and y
position over the
specified duration using a given EasingFunctions and return back the actor. This
method is part of the actor 'Action' fluent API allowing action chaining.
The x location to move the actor to
The y location to move the actor to
The time it should take the actor to move to the new location in milliseconds
Optional
easingFcn: Util.EasingFunctionUse EasingFunction or a custom function to use to calculate position, Default is EasingFunctions.Linear
This method will cause an actor's opacity to change from its current value to the provided value by a specified time (in milliseconds). This method is part of the actor 'Action' fluent API allowing action chaining.
The ending opacity
The time it should take to fade the actor (in milliseconds)
This method will cause the entity to follow another at a specified distance
The entity to follow
Optional
followDistance: numberThe distance to maintain when following, if not specified the actor will follow at the current distance.
This method will cause the entity to move towards another until they collide "meet" at a specified speed.
The entity to meet
Optional
speed: numberThe speed in pixels per second to move, if not specified it will match the speed of the other actor
This method will move an actor by the specified x offset and y offset from its current position, at a certain speed. This method is part of the actor 'Action' fluent API allowing action chaining.
The speed in pixels per second the actor should move
This method will move an actor to the specified x and y position at the speed specified (in pixels per second) and return back the actor. This method is part of the actor 'Action' fluent API allowing action chaining.
The x,y vector location to move the actor to
The speed in pixels per second to move
This method will move an actor to the specified x and y position at the speed specified (in pixels per second) and return back the actor. This method is part of the actor 'Action' fluent API allowing action chaining.
The x location to move the actor to
The y location to move the actor to
The speed in pixels per second to move
This method will cause the actor to repeat all of the actions built in
the repeatBuilder
callback. If the number of repeats
is not specified it will repeat forever. This method is part of
the actor 'Action' fluent API allowing action chaining
// Move up in a zig-zag by repeated moveBy's
actor.actions.repeat(repeatCtx => {
repeatCtx.moveBy(10, 0, 10);
repeatCtx.moveBy(0, 10, 10);
}, 5);
The builder to specify the repeatable list of actions
Optional
times: numberThe number of times to repeat all the previous actions in the action queue. If nothing is specified the actions will repeat forever
This method will cause the actor to repeat all of the actions built in
the repeatBuilder
callback. If the number of repeats
is not specified it will repeat forever. This method is part of
the actor 'Action' fluent API allowing action chaining
// Move up in a zig-zag by repeated moveBy's
actor.actions.repeat(repeatCtx => {
repeatCtx.moveBy(10, 0, 10);
repeatCtx.moveBy(0, 10, 10);
}, 5);
The builder to specify the repeatable list of actions
This method will rotate an actor by the specified angle offset, from it's current rotation given a certain speed in radians/sec and return back the actor. This method is part of the actor 'Action' fluent API allowing action chaining.
The angle to rotate to in radians relative to the current rotation
The speed in radians/sec the actor should rotate at
Optional
rotationType: RotationTypeThe RotationType to use for this rotation, default is shortest path
This method will rotate an actor to the specified angle at the speed specified (in radians per second) and return back the actor. This method is part of the actor 'Action' fluent API allowing action chaining.
The angle to rotate to in radians
The angular velocity of the rotation specified in radians per second
Optional
rotationType: RotationTypeThe RotationType to use for this rotation
This method will scale an actor by an amount relative to the current scale at a certain speed in scale units/sec and return back the actor. This method is part of the actor 'Action' fluent API allowing action chaining.
The scaling factor to apply to the actor
The speed to scale at in scale units/sec
This method will scale an actor by an amount relative to the current scale at a certain speed in scale units/sec and return back the actor. This method is part of the actor 'Action' fluent API allowing action chaining.
The scaling factor to apply on X axis
The scaling factor to apply on Y axis
The speed to scale at in scale units/sec
This method will scale an actor to the specified size at the speed specified (in magnitude increase per second) and return back the actor. This method is part of the actor 'Action' fluent API allowing action chaining.
This method will scale an actor to the specified size at the speed specified (in magnitude increase per second) and return back the actor. This method is part of the actor 'Action' fluent API allowing action chaining.
The scaling factor to apply on X axis
The scaling factor to apply on Y axis
The speed of scaling specified in magnitude increase per second on X axis
The speed of scaling specified in magnitude increase per second on Y axis
This method will cause an actor to blink (become visible and not visible). Optionally, you may specify the number of blinks. Specify the amount of time the actor should be visible per blink, and the amount of time not visible. This method is part of the actor 'Action' fluent API allowing action chaining.