Class Child

A base class for a shape contained in a body. Has a position and rotation, and can be connected to other childs (assuming they are both interactable).

Hierarchy

Constructors

Properties

desiredPosition: Vector3
fileChild: FileChild
fileShape: FileShape

Accessors

  • get color(): string
  • The color of this shape.

    Returns string

  • set color(value: string): void
  • Parameters

    • value: string

    Returns void

  • get shapeId(): string
  • The shapeId of this shape. Determines the model and behavior in-game.

    Returns string

  • set shapeId(value: string): void
  • Parameters

    • value: string

    Returns void

Methods

  • Connects this child to another child. Both children must be interactable.

    Parameters

    • other: number | Child

      The Child object or the ID of the child to connect to.

    Returns void

  • Disconnects this child from another child.

    Parameters

    • other: number | Child

      The Child object or the ID of the child to disconnect from.

    Returns void

  • Gets a list of the IDs of the children this child is connected to.

    Returns

    The list of IDs.

    Returns number[]

  • Gets the ID of the child.

    Returns

    The ID of the child.

    Returns number

  • Attempts to convert a Shape to a Child. Only returns if the Shape's file object is a Child.

    Returns

    The converted Child, or undefined if the Shape was not a Child.

    Parameters

    • potential: Shape

      The Shape to convert.

    Returns undefined | Child

Generated using TypeDoc