Namespace NodeGraph.animator

Extends: SC.Object
Defined in: frameworks/nodegraph/controllers/animator.js
Version: 1.0
Author: Peter Bergstrom
Copyright: 2008-2009 Peter Bergström.

Overview

NodeGraph.animator

This is the NodeGraph animation engine. This runs every 40 milliseconds.

Property Summary

Method Summary

Property Details

_queue [R/W]

The queue of animation subjects.

-   Array _queue


_svgMain [R/W]

A reference to a view's main SVG element.

-   DOM Element _svgMain

Discussion

Used to "snap" the element to prevent rendering/display bugs.


_svgMainHeight [R/W]

The height of the svg element passed in.

-   Integer _svgMainHeight


Method Detail

addSubject()

Add a subject to the queue.

-   (void) addSubject (elm, props, duration, isSVG)

Parameters

(DOM Element)elm The subject to be animated.

props {Object} The properties that are to be animated.

duration {Integer} The duration in milliseconds of the element.

isSVG {boolean} Determines if it is an SVG element or not.


addSubjects()

Add an array of subjects to be animated.

-   (void) addSubjects (arr, svgMain, svgMainHeight)

Parameters

arr {Array} The array of animation subjects.

(DOM Element)svgMain A reference to a view's main SVG element. Used to "snap" the element to prevent rendering/display bugs.

svgMainHeight {Integer} The height of the svg element passed in.

Discussion

Removes all the previous elements and starts the timer if is has been stopped.


runAnimation()

Runs the animation one frame, this is called by the SC Timer object.

-   (Boolean) runAnimation ()

Returns

(Boolean) Returns NO if the queue is null.


Documentation generated by JsDoc Toolkit 2.0.2 on Mon Nov 23 2009 23:08:02 GMT-0800 (PST)