This constructor alone will not create a reconstruction, but only save the id. To create an instance of the graph, call reset on this or set with a graph as parameter. Prefer Project.createGraphInstance(_graph).
Optional
_graph: GraphReadonly
appendSimply calls addChild. This reference is here solely because appendChild is the equivalent method in DOM. See and preferably use addChild
Readonly
mtxThe number of nodes of the whole branch including this node and all successors
The radius of the bounding sphere in world dimensions enclosing the geometry of this node and all successors in the branch
Static
countid of the resource that instance was created from
Shortcut to retrieve this nodes ComponentTransform
Shortcut to retrieve the local Matrix4x4 attached to this nodes ComponentTransform
Fails if no ComponentTransform is attached
Returns the number of children attached to this
Adds the given reference to a node to the list of children, if not already in
Error when trying to add an ancestor of this
Adds the given reference to a node to the list of children at the given index. If it is already a child, it is moved to the new position.
Attach the given component to this node
Adds an event listener to the node. The given handler will be called when a matching event is passed to the node. Deviating from the standard EventTarget, here the _handler must be a function and _capture is the only option.
Attach the given component to this node. Identical to addComponent
Recreates this instance of Serializable with the information from the given Serialization.
Detach the given component from this node. Identical to removeComponent
Dispatches a synthetic event to target. This implementation always returns true (standard: return true only if either event's cancelable attribute value is false or its preventDefault() method was not invoked) The event travels into the hierarchy to this node dispatching the event, invoking matching handlers of the nodes ancestors listening to the capture phase, than the matching handler of the target node in the target phase, and back out of the hierarchy in the bubbling phase, invoking appropriate handlers of the anvestors
Returns the position of the node in the list of children or -1 if not found
Returns true if this node is a descendant of the given node, directly or indirectly, else false
Removes the reference to the give node from the list of children
Removes the given component from the node, if it was attached, and sets its parent to null.
Removes an event listener from the node. The signature must match the one used with addEventListener
Recreate this node from the Graph referenced
Returns a Serialization of this object.
Creates a string as representation of this node and its descendants
Static
FINDStatic
PATH_
An instance of a Graph.
This node keeps a reference to its resource an can thus optimize serialization
Author
Jirka Dell'Oro-Friedl, HFU, 2019
Link
https://github.com/hs-furtwangen/FUDGE/wiki/Resource