Fudge Core
    Preparing search index...

    Class GraphGLTF

    A Graph loaded from a glTF-File.

    Jonas Plotzky, HFU, 2024

    Hierarchy

    Index

    Constructors

    Properties

    appendChild: (_child: Node) => void = ...

    Simply calls addChild. This reference is here solely because appendChild is the equivalent method in DOM. See and preferably use addChild

    idResource: string
    isSerializableResource: true
    mtxWorld: Matrix4x4 = ...
    name: string
    nNodesInBranch: number = 0

    The number of nodes of the whole branch including this node and all successors

    radius: number = 0

    The radius of the bounding sphere in world dimensions enclosing the geometry of this node and all successors in the branch

    timestampUpdate: number = 0
    type: string
    url: RequestInfo

    Accessors

    • get nChildren(): number

      Returns the number of children attached to this

      Returns number

    Methods

    • Returns an iterator over this node and all its descendants in the graph below

      Returns IterableIterator<Node>

    • De- / Activate this node. Inactive nodes will not be processed by the renderer.

      Parameters

      • _on: boolean

      Returns void

    • Adds the given reference to a node to the list of children, if not already in

      Parameters

      Returns void

      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.

      Parameters

      • _child: Node
      • _index: number

      Returns void

    • 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.

      Parameters

      Returns void

    • Applies a Mutator from Animation to all its components and transfers it to its children.

      Parameters

      Returns void

    • Broadcasts a synthetic event to this node and from there to all nodes deeper in the hierarchy, invoking matching handlers of the nodes listening to the capture phase. Watch performance when there are many nodes involved

      Parameters

      • _event: Event

      Returns void

    • 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

      Parameters

      • _event: Event

      Returns boolean

    • Dispatches a synthetic event to target without travelling through the graph hierarchy neither during capture nor bubbling phase

      Parameters

      • _event: Event

      Returns boolean

    • Returns the position of the node in the list of children or -1 if not found

      Parameters

      Returns number

    • Returns a list of all components attached to this node, independent of type.

      Returns Component[]

    • Traces back the ancestors of this node and returns the first.

      Returns Node

    • Returns child at the given index in the list of children

      Parameters

      • _index: number

      Returns Node

    • Returns the first child with the supplied name.

      Parameters

      • _name: string

      Returns Node

    • Returns the readonly list of children. Create a copy to modify it.

      Returns readonly Node[]

    • Returns an array of references to childnodes with the supplied name.

      Parameters

      • _name: string

      Returns Node[]

    • Returns the first compontent found of the given class attached this node or null, if list is empty or doesn't exist

      Type Parameters

      Parameters

      • _class: new () => T

      Returns T

    • Returns the list of components of the given class attached to this node. If no components of this type are attached, an empty array is returned.

      Type Parameters

      Parameters

      • _class: new () => T

      Returns readonly T[]

      A readonly array of components.

    • Returns the first descendant with the supplied name. Depth first search.

      Parameters

      • _name: string

      Returns Node

    • Generator yielding the node and all decendants in the graph below for iteration Inactive nodes and their descendants can be filtered

      Parameters

      • _active: boolean = false

      Returns IterableIterator<Node>

    • Traces the hierarchy upwards to the root and returns the path from the root to this node.

      Parameters

      • _out: Node[] = []
      • _offset: number = 0

      Returns Node[]

    • Returns true if this node is a descendant of the given node, directly or indirectly, else false

      Parameters

      Returns boolean

    • Returns true if the given timestamp matches the last update timestamp this node underwent, else false

      Parameters

      • _timestampUpdate: number

      Returns boolean

    • Removes all references in the list of children

      Returns void

    • Removes the reference to the give node from the list of children

      Parameters

      Returns void

    • Removes the given component from the node, if it was attached, and sets its parent to null.

      Parameters

      Returns void

    • Removes all components of the given class attached to this node.

      Parameters

      Returns void

    • Removes an event listener from the node. The signature must match the one used with addEventListener

      Parameters

      Returns void

    • Replaces a child node with another, preserving the position in the list of children

      Parameters

      Returns boolean

    • Creates a string as representation of this node and its descendants

      Parameters

      • _node: Node = null
      • _level: number = 0

      Returns string

    • Returns a string representation of an object.

      Returns string

    • Called by the render system during Render.draw. Override this to provide the render system with additional render data.

      Parameters

      Returns void

    • Return the mutator-like path string to get from one node to another or null if no path is found e.g.:

      "node/parent/children/1/components/ComponentSkeleton/0"
      

      Parameters

      Returns string