Difference between revisions of "DOMCurvePlayer"

From Virtual World Web Wiki
Jump to: navigation, search
(Documentation for the DOMCurvePlayer class)
(Documentation for the DOMCurvePlayer class)
Line 6: Line 6:
 
* This is a leaf node type. This node type cannot have children.
 
* This is a leaf node type. This node type cannot have children.
 
===Remarks <nowiki>[</nowiki>[{{fullurl:DOMCurvePlayer Remarks|action=edit}} edit]<nowiki>]</nowiki>===
 
===Remarks <nowiki>[</nowiki>[{{fullurl:DOMCurvePlayer Remarks|action=edit}} edit]<nowiki>]</nowiki>===
{{:DOMCurvePlayer Remarks}}
+
{{#ifexist:DOMCurvePlayer Remarks|{{:DOMCurvePlayer Remarks}}|}}
  
 
===Properties===
 
===Properties===

Revision as of 21:02, 12 April 2017

While DOMCurve, DOMCurveKeyframe, and DOMCurveValue nodes define a curve and the properties it animates, the player represents the active animation. A player transitions along a curve, assuming the property values defined by the DOMCurveValue nodes at the DOMCurveKeyframes. Values will be interpolated smoothly between keyframes using interpolation functions specified by the value nodes. The animated property values assumed by the player are then "projected" onto other nodes in the DOM via a CSS-like selector.

  • Inherits class: DOMObject
  • This is a leaf node type. This node type cannot have children.

Remarks [edit]

Properties

DOMCurve Curve {get;}
The DOMCurve that this player will play
long JumpKeyframeID {get; set;}
The ID of the keyframe objet the curve player should snap to on it's next update (If Operation == JumpToKeyframe)
bool Loop {get; set;}
Whether or not the curve player loops back around to the first keyframe after crossing the last one
DOMCurveOperation Operation {get; set;}
Which operation the curve player is currently executing
bool Reverse {get; set;}
True if the curve player is playing in reverse
string Selector {get; set;}
The CSS-style selector used to identify the nodes which should be affected by the curve player
DOMSelectorViewMode SelectorViewMode {get; set;}
The CSS-style selector used to identify the nodes which should be affected by the curve player
int StepCount {get; set;}
The number of keyframe steps the curve player should run for before stopping (If Operation == Step)
float Time {get; set;}
Returns the curve player's current time index in seconds

Events

KeyframeCrossed(EventHandler<KeyframeCrossedEventArgs>)
Fires when a DOMCurveKeyframe is crossed by the player

Constructors

DOMCurvePlayer()
Constructs a new DOMCurvePlayer object
DOMCurvePlayer(string title)
Constructs a new DOMCurvePlayer object with the specified title

Methods

bool CheckParent(DOMObject parent)
Called on DOMObject derived types just before they are added to the DOM to ensure their parent is appropriate.
void Update()
Called by the infrastructure to run this curve player. Usually called once per keyframe or update cycle on the server.