Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Box

A MeshPrimitive prepopulated with box vertices and triangles

Hierarchy

  • MeshPrimitive
    • Box

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Box(width: number, height: number, depth: number, material?: Material): Box
  • Build a box geometry

    Parameters

    • width: number

      The size of the box along the X axis

    • height: number

      The size of the box along the Y axis

    • depth: number

      The size of the box along the Z axis

    • Default value material: Material = null

      An initial material to apply to the box

    Returns Box

Properties

material

material: Material

triangles

triangles: number[] = []

vertices

vertices: Vertex[] = []

Methods

getByteSize

  • getByteSize(scanId: number): number
  • Parameters

    • scanId: number

    Returns number

serialize