Skip to content
Armen edited this page Jun 2, 2012 · 1 revision

extends a2d.Collection, a2d.Events

Defined in node.js

Summary

a2d.Node()
Base node.

Method Summary

**[draw](#draw)** Draws this node and its children
**[findNodeAt](#findNodeAt)** (position) Find node at given position
### Property Summary
*a2d.Rectangle* **[boundingBox](#boundingBox)** bounding box of this node, if applicable.
_boolean_ **[hover](#hover)** True if mouse is currently over this node(and mouse tracking is enabled for this node)
_string_ **[name](#name)** The name of this node.
*a2d.Vector* **[scale](#scale)** Scale.
_boolean_ **[visible](#visible)** Node will not be displayed when this is set to false.
#### Methods inherited from a2d.Events: addEventListener, emit, fireEvent, hasEvent, on, removeEventListener #### Methods inherited from a2d.Collection: append, indexOf, pop, push, remove, shift, unshift

Detail

a2d.Node()
Base node. Anything that is displayed inherits from this.


Method Detail

draw
Draws this node and its children

-- findNodeAt (position)
Find node at given position

Parameters:

{a2d.Position} position

Returns:

node if found, null if not


Property Detail

{a2d.Rectangle} boundingBox
bounding box of this node, if applicable. Nodes that display things and want to handle mouse events should take care of setting this.

-- {boolean} hover
True if mouse is currently over this node(and mouse tracking is enabled for this node)

-- {string} name
The name of this node.

Default Value:

"SceneNode"

-- {a2d.Vector} scale
Scale.

Default Value:

(1, 1)

-- {boolean} visible
Node will not be displayed when this is set to false.

Default Value:

true


Clone this wiki locally