Class Part

Represents any non-block part.

Hierarchy

Constructors

Properties

fileChild: FileChild
filePart: 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 a Part. Only returns if the Child's file object is a Part.

    Returns

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

    Parameters

    • potential: Child

      The Child to convert.

    Returns Part

  • Creates a part.

    Returns

    The created part.

    Parameters

    • shapeId: string

      The shapeId of the part.

    • position: Vector3

      The position of the part.

    • rotation: Axis

      The rotation of the part.

    • Optional color: string

      The color of the part. Fallbacks to the part's default color.

    Returns Part

Generated using TypeDoc