Blockbench Reference Docs
    Preparing search index...

    Class Mesh

    Index

    Constructors

    Properties

    allow_mirror_modeling?: boolean
    armature: string
    color: number
    export: boolean
    faces: { [fkey: string]: MeshFace }
    locked: boolean
    menu?: Menu
    mesh: Mesh<BufferGeometry, Material | Material[]> | Object3D
    name: string
    origin: ArrayVector3
    parent?: OutlinerNode & OutlinerNodeParentTraits | "root"
    preview_controller: NodePreviewController
    rotation: ArrayVector3
    scene_object: Object3D
    seams: { [vkey: string]: MeshSeamValue }
    selected: boolean
    shading: "flat" | "smooth"
    type: string
    uuid: string
    vertices: { [vkey: string]: ArrayVector3 }
    visibility: boolean
    all: Mesh[]
    animator?: BoneAnimator
    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, typeof OutlinerElement>
    uuids: { [uuid: string]: OutlinerNode }

    Methods

    • Parameters

      • Optionaltarget: OutlinerNode | "root"

      Returns this

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

      Parameters

      • Optionalothers: OutlinerNode[]

      Returns this

    • Parameters

      • ...args: any[]

      Returns Record<string, any>

    • 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

      • flag: string

      Returns any

    • Parameters

      • Optionalignore_mesh_selection: boolean

      Returns Vector3

    • Initializes the node. This should always be called when creating nodes that will be used in the outliner.

      Returns this

    • 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

    • Mark the element as selected

      Parameters

      • Optionaldescendants: boolean

      Returns void

    • Removes the element.

      Parameters

      • Optionalundo: boolean

      Returns void

    • Marks the name of the group or element in the outliner for renaming.

      Returns this

    • Parameters

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

      Returns void

    • Saves the changed name of the element by creating an undo point and making the name unique if necessary.

      Parameters

      • Optionalsave: boolean

      Returns this

    • Parameters

      • Optionalevent: any
      • OptionalisOutlinerClick: boolean

      Returns this

    • Displays the context menu of the element

      Parameters

      • event: Event | HTMLElement

        Mouse event, determines where the context menu spawns.

      Returns this

    • Unfolds the outliner and scrolls up or down if necessary to show the group or element.

      Returns this

    • 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

    • Parameters

      • Optionaltarget: OutlinerNode
      • Optionalindex_modifier: number

      Returns this

    • Updates the Vue node of the element. This is only necessary in some rare situations

      Returns this

    • Parameters

      • override_options: { behavior: Record<string, any>; condition: any }

      Returns Deletable

    • Parameters

      • data: any
      • Optionalkeep_uuid: boolean

      Returns OutlinerElement

    • Parameters

      • constructor: any
      • id: string

      Returns void