Meshcomponent

MeshComponent class

Mesh component, used to display simple meshes in the game (box, sphere, cylinder)

See MeshComponentData for the data schema used to create a mesh component

Signature:

export declare class MeshComponent extends Component3D<MeshComponentData> 

Extends: Component3D<MeshComponentData>

Properties

Property

Modifiers

Type

Description

color

string

Color of the mesh. Defaults to "#ff0000"

geometryData

MeshGeometryData

Geometry of the mesh. Defaults to a Box with a size of 1

mesh

Mesh

This is the threejs mesh created from component data

opacity

number

Opacity of the mesh. Defaults to 1

Methods

Method

Modifiers

Description

dispose()

protected

getCollisionMesh()

init()

protected

updateRenderMode()