Detailed Description

Handles operating PowerSlide timelines.

A loaded slides file. They contain one or more tracks (usually just one). A track (e.g a style track or a dialogue track) is a series of slides.

Public Member Functions

List< T > GetActive< T > ()
 Gets all active slides of the given type. More...
 
bool IsActive (Slide s)
 True if the given slide is currently running. More...
 
void Start ()
 Starts this instance. More...
 
void Enqueue ()
 Adds this instance to the update queue. More...
 
void Update (float deltaTime)
 Advances this instance by the given amount. More...
 
void Cue ()
 Cues this timeline (unpauses it). More...
 
void SetPause (bool value)
 Changes the paused state of this animation. More...
 
void SetTimingFunction (Css.Value timingFunc)
 Sets a time curve which progresses the overall slides animation. Almost always linear but change it for advanced effects. More...
 
void Dispatch (string name)
 Dispatches an event of the given name. More...
 
void dispatchEvent (Dom.Event e)
 Dispatch an event. More...
 
void Stop (bool fireEvent)
 Stops this instance, optionally firing an event. More...
 
 Timeline (ComputedStyle style)
 
Slide getSlide (int uniqueID)
 Gets a slide by its unique ID. More...
 
void ClearCues ()
 Tidies up any event handlers added by cue nodes. More...
 
void load (Json.JSObject json)
 Loads a timeline from the given JSON. More...
 
Track getTrackByTagName (string name)
 Gets the first track by the name of the track. "style" or "dialogue" for example. More...
 
List< TrackgetTracksByTagName (string name)
 Gets all tracks by the name of the track. "style" or "dialogue" for example. More...
 
void getTracksByTagName (string name, List< Track > results)
 Gets all tracks by the name of the track. "style" or "dialogue" for example. Adds the results to the given set. More...
 

Static Public Member Functions

static Timeline Get (ComputedStyle style)
 Gets the current instance for the given element (null if none found). More...
 
static Timeline Get (Windows.Window window)
 Gets the current instance for the given window (null if none found). More...
 
static void Clear ()
 Removes all active slides. More...
 
static void UpdateAll ()
 Called at the UI update rate to progress the currently running slides. More...
 

Public Attributes

float AppliedDuration =float.MinValue
 The duration of the whole thing. Overrides timeline.duration, if it has one. More...
 
float ActualDuration
 The "actual" duration - the one which considers timeline too. More...
 
float CurrentTime
 The current time in seconds that has passed since it started. More...
 
Blaze.CurveSampler ProgressSampler
 The sampler used when progressing. More...
 
Timeline After
 Current instances are stored in a linked list. This is the next one in the list. More...
 
Timeline Before
 Current instances are stored in a linked list. This is the one before this in the list. More...
 
float Delay
 The delay before this plays, in s. More...
 
bool Backwards
 Currently running backwards? More...
 
int RepeatCount =1
 The amount this should repeat. More...
 
KeyframesAnimationDirection Direction =KeyframesAnimationDirection.Forward
 The direction to run. More...
 
bool Started
 Started yet? More...
 
bool Paused
 Is it paused? More...
 
string defaultLanguage ="en"
 The default language for this timeline. More...
 
Css.Value duration
 An optional declared duration. Overriden by the slides-duration value. If not declared at all then it defaults to 1. More...
 
Track[] tracks
 All the tracks in this timeline. More...
 
string src
 Source URL. More...
 
string template
 Default template to use. More...
 
Slide timingLeader
 A time leading slide (usually one with audio/ video) which this timeline will follow for timing purposes. More...
 
ComputedStyle Style
 The ComputedStyle that this was applied to (can be null). More...
 
Windows.Window currentWindow
 If this timeline is using a window, the window itself. Used by dialogue. More...
 
HtmlDocument document
 Host HTML document. More...
 

Static Public Attributes

static Timeline First
 The linked list of active timelines. More...
 
static Timeline Last
 The linked list of active timelines. More...
 

Package Functions

void EndDoneSlides ()
 
Windows.Window OpenWindow (string template)
 Opens a window, passing this timeline as a global. More...
 

Static Package Functions

static void LoadFailed (string message, Timeline timeline)
 Called when a timeline fails to load. More...
 

Package Attributes

Slide FirstRunning
 The first currently running slide (from any track). More...
 
Slide LastRunning
 The last currently running slide (from any track). More...
 
bool isDialogue =false
 True if this is a dialogue timeline. More...
 
List< CueElementDataCueElements
 A list of event listeners that must be destroyed when either this timeline is killed or is un-paused. More...
 

Properties

Dom.Node node [get]
 The node that this timeline is on. More...
 
float maxDefinedDuration [get]
 The maximum defined duration. More...
 

Private Member Functions

void CompletedCycle ()
 Called when a cycle is completed. More...
 

Private Attributes

bool Enqueued
 True if this instance is in the update queue. More...
 

Static Private Attributes

static OnUpdateCallback Updater
 Used to periodically call UpdateAll. Similar to a UITimer but instead this runs on the Unity main thread and it's syncable with redraws. More...
 

Constructor & Destructor Documentation

PowerSlide.Timeline.Timeline ( ComputedStyle  style)
inline

Member Function Documentation

static void PowerSlide.Timeline.Clear ( )
inlinestatic

Removes all active slides.

void PowerSlide.Timeline.ClearCues ( )
inline

Tidies up any event handlers added by cue nodes.

void PowerSlide.Timeline.CompletedCycle ( )
inlineprivate

Called when a cycle is completed.

void PowerSlide.Timeline.Cue ( )
inline

Cues this timeline (unpauses it).

void PowerSlide.Timeline.Dispatch ( string  name)
inline

