Difference between revisions of "DOMCurvePlayerExtended"
From Virtual World Web Wiki
(Documentation for the DOMCurvePlayerExtended class) |
(Documentation for the DOMCurvePlayerExtended class) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Represents a DOMCurvePlayer in JavaScript | + | Represents a [[DOMCurvePlayer]] in JavaScript |
*'''Inherits class: [[DOMObjectExtended]]''' | *'''Inherits class: [[DOMObjectExtended]]''' | ||
* This is a JavaScript visible object | * This is a JavaScript visible object | ||
===Remarks <nowiki>[</nowiki>[{{fullurl:DOMCurvePlayerExtended Remarks|action=edit}} edit]<nowiki>]</nowiki>=== | ===Remarks <nowiki>[</nowiki>[{{fullurl:DOMCurvePlayerExtended Remarks|action=edit}} edit]<nowiki>]</nowiki>=== | ||
− | {{:DOMCurvePlayerExtended Remarks}} | + | {{#ifexist:DOMCurvePlayerExtended Remarks|{{:DOMCurvePlayerExtended Remarks}}|}} |
===Properties=== | ===Properties=== | ||
+ | :{{CSharp|int FpsLimit {get; set;} // Via attribution on DOMCurvePlayer }} | ||
+ | :: | ||
+ | ::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(). | ||
+ | |||
:{{CSharp|long JumpKeyframeID {get; set;} // Via attribution on DOMCurvePlayer }} | :{{CSharp|long JumpKeyframeID {get; set;} // Via attribution on DOMCurvePlayer }} | ||
:: | :: | ||
Line 35: | Line 39: | ||
::The number of keyframe steps the curve player should run for before stopping (If Operation == Step) | ::The number of keyframe steps the curve player should run for before stopping (If Operation == Step) | ||
− | :{{CSharp| | + | :{{CSharp|float Time {get; set;} // Via attribution on DOMCurvePlayer }} |
:: | :: | ||
::Returns the curve player's current time index in seconds | ::Returns the curve player's current time index in seconds | ||
===Events=== | ===Events=== | ||
− | :{{CSharp|OnKeyframeCrossed( | + | :{{CSharp|OnKeyframeCrossed(DOMCurveKeyframeExtended keyframe)}} |
+ | ::Parameters: | ||
+ | :::{{CSharp|keyframe}} : The keyframe crossed by this player | ||
:: | :: | ||
::Fires when this keyframe is crossed by a player | ::Fires when this keyframe is crossed by a player | ||
Line 57: | Line 63: | ||
::Starts the player running by setting the Operation property to "Run" | ::Starts the player running by setting the Operation property to "Run" | ||
− | :{{CSharp|void Step(int count)}} | + | :{{CSharp|void Step(int count {{=}} 1)}} |
:: | :: | ||
::Increments the step count by ''count'' and sets the Operation property to "Step". The player will run until it consumes ''count' steps | ::Increments the step count by ''count'' and sets the Operation property to "Step". The player will run until it consumes ''count' steps |
Latest revision as of 12:57, 21 March 2018
Represents a DOMCurvePlayer in JavaScript
- Inherits class: DOMObjectExtended
- This is a JavaScript visible object
Remarks [edit]
Properties
- int FpsLimit {get; set;} // Via attribution on DOMCurvePlayer
- 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;} // Via attribution on DOMCurvePlayer
- The ID of the keyframe objet the curve player should snap to on it's next update (If Operation == JumpToKeyframe)
- bool Loop {get; set;} // Via attribution on DOMCurvePlayer
- Whether or not the curve player loops back around to the first keyframe after crossing the last one
- DOMCurveOperation Operation {get; set;} // Via attribution on DOMCurvePlayer
- Which operation the curve player is currently executing
- bool Reverse {get; set;} // Via attribution on DOMCurvePlayer
- True if the curve player is playing in reverse
- string Selector {get; set;} // Via attribution on DOMCurvePlayer
- The CSS-style selector used to identify the nodes which should be affected by the curve player
- DOMSelectorViewMode SelectorViewMode {get; set;} // Via attribution on DOMCurvePlayer
- The CSS-style selector used to identify the nodes which should be affected by the curve player
- int StepCount {get; set;} // Via attribution on DOMCurvePlayer
- The number of keyframe steps the curve player should run for before stopping (If Operation == Step)
- float Time {get; set;} // Via attribution on DOMCurvePlayer
- Returns the curve player's current time index in seconds
Events
- OnKeyframeCrossed(DOMCurveKeyframeExtended keyframe)
- Parameters:
- keyframe : The keyframe crossed by this player
- Fires when this keyframe is crossed by a player
- Parameters:
Methods
- void JumpToKeyframe(DOMCurveKeyframeExtended keyframe)
- Sets the time index of the player to that of the specified keyframe, fires the crossed events for the keyframe and player, and stops.
- void Reset()
- Stops the player from running and resets it to time index 0.0 by setting the Operation property to "Reset"
- void Run()
- Starts the player running by setting the Operation property to "Run"
- void Step(int count = 1)
- Increments the step count by count and sets the Operation property to "Step". The player will run until it consumes count' steps
- void Stop()
- Stops the player from running by setting the Operation property to "Stop"