App-level timeline related events. You'll only need to track these events if you want to add new types of timeline tracks & keyframes that can be created from raw data in Fragment instances.

Events

@:dox(show)createTrack(type:String, options:Dynamic<Dynamic>, result:Value<TimelineTrack<TimelineKeyframe>>):Void

Used to expand how timeline tracks are created from raw data (from Fragment instances). Respond to this event by assigning a value to the result argument.

Parameters:

type

Type of the field being modified by the track

options

Can be used to configure timeline track creation

result

The object that will hold the resulting track.

@:dox(show)bindTrack(type:String, options:Dynamic<Dynamic>, track:TimelineTrack<TimelineKeyframe>, entity:Entity, field:String):Void

Used to expand how timeline tracks are bound to objects.

Parameters:

type

Type of the field being modified by the track

options

Can be used to configure timeline track binding

track

The track on which we bind the entity

entity

The entity to bind to this track

field

The entity field that should be updated by this track

@:dox(show)createKeyframe(type:String, options:Dynamic<Dynamic>, value:Dynamic, index:Int, easing:Easing, existing:Null<TimelineKeyframe>, result:Value<TimelineKeyframe>):Void

Used to expand how timeline keyframes are created from raw data (from Fragment instances). Respond to this event by assigning a value to the result argument.

Parameters:

type

Type of the field being modified by the keyframe

options

Can be used to configure timeline keyframe creation

value

Value of the keyframe

time

Time (in seconds) of the keyframe

easing

Easing of the keyframe

existing

Existing keyframe instance at the same position/time. Can be reused to prevent new allocation of keyframe instance

result

The object that will hold the resulting keyframe.

Constructor

new()

Methods

emitCreateTrack(type:String, options:Dynamic<Dynamic>, result:Value<TimelineTrack<TimelineKeyframe>>):Void

Used to expand how timeline tracks are created from raw data (from Fragment instances). Respond to this event by assigning a value to the result argument.

Parameters:

type

Type of the field being modified by the track

options

Can be used to configure timeline track creation

result

The object that will hold the resulting track.

emitBindTrack(type:String, options:Dynamic<Dynamic>, track:TimelineTrack<TimelineKeyframe>, entity:Entity, field:String):Void

Used to expand how timeline tracks are bound to objects.

Parameters:

type

Type of the field being modified by the track

options

Can be used to configure timeline track binding

track

The track on which we bind the entity

entity

The entity to bind to this track

field

The entity field that should be updated by this track

emitCreateKeyframe(type:String, options:Dynamic<Dynamic>, value:Dynamic, index:Int, easing:Easing, existing:Null<TimelineKeyframe>, result:Value<TimelineKeyframe>):Void

Used to expand how timeline keyframes are created from raw data (from Fragment instances). Respond to this event by assigning a value to the result argument.

Parameters:

type

Type of the field being modified by the keyframe

options

Can be used to configure timeline keyframe creation

value

Value of the keyframe

time

Time (in seconds) of the keyframe

easing

Easing of the keyframe

existing

Existing keyframe instance at the same position/time. Can be reused to prevent new allocation of keyframe instance

result

The object that will hold the resulting keyframe.

Inherited Events

Defined by Entity

@:dox(show)dispose(entity:Entity):Void

@:dox(show)destroy(entity:Entity):Void

Inherited Variables

Defined by Entity

read onlyhasData:Bool

@:value(null)id:String = null

read onlydestroyed:Bool

read onlydisposed:Bool

@:value(null)read onlyautoruns:Array<Autorun> = null

@editablecomponents:ReadOnlyMap<String, Component>

Public components mapping. Contain components created separately with component() or macro-based components as well.

scriptContent:ScriptContent

Available with script plugin

script:Script

Available with script plugin

Inherited Methods

Defined by Entity

destroy():Void

Destroy this entity. This method is automatically protected from duplicate calls. That means calling multiple times an entity's destroy() method will run the destroy code only one time. As soon as destroy() is called, the entity is marked destroyed=true, even when calling destroy() method on a subclass (a macro is inserting a code to mark the object as destroyed at the beginning of every destroy() override function.

dispose():Void

Schedules destroy, at the end of the current frame.

unbindEvents():Void

Remove all events handlers from this entity.

autorun(run:() ‑> Void, ?afterRun:() ‑> Void):Autorun

Creates a new Autorun instance with the given callback associated with the current entity.

Parameters:

run

The run callback

Returns:

The autorun instance

tween(?easing:Easing, duration:Float, fromValue:Float, toValue:Float, update:(Float, Float) ‑> Void):Tween

component<C>(?name:String, ?component:Null<C>):C