Options
All
  • Public
  • Public/Protected
  • All
Menu

Node in the Scenegraph that groups nodes further down the hierarchy.

Hierarchy

  • GroupNode

Implements

Index

Constructors

constructor

  • Parameters

    • Default value transform: Matrix4 = Matrix4.Identity()

    Returns GroupNode

Properties

animations

animations: string[]

The animations attached to this node.

children

children: INode[]

Nodes directly after the GroupNode.

transform

transform: Matrix4

The initial transformation of the node without animations.

Accessors

transformation

  • get transformation(): Matrix4
  • set transformation(transform: Matrix4): void
  • Gets all transformations combined. The initial transformation multiplied with the animations in the order they are attached.

    Returns Matrix4

  • Sets the initial transformation without animations.

    Parameters

    Returns void

Methods

accept

  • Implementation of the accept part of the visitor pattern.

    Parameters

    • visitor: IVisitor

      Renderer to traverse the scenegraph.

    Returns void

addAnimation

  • addAnimation(animation: string): INode
  • Attaches a new animation to this node.

    Parameters

    • animation: string

      Key of the animation to attach.

    Returns INode

addChild

  • Adds a child to the Node and returns the child so chaining off adding is possible. Example:

    const root = new RootNode().addChild(new GroupNode()).addChild(new GeometryNode());

    The Rootnode now has a Groupnode as child and this groupnode has a geonode as child.

    Parameters

    • node: INode

      Child to add.

    Returns INode

removeChild

  • removeChild(node: INode): boolean
  • Removes a node and all its children, if it's contained beneath this GroupNode.

    Parameters

    • node: INode

      Node to remove

    Returns boolean

Generated using TypeDoc