Z.Object
Inherits from Z.Node
Description
A Z.Object node is an instance of a renderable 3D model.
Format Support
The following types are supported:
- ARO Simple (Zappar's simple proprietary format)
- POD
Animation
Most nodes, Z.Object included, have parameters that can be animated in timelines, states or events (e.g. position
).
In addition to these node parameters, POD-type objects can have animations built into the 3D model as exported from a 3D editor such as Maya or 3ds max. The animationFrame
parameter can be used to change which frame of a model's animation is displayed for a given object.
Materials
Each Z.Object is backed by an Z.ObjectType that represents a loaded ARO or POD object. The Z.ObjectType has an array of materials that are used during rendering.
Z.Object instances may override this array with materials that will be used rather than those present in the backing Z.ObjectType using the material
and materials
parameters.
Provided by Z.Object
Constructor
Z.Object( ) | Constructs a new Z.Object object. |
Events
intersection | Emitted every frame for each raycaster that the object is intersected by. |
intersectionenter | Emitted when the node is first intersected by a raycaster. |
intersectionleave | Emitted when the object is no longer being intersected by a raycaster that it had been previously. |
pointerdown | Emitted when a pointer is depressed and intersects with this object. |
pointerenter | Emitted when a depressed pointer intersects with this object. |
pointerleave | Emitted when a depressed pointer that has been intersecting this object leaves it. |
pointermove | Emitted for every depressed pointer that intersects this object when it moves. |
pointersmove | Emitted at most once per frame for this object. |
pointerup | Emitted when a depressed pointer that has been intersecting this object is released. |
triggerenter | Emitted when the origin point of the object first enters a TriggerRegion. |
triggerleave | Emitted when the origin point of the object leaves a TriggerRegion. |
triggermove | Emitted every frame the origin point of the object moves inside a TriggerRegion. |
Functions
animationFrame( ) | Gets the animation frame for this object. |
animationFrame(...) | Sets the animation frame for this object. |
layerMode( ) | Gets the layer mode of the node. |
layerMode(...) | Sets the layer mode of the node. |
material(...) | Retrieves this object's material from the specified slot. |
material(... , ...) | Sets a material to the specified slot. |
materials( ) | Get all of the materials for this object. |
materials(...) | Set all of the materials for this object. |
multitouch( ) | Gets whether the object has been set to multi-touch enabled. |
multitouch(...) | Sets whether the object should be multi-touch enabled. |
renderSorted( ) | Gets whether the object is to be sorted in depth and rendered along with other renderSorted objects. |
renderSorted(...) | Sets whether the object is to be sorted in depth and rendered along with other renderSorted objects. |
skin( ) | Gets the material in slot zero for this object. |
skin(...) | Sets the material in slot zero for this object. |
type( ) | Gets the Z.ObjectType for this object. |
type(...) | Sets the Z.ObjectType for this object. |
Interfaces
PointerEvent | A collection of information relating to pointer events. |
PointerPresentEvent | An extended collection of information relating to pointer events. |
Types
MultiplePointerPresentEvent | An array of PointerPresentEvents used to track multiple pointers on the screen at the same time. |
Inherited from Z.Node
Functions
blend( ) | Gets the type of blending used to render this object. |
blend(...) | Sets the type of blending used to render this object |
color( ) | Gets the color of the node. |
color(...) | Sets the color of the node. |
cullFaces( ) | Gets the type of culling to performed on this object. |
cullFaces(...) | Sets the type of culling to performed on this object. |
enabled( ) | Gets the value of enabled for the node. |
enabled(...) | Sets the value of enabled for the node. |
position( ) | Gets the position of the node. |
position(...) | Sets the position of the node |
relativeTo( ) | Gets an array of nodes that this node's location is relative to. |
relativeTo(...) | Sets the node(s) that this node's location is relative to. |
relativeToProp( ) | Gets the ratio of contributions that the nodes specified by relativeTo have on this node's location. |
relativeToProp(...) | Sets the ratio of contributions that the nodes specified by relativeTo have on this node's location. |
rotation( ) | Gets the rotation of the node. |
rotation(...) | Sets the rotation of the node. |
scale( ) | Gets the scale of the node. |
scale(...) | Sets the scale of the node. |
visible( ) | Gets the visibility of the node. |
visible(...) | Sets the visibility of this node. |
Inherited from Z.Base
Functions
emit(...) | Calls the handler functions attached to an event. |
hasTag(...) | Returns true if this object has the specified tag. |
off(...) | Removes a handler function from an event. |
on(...) | Attaches a handler function to an event. |
one(...) | Attaches a single-use handler function to an event. |
pushTag(...) | Adds a tag to this object. |
removeTag(...) | Removes a tag from this object. |
tags( ) | Gets an array of the tags that this object belongs to. |
tags(...) | Sets the array of the tags that this object belongs to. |