Class: BoxLayer
A layer of a canvas box. This is a group of six canvases that are rendered as a single mesh.
Hierarchy
-
Mesh
↳
BoxLayer
Constructors
constructor
• new BoxLayer(width
, height
, depth
, widthSegments
, heightSegments
, depthSegments
, side
, transparent
): BoxLayer
Create a six-sided canvas box layer.
Parameters
Name | Type | Description |
---|---|---|
width | number | The width of the box layer. |
height | number | The height of the box layer. |
depth | number | The depth of the box layer. |
widthSegments | number | The width segments of the box layer. |
heightSegments | number | The height segments of the box layer. |
depthSegments | number | The depth segments of the box layer. |
side | Side | The side of the box layer to render. |
transparent | boolean | Whether or not should this canvas box be rendered as transparent. |
Returns
Overrides
Mesh.constructor
Properties
depth
• depth: number
The depth of the box layer.
depthSegments
• depthSegments: number
The depth segments of the box layer.
height
• height: number
The height of the box layer.
heightSegments
• heightSegments: number
The height segments of the box layer.
materials
• materials: Map
<string
, MeshBasicMaterial
>
The materials of the six faces of this box layer.
width
• width: number
The width of the box layer.
widthSegments
• widthSegments: number
The width segments of the box layer.
Methods
paint
▸ paint(side
, art
): void
Add art to the canvas(s) of this box layer.
Parameters
Name | Type | Description |
---|---|---|
side | BoxSides | BoxSides [] | The side(s) of the box layer to draw on. |
art | Color | Texture | ArtFunction | The art or art function to draw on the box layer's side. |
Returns
void