Blockbench Reference Docs
    Preparing search index...

    Class Mesh

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    allow_mirror_modeling?: boolean
    armature: string
    children?: OutlinerNode[]
    color: number
    export: boolean
    faces: { [fkey: string]: MeshFace }
    locked: boolean
    menu?: Menu
    name: string
    name_regex: (element?: OutlinerNode) => string | boolean
    old_name?: string
    origin: ArrayVector3
    parent: OutlinerNode & OutlinerNodeParentTraits | "root"
    rotation: ArrayVector3
    seams: { [vkey: string]: MeshSeamValue }
    selected: boolean
    shading: "flat" | "smooth"
    type: string
    uuid: string
    vertices: { [vkey: string]: ArrayVector3 }
    visibility: boolean
    all: Mesh[]
    animator?: BoneAnimator
    behavior: Record<string, any>
    behavior_overrides: any[]
    hasAny: () => boolean

    Check if any elements of the type are in the project

    hasSelected: () => boolean

    Check if any elements of the type are currently selected

    isParent: false
    preview_controller: NodePreviewController
    properties: Record<string, Property<any>>
    selected: Mesh[]
    types: Record<string, ElementTypeConstructor>
    uuids: { [uuid: string]: OutlinerNode }

    Accessors

    Methods

    • Create a unique name for the group or element by adding a number at the end or increasing it.

      Parameters

      • Optionalothers: OutlinerNode[]

      Returns string | false

    • Get selected edges as vertex key pairs

      Parameters

      • Optionalcan_write: boolean

        If true, the array can safely be modified to update the selection

      Returns [string, string][]

    • Get selected faces as face keys

      Parameters

      • Optionalcan_write: boolean

        If true, the array can safely be modified to update the selection

      Returns string[]

    • Get selected vertices as vertex keys

      Parameters

      • Optionalcan_write: boolean

        If true, the array can safely be modified to update the selection

      Returns string[]

    • Parameters

      • Optionalignore_mesh_selection: boolean

      Returns Vector3

    • Checks of the group or element is a child of group.

      Parameters

      • node: OutlinerNode
      • max_levels: number

        The maximum number of generations that can be between the element and the group

      Returns boolean

    • Parameters

      • val: number
      • axis: number
      • negative: boolean
      • allow_negative: boolean
      • Optionalbidirectional: boolean

      Returns void

    • Vertex lists of quads are generally in arbitrary order, the order is calculated when calling getSortedVertices() to account for dfiferent face geometries. Calling this method pre-sorts all faces to allow optimizing subsequent processing

      Returns void