DOMCurveValue

From Virtual World Web Wiki
Jump to: navigation, search

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)