new TimelineDescriber()
Describer for a TA.Timeline actions
This is for convenience. It create TA.TimelineAction objects for ease of use
- Source:
Methods
delay(msecs) → {TA.TimelineAction}
Delays the next action
Parameters:
| Name | Type | Description |
|---|---|---|
msecs |
Integer | time in milliseconds |
- Source:
Returns:
- Type
- TA.TimelineAction
execute(func) → {TA.TimelineAction}
Executes a user defined function
this function gets the current TA.Timeline object as only parameter and needs to call tl.next() on it (otherwise the execution will halt)
Parameters:
| Name | Type | Description |
|---|---|---|
func |
function | a user defined function |
- Source:
Returns:
- Type
- TA.TimelineAction
executeIf(func, action) → {TA.TimelineAction}
Executes an event if a user defined function returns true
Parameters:
| Name | Type | Description |
|---|---|---|
func |
function | a user defined predicate |
action |
TA.TimelineAction | a TA.TimelineAction to execute of the predicate returns true |
- Source:
Returns:
- Type
- TA.TimelineAction
finish() → {TA.TimelineAction}
Stops the timeline and triggers the finish event
- Source:
Returns:
- Type
- TA.TimelineAction
jumpTo(label) → {TA.TimelineAction}
Jumps to a label (skipping all other steps)
Parameters:
| Name | Type | Description |
|---|---|---|
label |
String | label name |
- Source:
Returns:
- Type
- TA.TimelineAction
label(name) → {TA.TimelineAction}
Defines a label
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String | label name |
- Source:
Returns:
- Type
- TA.TimelineAction
loop() → {TA.TimelineAction}
Rewinds the timeline to the start and continues from there
- Source:
Returns:
- Type
- TA.TimelineAction
loopN() → {TA.TimelineAction}
Rewinds the timeline to the start and continues from there, but only times times
- Source:
Returns:
- Type
- TA.TimelineAction
playTimeline(name) → {TA.TimelineAction}
Plays a timeline
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String | name of timeline |
- Source:
Returns:
- Type
- TA.TimelineAction
playTimelineAsync(name) → {TA.TimelineAction}
Plays a timeline
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String | name of timeline |
- Source:
Returns:
- Type
- TA.TimelineAction
start(action) → {TA.TimelineAction}
Triggers a start event
Parameters:
| Name | Type | Description |
|---|---|---|
action |
String | event name |
- Source:
Returns:
- Type
- TA.TimelineAction
startAndWaitFor(action) → {TA.TimelineAction}
Triggers a start event and waits for it to complete
Parameters:
| Name | Type | Description |
|---|---|---|
action |
String | event name |
- Source:
Returns:
- Type
- TA.TimelineAction
step(steps) → {TA.TimelineAction}
Steps to another event in the timeline
Parameters:
| Name | Type | Description |
|---|---|---|
steps |
Integer | positive or negative amount of steps to take |
- Source:
Returns:
- Type
- TA.TimelineAction
stop() → {TA.TimelineAction}
Stops the timeline
- Source:
Returns:
- Type
- TA.TimelineAction
trigger(action) → {TA.TimelineAction}
Triggers an event
Parameters:
| Name | Type | Description |
|---|---|---|
action |
String | event name |
- Source:
Returns:
- Type
- TA.TimelineAction
waitFor(action) → {TA.TimelineAction}
Waits for an event to be triggered
Parameters:
| Name | Type | Description |
|---|---|---|
action |
String | event name |
- Source:
Returns:
- Type
- TA.TimelineAction