Class PistonJoint

Represents a piston joint.

Hierarchy

  • Joint

    Hierarchy

    • PistonJoint

Constructors

Properties

fileJoint: FileJoint & { controller: PistonControllerData }
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

  • Attempts to convert a Joint to PistonJoint. Only returns if the Joint's file object is a PistonJoint.

    Returns

    The converted PistonJoint, or undefined if the Joint was not a PistonJoint.

    Parameters

    • potential: Joint

      The Joint to convert.

    Returns undefined | PistonJoint

  • Creates a piston joint.

    Returns

    The created piston joint.

    Parameters

    • position: Vector3

      The position of the piston joint.

    • rotation: Axis

      The rotation of the piston joint.

    • childA: Child

      The first child of the piston joint.

    • Optional childB: Child

      The second child of the piston joint. Optional.

    • Optional color: string

      The color of the piston joint. Fallbacks to the piston's default color.

    • length: number = 1

      The length of the piston joint. Unused if the piston is connected to a controller. Defaults to 1.

    • speed: number = 1

      The speed of the piston joint. Unused if the piston is connected to a controller. Defaults to 1.

    Returns PistonJoint

Generated using TypeDoc