Difference between revisions of "DOMCurveValue"

From Virtual World Web Wiki
Jump to: navigation, search
(Documentation for the DOMCurveValue class)
(Documentation for the DOMCurveValue class)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
Represents a property value at a [[DOMCurveKeyframe]] in a [[DOMCurve]]. The title of this node specifies the property which will have it's value animated. You must create a property on this object with the same name as this node's title, and of the appropriate data type.
 +
Values with the same titles at different keyframes should have the same data type. The Easing property specifies how the property value will interpolate over time.
 +
 
*'''Inherits class: [[DOMObject]]'''
 
*'''Inherits class: [[DOMObject]]'''
 
* 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:DOMCurveValue Remarks|action=edit}} edit]<nowiki>]</nowiki>===
 
===Remarks <nowiki>[</nowiki>[{{fullurl:DOMCurveValue Remarks|action=edit}} edit]<nowiki>]</nowiki>===
{{:DOMCurveValue Remarks}}
+
{{#ifexist:DOMCurveValue Remarks|{{:DOMCurveValue Remarks}}|}}
  
 
===Properties===
 
===Properties===
Line 10: Line 13:
  
 
:{{CSharp|DOMCurveKeyframe Keyframe {get;} }}
 
:{{CSharp|DOMCurveKeyframe Keyframe {get;} }}
 +
::
 +
::The [[DOMCurveKeyframe]] that this value belongs to
  
 
===Constructors===
 
===Constructors===
 
:{{CSharp|DOMCurveValue()}}
 
:{{CSharp|DOMCurveValue()}}
 +
::
 +
::Constructs a new DOMCurveValue with default settings
  
 
:{{CSharp|DOMCurveValue(string title)}}
 
:{{CSharp|DOMCurveValue(string title)}}
 +
::
 +
::Constructs a new DOMCurveKeyframe, adding children at the same time
  
 
:{{CSharp|DOMCurveValue(string title, object value)}}
 
:{{CSharp|DOMCurveValue(string title, object value)}}
 +
::
 +
::Constructs a new DOMCurveKeyframe, setting a title and adding children at the same time
  
 
===Methods===
 
===Methods===
Line 23: Line 34:
 
::Called on DOMObject derived types just before they are added to the DOM to ensure their parent is appropriate.
 
::Called on DOMObject derived types just before they are added to the DOM to ensure their parent is appropriate.
  
:{{CSharp|object GetInterpolatedValue(DOMCurveValue other, Single time)}}
+
:{{CSharp|object GetInterpolatedValue(DOMCurveValue other, float time)}}
 
::
 
::
 
::This method needs to be overridden in derived classes to support more interesting kinds of interpolation.
 
::This method needs to be overridden in derived classes to support more interesting kinds of interpolation.

Latest revision as of 21:02, 12 April 2017

Represents a property value at a DOMCurveKeyframe in a DOMCurve. The title of this node specifies the property which will have it's value animated. You must create a property on this object with the same name as this node's title, and of the appropriate data type. Values with the same titles at different keyframes should have the same data type. The Easing property specifies how the property value will interpolate over time.

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

Remarks [edit]

Properties

DOMCurveEasing Easing {get; set;}
Specifies which easing function to use
DOMCurveKeyframe Keyframe {get;}
The DOMCurveKeyframe that this value belongs to

Constructors

DOMCurveValue()
Constructs a new DOMCurveValue with default settings
DOMCurveValue(string title)
Constructs a new DOMCurveKeyframe, adding children at the same time
DOMCurveValue(string title, object value)
Constructs a new DOMCurveKeyframe, setting a title and adding children at the same time

Methods

bool CheckParent(DOMObject parent)
Called on DOMObject derived types just before they are added to the DOM to ensure their parent is appropriate.
object GetInterpolatedValue(DOMCurveValue other, float time)
This method needs to be overridden in derived classes to support more interesting kinds of interpolation.
Out of the box, we handle some primitive types and do a liner interpolation.
If a type isn't recognized we just return our own value resulting in a stepped, square-wave-like jump from
keyframe to keyframe (fine for something like a resource value)