Capsule
A THREE.CapsuleGeometry with radius 0.5, length 1, 4 cap subdivisions, and 8 radial segments.
ts
import { Behaviour } from "@relu-interactives/spatial-ecs";
export default class SpawnCapsule extends Behaviour {
init() {
const objects = this.world.getObjectManagementSystem();
objects?.requestCreate("capsule", {
name: "Player",
transform: { position: { x: 0, y: 1, z: 0 } },
});
}
}Payload
| Field | Type | Default | Description |
|---|---|---|---|
name | string | "Capsule" | Display name. |
transform | TransformData | identity | Position / rotation (radians) / scale. |
parentId | EntityId | null | null | Optional parent entity. |
Components attached
Transform, Object3DRef, Name, EntityType, ParentId, Selectable, Mesh, Material, MeshGeometry.

