DOMCurvePlayer

From Virtual World Web Wiki
Jump to: navigation, search

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
int FpsLimit {get; set;}
Sets the target number of updates per second that the curve player should try to acheive. The default is 60FPS. Setting this to 0 will remove FpsLimiting, and update every frame. This update rate is not guarenteed, since it also depends on how often the DOM host calls Document.RunCurvePlayers().
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.