Dispatches an event of the given name.

void PowerSlide.Timeline.dispatchEvent ( Dom.Event  e)
inline

Dispatch an event.

void PowerSlide.Timeline.EndDoneSlides ( )
inlinepackage
void PowerSlide.Timeline.Enqueue ( )
inline

Adds this instance to the update queue.

static Timeline PowerSlide.Timeline.Get ( ComputedStyle  style)
inlinestatic

Gets the current instance for the given element (null if none found).

static Timeline PowerSlide.Timeline.Get ( Windows.Window  window)
inlinestatic

Gets the current instance for the given window (null if none found).

List<T> PowerSlide.Timeline.GetActive< T > ( )
inline

Gets all active slides of the given type.

Type Constraints
T :Slide 
Slide PowerSlide.Timeline.getSlide ( int  uniqueID)
inline

Gets a slide by its unique ID.

Track PowerSlide.Timeline.getTrackByTagName ( string  name)
inline

Gets the first track by the name of the track. "style" or "dialogue" for example.

List<Track> PowerSlide.Timeline.getTracksByTagName ( string  name)
inline

Gets all tracks by the name of the track. "style" or "dialogue" for example.

void PowerSlide.Timeline.getTracksByTagName ( string  name,
List< Track results 
)
inline

Gets all tracks by the name of the track. "style" or "dialogue" for example. Adds the results to the given set.

bool PowerSlide.Timeline.IsActive ( Slide  s)
inline

True if the given slide is currently running.

void PowerSlide.Timeline.load ( Json.JSObject  json)
inline

Loads a timeline from the given JSON.

static void PowerSlide.Timeline.LoadFailed ( string  message,
Timeline  timeline 
)
inlinestaticpackage

Called when a timeline fails to load.

Windows.Window PowerSlide.Timeline.OpenWindow ( string  template)
inlinepackage

Opens a window, passing this timeline as a global.

void PowerSlide.Timeline.SetPause ( bool  value)
inline

Changes the paused state of this animation.

void PowerSlide.Timeline.SetTimingFunction ( Css.Value  timingFunc)
inline

Sets a time curve which progresses the overall slides animation. Almost always linear but change it for advanced effects.

void PowerSlide.Timeline.Start ( )
inline

Starts this instance.

void PowerSlide.Timeline.Stop ( bool  fireEvent)
inline

Stops this instance, optionally firing an event.

void PowerSlide.Timeline.Update ( float  deltaTime)
inline

Advances this instance by the given amount.

static void PowerSlide.Timeline.UpdateAll ( )
inlinestatic

Called at the UI update rate to progress the currently running slides.

Member Data Documentation

float PowerSlide.Timeline.ActualDuration

The "actual" duration - the one which considers timeline too.

Timeline PowerSlide.Timeline.After

Current instances are stored in a linked list. This is the next one in the list.

float PowerSlide.Timeline.AppliedDuration =float.MinValue

The duration of the whole thing. Overrides timeline.duration, if it has one.

bool PowerSlide.Timeline.Backwards

Currently running backwards?

Timeline PowerSlide.Timeline.Before

Current instances are stored in a linked list. This is the one before this in the list.

List<CueElementData> PowerSlide.Timeline.CueElements
package

A list of event listeners that must be destroyed when either this timeline is killed or is un-paused.

float PowerSlide.Timeline.CurrentTime

The current time in seconds that has passed since it started.

Windows.Window PowerSlide.Timeline.currentWindow

If this timeline is using a window, the window itself. Used by dialogue.

string PowerSlide.Timeline.defaultLanguage ="en"

The default language for this timeline.

float PowerSlide.Timeline.Delay

The delay before this plays, in s.

KeyframesAnimationDirection PowerSlide.Timeline.Direction =KeyframesAnimationDirection.Forward

The direction to run.

HtmlDocument PowerSlide.Timeline.document

Host HTML document.

Css.Value PowerSlide.Timeline.duration

An optional declared duration. Overriden by the slides-duration value. If not declared at all then it defaults to 1.

bool PowerSlide.Timeline.Enqueued
private

True if this instance is in the update queue.

Timeline PowerSlide.Timeline.First
static

The linked list of active timelines.

Slide PowerSlide.Timeline.FirstRunning
package

The first currently running slide (from any track).

bool PowerSlide.Timeline.isDialogue =false
package

True if this is a dialogue timeline.

Timeline PowerSlide.Timeline.Last
static

The linked list of active timelines.

Slide PowerSlide.Timeline.LastRunning
package

The last currently running slide (from any track).

bool PowerSlide.Timeline.Paused

Is it paused?

Blaze.CurveSampler PowerSlide.Timeline.ProgressSampler

The sampler used when progressing.

int PowerSlide.Timeline.RepeatCount =1

The amount this should repeat.

string PowerSlide.Timeline.src

Source URL.

bool PowerSlide.Timeline.Started

Started yet?

ComputedStyle PowerSlide.Timeline.Style

The ComputedStyle that this was applied to (can be null).

string PowerSlide.Timeline.template

Default template to use.

Slide PowerSlide.Timeline.timingLeader

A time leading slide (usually one with audio/ video) which this timeline will follow for timing purposes.

Track [] PowerSlide.Timeline.tracks

All the tracks in this timeline.

OnUpdateCallback PowerSlide.Timeline.Updater
staticprivate

Used to periodically call UpdateAll. Similar to a UITimer but instead this runs on the Unity main thread and it's syncable with redraws.

Property Documentation

float PowerSlide.Timeline.maxDefinedDuration
get

The maximum defined duration.

Dom.Node PowerSlide.Timeline.node
get

The node that this timeline is on.