Interface ModelPart

interface ModelPart {
    addBox(x: number, y: number, z: number, w: number, h: number, l: number): void;
    addBox(x: number, y: number, z: number, w: number, h: number, l: number, add: number): void;
    addPart(name: string): Render.ModelPart;
    clear(): void;
    getMesh(): RenderMesh;
    setMesh(mesh: RenderMesh): void;
    setOffset(offsetX: number, offsetY: number, offsetZ: number): void;
    setRotation(rotationX: number, rotationY: number, rotationZ: number): void;
    setTextureOffset(u: number, v: number): void;
    setTextureOffset(u: number, v: number): void;
    setTextureOffset(u: number, v: number, placeholder: boolean): void;
    setTextureSize(w: number, h: number): void;
    setTextureSize(w: number, h: number): void;
    setTextureSize(w: number, h: number, placeholder: boolean): void;
}

Methods

  • Adds a new box to the part on the specified coordinates (relative to the part's coordinates) of the specified size (width, height, length).

    Parameters

    • x: number
    • y: number
    • z: number
    • w: number
    • h: number
    • l: number

    Returns void

  • Adds a new box to the part on the specified coordinates (relative to the part's coordinates) of the specified size (width, height, length).

    Parameters

    • x: number
    • y: number
    • z: number
    • w: number
    • h: number
    • l: number
    • add: number

      additional size to be added from all the six sizes of the box

    Returns void

  • Creates a new part with specified name. If a part with specified name already exists, returns the existing part.

    Parameters

    • name: string

      name of the part to create or return

    Returns Render.ModelPart

  • Clears the contents of the part.

    Returns void

  • Specifies part default offset.

    Parameters

    • offsetX: number
    • offsetY: number
    • offsetZ: number

    Returns void

  • Specifies part rotation.

    Parameters

    • rotationX: number
    • rotationY: number
    • rotationZ: number

    Returns void

  • Specifies texture UV offset.

    Parameters

    • u: number
    • v: number

    Returns void

  • Specifies texture UV offset.

    Parameters

    • u: number
    • v: number

    Returns void

  • Specifies texture UV offset.

    Parameters

    • u: number
    • v: number
    • placeholder: boolean

      deprecated boolean parameter

    Returns void

    Use same method without last parameter.

  • Specifies texture size size, use the real texture file size or change it to stretch texture.

    Parameters

    • w: number
    • h: number

    Returns void

  • Specifies texture size size, use the real texture file size or change it to stretch texture.

    Parameters

    • w: number
    • h: number

    Returns void

  • Specifies texture size size, use the real texture file size or change it to stretch texture.

    Parameters

    • w: number
    • h: number
    • placeholder: boolean

      deprecated boolean parameter

    Returns void

    Use same method without last parameter.

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.