Class Blocks

Represents a group of blocks.

Hierarchy

Constructors

Properties

fileBlocks: FileChild & { bounds: FileVector3 }
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

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

    Returns

    The converted Blocks, or undefined if the Child was not Blocks.

    Parameters

    • potential: Child

      The Child to convert.

    Returns undefined | Blocks

  • Creates a group of blocks.

    Returns

    The created group of blocks.

    Parameters

    • shapeId: string

      The shapeId of the group of blocks.

    • position: Vector3

      The position of the group of blocks.

    • bounds: Vector3 = ...

      The bounds of the group of blocks.

    • Optional color: string

      The color of the group of blocks. Fallbacks to the block's default color.

    Returns Blocks

Generated using TypeDoc