@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / components / MeshGeometryComponent
Class: MeshGeometryComponent
Defined in: components/MeshGeometry.ts:88
Editable geometry parameters for primitive meshes (cube, sphere, plane, capsule, cylinder) and the placeholder for model entities. Holds the authoring values plus shadow casting/receiving flags. The mesh-geometry system rebuilds the underlying BufferGeometry when parameters change.
Extends
Constructors
Constructor
ts
new MeshGeometryComponent(
kind,
object,
parameters?,
options?): MeshGeometryComponent;Defined in: components/MeshGeometry.ts:104
Parameters
| Parameter | Type |
|---|---|
kind | EditableMeshObjectKind |
object | Object3D<Object3DEventMap> | null |
parameters? | Partial<MeshGeometryParameters> |
options? | { modelName?: string; castShadow?: boolean; receiveShadow?: boolean; } |
options.modelName? | string |
options.castShadow? | boolean |
options.receiveShadow? | boolean |
Returns
MeshGeometryComponent
Overrides
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
kind | readonly | EditableMeshObjectKind | Primitive kind (cube, sphere, plane, capsule, cylinder) or model for loaded assets. | components/MeshGeometry.ts:90 |
geometryType | readonly | string | Three.js geometry class name (e.g. "BoxGeometry", "SphereGeometry"). Derived from kind. | components/MeshGeometry.ts:92 |
parameters | public | MeshGeometryParameters | Editable parameters whose shape depends on kind. The mesh-geometry system rebuilds geometry when these change. | components/MeshGeometry.ts:94 |
object | public | Object3D<Object3DEventMap> | null | Live three.js object whose geometry is being managed. null until the object is built. | components/MeshGeometry.ts:96 |
modelName | public | string | Human-readable model name shown in the inspector for model entities; empty for primitives. | components/MeshGeometry.ts:98 |
castShadow | public | boolean | Whether the mesh casts shadows in the renderer. | components/MeshGeometry.ts:100 |
receiveShadow | public | boolean | Whether the mesh receives shadows in the renderer. | components/MeshGeometry.ts:102 |

