DOMCurve

From Virtual World Web Wiki
Jump to: navigation, search

Represents an animation of DOM properties over time. A Curve is made up of DOMCurveKeyframe child nodes with time indexes. Each keyframe can have multiple DOMCurveValue nodes which set the value of a property at that point in time. Then a DOMCurvePlayer node "plays" the curve, projecting its animated properties onto other DOM nodes in the scene that match the CSS Selector specified. The results of a curve's playing are not guarenteed to be perfectly synchronized, but many efforts are made to ensure all clients and the server are as close as possible. This is a powerful mechanism for low-cost, high-frequency animations of the DOM with almost no network traffic.

See also: Curves

Remarks [edit]

Constructors

DOMCurve()
Constructs a new DOMCurve with default settings
DOMCurve(DOMObject[] children)
Constructs a new DOMCurve, adding children at the same time
DOMCurve(string title, DOMObject[] children)
Constructs a new DOMCurve, setting a title and adding children at the same time

Methods

DOMCurve FromJson(string json)
loads a curve's keyframes and keyframe values from JSON
string ToJson()
Converts the current curve and its keyframes and keyframe values to JSON