Class LightPart

Represents a light.

Hierarchy

  • Child

    Hierarchy

    • LightPart

Constructors

Properties

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 a LightPart. Only returns if the Child's file object is a LightPart.

    Returns

    The converted LightPart, or undefined if the Child is not a LightPart.

    Parameters

    • potential: Child

      The Child to convert.

    Returns undefined | LightPart

  • Creates a light.

    Returns

    The created light.

    Parameters

    • position: Vector3

      The position of the light.

    • rotation: Axis

      The rotation of the light.

    • Optional color: string

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

    • luminance: number = 1

      The luminance of the light. Defaults to 1.

    Returns LightPart

Generated using TypeDoc