Class: ObjectNode

xebra.js v1.2.5 - Documentation

ObjectNode

new ObjectNode(id, type, creationSeq, patcherId)

Constructor for internal use only

Representation of a Max object in the Xebra state tree. The nodeType property returns the type of the ObjectNode, which corresponds to the Max class of the object it represents. The getParamTypes function will return an array of the parameters supported by this object, which usually corresponds to the attributes of the Max object. To listen to parameter changes from Max, subscribe to the ObjectNode.event:param_changed event.

Name Type Description
id Xebra.NodeId

The id of the node

type string

Type identifier of the node

creationSeq number

The sequence number for the creation of this node

patcherId number

The id of the parent node

Extends

Members

creationSequence:number

The creation sequence number associated with this node. This number is an increasing integer unique to each node.

id:Xebra.NodeId

readonly

Unique id associated with each XebraNode.

patcherId:Xebra.NodeId

readonly

Unique id of the parent patcher of the Max object.

type:string

Type associated with this node. For Objects, Frames and Patchers, this will correspond to the class name of the Max object. For parameters, this will be the name of the associated parameter. Parameters usually correspond to the name of a Max object's attribute.

Methods

inherited getParamTypes():Array.<string>

Returns a list of the names of all available parameters.

Returns:
Type Description
Array.<string>

Returns the value for the parameter with the name type.

Name Type Description
type String

Parameter type identifier

Returns:
Type Description
Xebra.ParamValueType returns the value(s) of the given parameter type or null

inherited setParamValue(type, value)

Sets the value for the parameter with the name type to the given value.

Name Type Description
type String

Parameter type identifier

value Object

Parameter value

Events

ObjectNode.event:param_changed

Parameter Changed event. Listen to this event to be notified when the value of a parameter changes.

Name Type Description
object ObjectNode

This

param ParamNode

The parameter node

ObjectNode.event:param_set

Parameter set event. Used internally in order to communicate parameter changes to Max. Use param_changed instead if you'd like to keep track of parameter changes.

Name Type Description
object ObjectNode

This

param ParamNode

The parameter node