@relu-interactives/spatial-ecs 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{System-BTyYvKVH.d.cts → System-CIiWteft.d.cts} +2 -2
- package/dist/{System-BTyYvKVH.d.ts → System-CIiWteft.d.ts} +2 -2
- package/dist/{Video-D2H5H-K3.d.cts → Video-ChVFs9Tl.d.cts} +139 -75
- package/dist/{Video-BWhbvVPg.d.ts → Video-DCMCLInA.d.ts} +139 -75
- package/dist/{chunk-XWIEEJ7Z.js → chunk-4A66FSFT.js} +128 -82
- package/dist/chunk-4A66FSFT.js.map +1 -0
- package/dist/{chunk-AYEF3X2P.js → chunk-CRP3W2GK.js} +3 -3
- package/dist/chunk-CRP3W2GK.js.map +1 -0
- package/dist/{chunk-MAWBTMCG.js → chunk-KRZLEPRI.js} +156 -88
- package/dist/chunk-KRZLEPRI.js.map +1 -0
- package/dist/{chunk-NFDTIYR4.js → chunk-NB6I5JJN.js} +17 -2
- package/dist/chunk-NB6I5JJN.js.map +1 -0
- package/dist/{chunk-P2YDX5DB.js → chunk-RXCUHGRB.js} +124 -5
- package/dist/chunk-RXCUHGRB.js.map +1 -0
- package/dist/components/index.cjs +161 -93
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +1 -1
- package/dist/docs/api/Behaviour/classes/Behaviour.md +29 -29
- package/dist/docs/api/Component/classes/Component.md +1 -1
- package/dist/docs/api/components/classes/AnimationComponent.md +26 -26
- package/dist/docs/api/components/classes/AudioComponent.md +19 -19
- package/dist/docs/api/components/classes/CameraComponent.md +14 -14
- package/dist/docs/api/components/classes/EntityType.md +3 -3
- package/dist/docs/api/components/classes/Environment.md +3 -3
- package/dist/docs/api/components/classes/ImageComponent.md +7 -7
- package/dist/docs/api/components/classes/ImageTarget.md +7 -7
- package/dist/docs/api/components/classes/ImageTargetAnchor.md +4 -4
- package/dist/docs/api/components/classes/LightComponent.md +6 -6
- package/dist/docs/api/components/classes/MaterialComponent.md +11 -11
- package/dist/docs/api/components/classes/MeshComponent.md +3 -3
- package/dist/docs/api/components/classes/MeshGeometryComponent.md +9 -9
- package/dist/docs/api/components/classes/ModelComponent.md +4 -4
- package/dist/docs/api/components/classes/Name.md +3 -3
- package/dist/docs/api/components/classes/Object3DRef.md +4 -4
- package/dist/docs/api/components/classes/ParentId.md +3 -3
- package/dist/docs/api/components/classes/PhysicsComponent.md +6 -6
- package/dist/docs/api/components/classes/Postprocessing.md +3 -3
- package/dist/docs/api/components/classes/ScriptComponent.md +5 -5
- package/dist/docs/api/components/classes/Selectable.md +3 -3
- package/dist/docs/api/components/classes/SelectionTransformState.md +5 -5
- package/dist/docs/api/components/classes/SpriteComponent.md +7 -7
- package/dist/docs/api/components/classes/TransformComponent.md +12 -12
- package/dist/docs/api/components/classes/VideoComponent.md +28 -28
- package/dist/docs/api/components/functions/normalizePhysicsState.md +1 -1
- package/dist/docs/api/components/type-aliases/AnimationComponentOptions.md +9 -9
- package/dist/docs/api/components/type-aliases/CameraComponentOptions.md +13 -13
- package/dist/docs/api/components/type-aliases/CameraProjection.md +1 -1
- package/dist/docs/api/components/type-aliases/CameraRuntimeType.md +1 -1
- package/dist/docs/api/components/type-aliases/ColliderShape.md +1 -1
- package/dist/docs/api/components/type-aliases/ColliderState.md +20 -20
- package/dist/docs/api/components/type-aliases/CubeMeshParameters.md +4 -4
- package/dist/docs/api/components/type-aliases/EditableMeshObjectKind.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentFogState.md +8 -8
- package/dist/docs/api/components/type-aliases/EnvironmentFogType.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentGradientEffect.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentSkyboxState.md +7 -7
- package/dist/docs/api/components/type-aliases/EnvironmentSkyboxType.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentState.md +5 -5
- package/dist/docs/api/components/type-aliases/ImageTargetAnchorOptions.md +3 -3
- package/dist/docs/api/components/type-aliases/ImageTargetReference.md +7 -7
- package/dist/docs/api/components/type-aliases/LightValueState.md +11 -11
- package/dist/docs/api/components/type-aliases/MaterialTypeValue.md +1 -1
- package/dist/docs/api/components/type-aliases/MaterialValueState.md +28 -28
- package/dist/docs/api/components/type-aliases/MeshGeometryParameters.md +1 -1
- package/dist/docs/api/components/type-aliases/MeshGeometryParametersByKind.md +7 -7
- package/dist/docs/api/components/type-aliases/PhysicsState.md +3 -3
- package/dist/docs/api/components/type-aliases/PlaneMeshParameters.md +3 -3
- package/dist/docs/api/components/type-aliases/PostprocessingState.md +62 -62
- package/dist/docs/api/components/type-aliases/RadiusHeightMeshParameters.md +3 -3
- package/dist/docs/api/components/type-aliases/RadiusMeshParameters.md +2 -2
- package/dist/docs/api/components/type-aliases/RigidbodyState.md +17 -17
- package/dist/docs/api/components/type-aliases/RigidbodyType.md +1 -1
- package/dist/docs/api/components/type-aliases/ScriptEntry.md +9 -9
- package/dist/docs/api/components/type-aliases/TextureFilteringValue.md +1 -1
- package/dist/docs/api/components/type-aliases/TransformData.md +4 -4
- package/dist/docs/api/components/type-aliases/TransformModeValue.md +1 -1
- package/dist/docs/api/components/type-aliases/TransformSpaceValue.md +1 -1
- package/dist/docs/api/components/type-aliases/Vec3.md +4 -4
- package/dist/docs/api/components/variables/DEFAULT_COLLIDER_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_ENVIRONMENT_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_MESH_GEOMETRY_PARAMETERS.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_PHYSICS_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_POSTPROCESSING_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_RIGIDBODY_STATE.md +1 -1
- package/dist/docs/api/index/classes/AnimationStateMachine.md +16 -16
- package/dist/docs/api/index/classes/AnimationStateManager.md +13 -13
- package/dist/docs/api/index/classes/AnimationSystem.md +3 -3
- package/dist/docs/api/index/classes/AudioSystem.md +4 -4
- package/dist/docs/api/index/classes/CameraSyncSystem.md +2 -2
- package/dist/docs/api/index/classes/EnvironmentSyncSystem.md +4 -4
- package/dist/docs/api/index/classes/InputSystem.md +33 -33
- package/dist/docs/api/index/classes/LightSyncSystem.md +2 -2
- package/dist/docs/api/index/classes/MaterialSyncSystem.md +3 -3
- package/dist/docs/api/index/classes/MeshGeometrySystem.md +2 -2
- package/dist/docs/api/index/classes/ObjectManagementSystem.md +14 -14
- package/dist/docs/api/index/classes/ObjectVisibilitySystem.md +2 -2
- package/dist/docs/api/index/classes/PhysicsSyncSystem.md +4 -4
- package/dist/docs/api/index/classes/PostprocessingSyncSystem.md +4 -4
- package/dist/docs/api/index/classes/RenderSystem.md +3 -3
- package/dist/docs/api/index/classes/ScriptBehaviourSystem.md +4 -4
- package/dist/docs/api/index/classes/TransformSyncSystem.md +2 -2
- package/dist/docs/api/index/classes/VideoSystem.md +4 -4
- package/dist/docs/api/index/classes/World.md +95 -81
- package/dist/docs/api/index/functions/createAnimationComponent.md +1 -1
- package/dist/docs/api/index/functions/createAudioComponent.md +1 -1
- package/dist/docs/api/index/functions/createCameraComponent.md +1 -1
- package/dist/docs/api/index/functions/createEntityTypeComponent.md +1 -1
- package/dist/docs/api/index/functions/createEnvironmentComponent.md +1 -1
- package/dist/docs/api/index/functions/createImageComponent.md +1 -1
- package/dist/docs/api/index/functions/createImageTargetAnchorComponent.md +1 -1
- package/dist/docs/api/index/functions/createImageTargetComponent.md +1 -1
- package/dist/docs/api/index/functions/createLightComponent.md +1 -1
- package/dist/docs/api/index/functions/createMaterialComponent.md +1 -1
- package/dist/docs/api/index/functions/createMeshComponent.md +1 -1
- package/dist/docs/api/index/functions/createMeshGeometryComponent.md +1 -1
- package/dist/docs/api/index/functions/createModelComponent.md +1 -1
- package/dist/docs/api/index/functions/createNameComponent.md +1 -1
- package/dist/docs/api/index/functions/createObject3DRefComponent.md +1 -1
- package/dist/docs/api/index/functions/createParentIdComponent.md +1 -1
- package/dist/docs/api/index/functions/createPhysicsComponent.md +1 -1
- package/dist/docs/api/index/functions/createPostprocessingComponent.md +1 -1
- package/dist/docs/api/index/functions/createScriptComponent.md +1 -1
- package/dist/docs/api/index/functions/createSelectableComponent.md +1 -1
- package/dist/docs/api/index/functions/createSelectionTransformStateComponent.md +1 -1
- package/dist/docs/api/index/functions/createSpriteComponent.md +1 -1
- package/dist/docs/api/index/functions/createTransformComponent.md +1 -1
- package/dist/docs/api/index/functions/createVideoComponent.md +1 -1
- package/dist/docs/api/index/functions/hydrateWorldFromSnapshot.md +1 -1
- package/dist/docs/api/index/functions/hydrateWorldFromSnapshotDetailed.md +1 -1
- package/dist/docs/api/index/functions/registerDefaultComponentFactories.md +1 -1
- package/dist/docs/api/index/functions/registerDefaultFactories.md +1 -1
- package/dist/docs/api/index/interfaces/EcsSystem.md +3 -3
- package/dist/docs/api/index/interfaces/StateMachine.md +13 -13
- package/dist/docs/api/index/type-aliases/AnimationStateCallbacks.md +4 -4
- package/dist/docs/api/index/type-aliases/ComponentFactory.md +1 -1
- package/dist/docs/api/index/type-aliases/EcsComponentFactoryKind.md +1 -1
- package/dist/docs/api/index/type-aliases/EcsWorldComponentSnapshot.md +3 -3
- package/dist/docs/api/index/type-aliases/EcsWorldStateSnapshotLike.md +4 -4
- package/dist/docs/api/index/type-aliases/HydrateWorldFromSnapshotResult.md +3 -3
- package/dist/docs/api/index/type-aliases/KeyboardKey.md +1 -1
- package/dist/docs/api/index/type-aliases/MouseButton.md +1 -1
- package/dist/docs/api/index/type-aliases/SelectionContext.md +4 -4
- package/dist/docs/api/index/variables/HYDRATABLE_ENTITY_KINDS.md +1 -1
- package/dist/docs/api/index/variables/KeyboardKeys.md +89 -89
- package/dist/docs/api/types/type-aliases/AssetInput.md +3 -3
- package/dist/docs/api/types/type-aliases/CheckboxInput.md +1 -1
- package/dist/docs/api/types/type-aliases/ColorInput.md +1 -1
- package/dist/docs/api/types/type-aliases/ComponentInput.md +4 -4
- package/dist/docs/api/types/type-aliases/ComponentKind.md +1 -1
- package/dist/docs/api/types/type-aliases/DropdownInput.md +3 -3
- package/dist/docs/api/types/type-aliases/DropdownOption.md +3 -3
- package/dist/docs/api/types/type-aliases/EcsEntityEditorKind.md +1 -1
- package/dist/docs/api/types/type-aliases/EcsEntityKind.md +1 -1
- package/dist/docs/api/types/type-aliases/EntityId.md +1 -1
- package/dist/docs/api/types/type-aliases/EntityInput.md +3 -3
- package/dist/docs/api/types/type-aliases/FloatInput.md +1 -1
- package/dist/docs/api/types/type-aliases/IntersectionResult.md +3 -3
- package/dist/docs/api/types/type-aliases/ParentLookup.md +3 -3
- package/dist/docs/api/types/type-aliases/SelectionListener.md +1 -1
- package/dist/docs/api/types/type-aliases/SliderInput.md +5 -5
- package/dist/docs/api/types/type-aliases/TextInput.md +1 -1
- package/dist/docs/api/types/type-aliases/ToggleInput.md +1 -1
- package/dist/docs/api/types/type-aliases/Vec3.md +1 -1
- package/dist/docs/api/types/type-aliases/Vector2Input.md +3 -3
- package/dist/docs/api/types/type-aliases/Vector3Input.md +4 -4
- package/dist/docs/api/types/type-aliases/WorldEntityView.md +1 -1
- package/dist/docs/guide/spawning/ambient-light.md +2 -2
- package/dist/docs/guide/spawning/area-light.md +2 -2
- package/dist/docs/guide/spawning/audio.md +27 -16
- package/dist/docs/guide/spawning/camera.md +2 -2
- package/dist/docs/guide/spawning/capsule.md +2 -2
- package/dist/docs/guide/spawning/cube.md +2 -2
- package/dist/docs/guide/spawning/cylinder.md +2 -2
- package/dist/docs/guide/spawning/directional-light.md +2 -2
- package/dist/docs/guide/spawning/empty.md +2 -2
- package/dist/docs/guide/spawning/image-target.md +2 -2
- package/dist/docs/guide/spawning/image.md +2 -2
- package/dist/docs/guide/spawning/index.md +2 -2
- package/dist/docs/guide/spawning/model.md +2 -2
- package/dist/docs/guide/spawning/plane.md +2 -2
- package/dist/docs/guide/spawning/point-light.md +2 -2
- package/dist/docs/guide/spawning/sphere.md +2 -2
- package/dist/docs/guide/spawning/spot-light.md +2 -2
- package/dist/docs/guide/spawning/sprite.md +2 -2
- package/dist/docs/guide/spawning/video.md +2 -2
- package/dist/docs/guide/world-api.md +3 -5
- package/dist/factories/index.cjs +217 -105
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +9 -3
- package/dist/factories/index.d.ts +9 -3
- package/dist/factories/index.js +3 -3
- package/dist/{index-KdEzEZox.d.cts → index-D1I5L7bA.d.cts} +8 -3
- package/dist/{index-Dm6zF1MY.d.ts → index-DGZDgt3p.d.ts} +8 -3
- package/dist/index.cjs +468 -179
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +51 -12
- package/dist/index.js.map +1 -1
- package/dist/systems/index.cjs +248 -63
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.d.cts +15 -3
- package/dist/systems/index.d.ts +15 -3
- package/dist/systems/index.js +3 -3
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/worldSnapshotUtils.cjs +15 -0
- package/dist/worldSnapshotUtils.cjs.map +1 -1
- package/dist/worldSnapshotUtils.d.cts +1 -1
- package/dist/worldSnapshotUtils.d.ts +1 -1
- package/dist/worldSnapshotUtils.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-AYEF3X2P.js.map +0 -1
- package/dist/chunk-MAWBTMCG.js.map +0 -1
- package/dist/chunk-NFDTIYR4.js.map +0 -1
- package/dist/chunk-P2YDX5DB.js.map +0 -1
- package/dist/chunk-XWIEEJ7Z.js.map +0 -1
|
@@ -86,7 +86,7 @@ type EntityId = number;
|
|
|
86
86
|
* maps to an object factory in `core/factories/objects/*` that creates the
|
|
87
87
|
* baseline component set.
|
|
88
88
|
*/
|
|
89
|
-
type EcsEntityKind = "cube" | "sphere" | "plane" | "capsule" | "cylinder" | "empty" | "model" | "image" | "imageTarget" | "sprite" | "audio" | "camera" | "video" | "ambientLight" | "directionalLight" | "pointLight" | "spotLight" | "areaLight";
|
|
89
|
+
type EcsEntityKind = "cube" | "sphere" | "plane" | "capsule" | "cylinder" | "empty" | "model" | "image" | "imageTarget" | "sprite" | "audio" | "camera" | "video" | "ambientLight" | "directionalLight" | "pointLight" | "spotLight" | "areaLight" | "instancedMesh";
|
|
90
90
|
/** {@link EcsEntityKind} extended with editor-only utility entities (gizmos, helpers). */
|
|
91
91
|
type EcsEntityEditorKind = EcsEntityKind | "editorUtility";
|
|
92
92
|
/** Callback invoked when the selected entity changes. `null` indicates a deselection. */
|
|
@@ -235,7 +235,7 @@ type CreateContext = {
|
|
|
235
235
|
isEditor?: boolean;
|
|
236
236
|
};
|
|
237
237
|
type EntityFactory = (context: CreateContext) => EntityId;
|
|
238
|
-
type EcsComponentFactoryKind = "animation" | "audio" | "camera" | "environment" | "entityType" | "image" | "imageTargetAnchor" | "imageTarget" | "light" | "material" | "mesh" | "meshGeometry" | "model" | "name" | "object3DRef" | "parentId" | "physics" | "postprocessing" | "script" | "selectable" | "selectionTransformState" | "sprite" | "transform" | "video";
|
|
238
|
+
type EcsComponentFactoryKind = "animation" | "audio" | "camera" | "environment" | "entityType" | "image" | "imageTargetAnchor" | "imageTarget" | "light" | "material" | "mesh" | "meshGeometry" | "model" | "name" | "object3DRef" | "parentId" | "physics" | "postprocessing" | "script" | "selectable" | "selectionTransformState" | "sprite" | "transform" | "video" | "instancedMesh";
|
|
239
239
|
type ComponentFactory = (world: World, entityId: EntityId, ...args: any[]) => unknown;
|
|
240
240
|
declare class ObjectManagementSystem implements EcsSystem {
|
|
241
241
|
private readonly scene;
|
|
@@ -86,7 +86,7 @@ type EntityId = number;
|
|
|
86
86
|
* maps to an object factory in `core/factories/objects/*` that creates the
|
|
87
87
|
* baseline component set.
|
|
88
88
|
*/
|
|
89
|
-
type EcsEntityKind = "cube" | "sphere" | "plane" | "capsule" | "cylinder" | "empty" | "model" | "image" | "imageTarget" | "sprite" | "audio" | "camera" | "video" | "ambientLight" | "directionalLight" | "pointLight" | "spotLight" | "areaLight";
|
|
89
|
+
type EcsEntityKind = "cube" | "sphere" | "plane" | "capsule" | "cylinder" | "empty" | "model" | "image" | "imageTarget" | "sprite" | "audio" | "camera" | "video" | "ambientLight" | "directionalLight" | "pointLight" | "spotLight" | "areaLight" | "instancedMesh";
|
|
90
90
|
/** {@link EcsEntityKind} extended with editor-only utility entities (gizmos, helpers). */
|
|
91
91
|
type EcsEntityEditorKind = EcsEntityKind | "editorUtility";
|
|
92
92
|
/** Callback invoked when the selected entity changes. `null` indicates a deselection. */
|
|
@@ -235,7 +235,7 @@ type CreateContext = {
|
|
|
235
235
|
isEditor?: boolean;
|
|
236
236
|
};
|
|
237
237
|
type EntityFactory = (context: CreateContext) => EntityId;
|
|
238
|
-
type EcsComponentFactoryKind = "animation" | "audio" | "camera" | "environment" | "entityType" | "image" | "imageTargetAnchor" | "imageTarget" | "light" | "material" | "mesh" | "meshGeometry" | "model" | "name" | "object3DRef" | "parentId" | "physics" | "postprocessing" | "script" | "selectable" | "selectionTransformState" | "sprite" | "transform" | "video";
|
|
238
|
+
type EcsComponentFactoryKind = "animation" | "audio" | "camera" | "environment" | "entityType" | "image" | "imageTargetAnchor" | "imageTarget" | "light" | "material" | "mesh" | "meshGeometry" | "model" | "name" | "object3DRef" | "parentId" | "physics" | "postprocessing" | "script" | "selectable" | "selectionTransformState" | "sprite" | "transform" | "video" | "instancedMesh";
|
|
239
239
|
type ComponentFactory = (world: World, entityId: EntityId, ...args: any[]) => unknown;
|
|
240
240
|
declare class ObjectManagementSystem implements EcsSystem {
|
|
241
241
|
private readonly scene;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { C as Component, e as EcsEntityKind, m as EcsEntityEditorKind, n as EntityId } from './System-
|
|
2
|
+
import { C as Component, e as EcsEntityKind, m as EcsEntityEditorKind, n as EntityId } from './System-CIiWteft.cjs';
|
|
3
3
|
import * as RAPIER from '@dimforge/rapier3d-compat';
|
|
4
4
|
|
|
5
5
|
interface StateMachine {
|
|
@@ -552,6 +552,143 @@ declare class Postprocessing extends Component {
|
|
|
552
552
|
constructor(values?: Partial<PostprocessingState>);
|
|
553
553
|
}
|
|
554
554
|
|
|
555
|
+
/** Editable primitive kinds the mesh-geometry system can rebuild on the fly. `model` is a passthrough placeholder for entities that own a loaded GLTF/GLB instead. */
|
|
556
|
+
type EditableMeshObjectKind = "capsule" | "cube" | "cylinder" | "model" | "plane" | "sphere";
|
|
557
|
+
/** Box geometry parameters in world units. */
|
|
558
|
+
type CubeMeshParameters = {
|
|
559
|
+
/** Box width along X. */
|
|
560
|
+
width: number;
|
|
561
|
+
/** Box height along Y. */
|
|
562
|
+
height: number;
|
|
563
|
+
/** Box depth along Z. */
|
|
564
|
+
depth: number;
|
|
565
|
+
};
|
|
566
|
+
/** Plane geometry parameters in world units. */
|
|
567
|
+
type PlaneMeshParameters = {
|
|
568
|
+
/** Plane width along X. */
|
|
569
|
+
width: number;
|
|
570
|
+
/** Plane height along Y. */
|
|
571
|
+
height: number;
|
|
572
|
+
};
|
|
573
|
+
/** Radius-only primitive parameters (sphere). */
|
|
574
|
+
type RadiusMeshParameters = {
|
|
575
|
+
/** Sphere radius in world units. */
|
|
576
|
+
radius: number;
|
|
577
|
+
};
|
|
578
|
+
/** Radius + height primitive parameters (capsule, cylinder). */
|
|
579
|
+
type RadiusHeightMeshParameters = {
|
|
580
|
+
/** Radius of the cap/cylinder cross-section. */
|
|
581
|
+
radius: number;
|
|
582
|
+
/** Length of the straight section between caps (capsule) or full height (cylinder). */
|
|
583
|
+
height: number;
|
|
584
|
+
};
|
|
585
|
+
/** Empty parameter set for `model` entities. */
|
|
586
|
+
type ModelMeshParameters = Record<string, never>;
|
|
587
|
+
/** Map from {@link EditableMeshObjectKind} to its parameter shape. */
|
|
588
|
+
type MeshGeometryParametersByKind = {
|
|
589
|
+
capsule: RadiusHeightMeshParameters;
|
|
590
|
+
cube: CubeMeshParameters;
|
|
591
|
+
cylinder: RadiusHeightMeshParameters;
|
|
592
|
+
model: ModelMeshParameters;
|
|
593
|
+
plane: PlaneMeshParameters;
|
|
594
|
+
sphere: RadiusMeshParameters;
|
|
595
|
+
};
|
|
596
|
+
type MeshGeometryParameters = MeshGeometryParametersByKind[EditableMeshObjectKind];
|
|
597
|
+
declare const DEFAULT_MESH_GEOMETRY_PARAMETERS: MeshGeometryParametersByKind;
|
|
598
|
+
/**
|
|
599
|
+
* Editable geometry parameters for primitive meshes (cube, sphere, plane,
|
|
600
|
+
* capsule, cylinder) and the placeholder for `model` entities. Holds the
|
|
601
|
+
* authoring values plus shadow casting/receiving flags. The mesh-geometry
|
|
602
|
+
* system rebuilds the underlying `BufferGeometry` when parameters change.
|
|
603
|
+
*
|
|
604
|
+
* @category Components
|
|
605
|
+
*/
|
|
606
|
+
declare class MeshGeometryComponent extends Component {
|
|
607
|
+
/** Primitive kind (`cube`, `sphere`, `plane`, `capsule`, `cylinder`) or `model` for loaded assets. */
|
|
608
|
+
readonly kind: EditableMeshObjectKind;
|
|
609
|
+
/** Three.js geometry class name (e.g. `"BoxGeometry"`, `"SphereGeometry"`). Derived from {@link kind}. */
|
|
610
|
+
readonly geometryType: string;
|
|
611
|
+
/** Editable parameters whose shape depends on {@link kind}. The mesh-geometry system rebuilds geometry when these change. */
|
|
612
|
+
parameters: MeshGeometryParameters;
|
|
613
|
+
/** Live three.js object whose geometry is being managed. `null` until the object is built. */
|
|
614
|
+
object: THREE.Object3D | null;
|
|
615
|
+
/** Human-readable model name shown in the inspector for `model` entities; empty for primitives. */
|
|
616
|
+
modelName: string;
|
|
617
|
+
/** Whether the mesh casts shadows in the renderer. */
|
|
618
|
+
castShadow: boolean;
|
|
619
|
+
/** Whether the mesh receives shadows in the renderer. */
|
|
620
|
+
receiveShadow: boolean;
|
|
621
|
+
constructor(kind: EditableMeshObjectKind, object: THREE.Object3D | null, parameters?: Partial<MeshGeometryParameters>, options?: {
|
|
622
|
+
modelName?: string;
|
|
623
|
+
castShadow?: boolean;
|
|
624
|
+
receiveShadow?: boolean;
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Per-instance transform stored inside {@link InstancedMeshComponent}.
|
|
630
|
+
* All rotations are in radians.
|
|
631
|
+
*/
|
|
632
|
+
type InstanceTransform = {
|
|
633
|
+
position: {
|
|
634
|
+
x: number;
|
|
635
|
+
y: number;
|
|
636
|
+
z: number;
|
|
637
|
+
};
|
|
638
|
+
/** Euler rotation in radians (XYZ order). */
|
|
639
|
+
rotation: {
|
|
640
|
+
x: number;
|
|
641
|
+
y: number;
|
|
642
|
+
z: number;
|
|
643
|
+
};
|
|
644
|
+
scale: {
|
|
645
|
+
x: number;
|
|
646
|
+
y: number;
|
|
647
|
+
z: number;
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
/** Primitive geometry kinds supported by instanced mesh rendering. */
|
|
651
|
+
type InstancedMeshKind = "capsule" | "cube" | "cylinder" | "plane" | "sphere";
|
|
652
|
+
/** Default identity instance transform. */
|
|
653
|
+
declare const DEFAULT_INSTANCE_TRANSFORM: InstanceTransform;
|
|
654
|
+
/** Default geometry parameters per instanced mesh kind. */
|
|
655
|
+
declare const DEFAULT_INSTANCED_MESH_PARAMETERS: Record<InstancedMeshKind, MeshGeometryParameters>;
|
|
656
|
+
/**
|
|
657
|
+
* Holds authored instanced-mesh data for an entity that renders as a
|
|
658
|
+
* `THREE.InstancedMesh`. Supports primitive geometry kinds (cube, sphere,
|
|
659
|
+
* plane, capsule, cylinder).
|
|
660
|
+
*
|
|
661
|
+
* The `instancedMesh` field is a live runtime reference that is **not**
|
|
662
|
+
* serialized into snapshots — it is excluded by the snapshot normalizer in
|
|
663
|
+
* `worldSnapshotUtils.ts` to prevent history churn.
|
|
664
|
+
*
|
|
665
|
+
* @category Components
|
|
666
|
+
*/
|
|
667
|
+
declare class InstancedMeshComponent extends Component {
|
|
668
|
+
/** Primitive geometry kind shared by all instances. */
|
|
669
|
+
meshKind: InstancedMeshKind;
|
|
670
|
+
/** Editable geometry parameters (width/height/depth, radius, etc.). */
|
|
671
|
+
meshParameters: MeshGeometryParameters;
|
|
672
|
+
/** Whether all instances cast shadows. */
|
|
673
|
+
castShadow: boolean;
|
|
674
|
+
/** Whether all instances receive shadows. */
|
|
675
|
+
receiveShadow: boolean;
|
|
676
|
+
/** Per-instance transforms stored in local space relative to the anchor object. */
|
|
677
|
+
instances: InstanceTransform[];
|
|
678
|
+
/**
|
|
679
|
+
* Live `THREE.InstancedMesh` managed by {@link InstancedMeshSystem}.
|
|
680
|
+
* Excluded from snapshot serialization — do **not** read this in hydration code.
|
|
681
|
+
*/
|
|
682
|
+
instancedMesh: THREE.InstancedMesh | null;
|
|
683
|
+
constructor(meshKind?: InstancedMeshKind, meshParameters?: Partial<MeshGeometryParameters>, options?: {
|
|
684
|
+
castShadow?: boolean;
|
|
685
|
+
receiveShadow?: boolean;
|
|
686
|
+
instances?: InstanceTransform[];
|
|
687
|
+
});
|
|
688
|
+
/** Sanitize and return a copy of the current mesh parameters with valid values. */
|
|
689
|
+
getSanitizedParameters(): MeshGeometryParameters;
|
|
690
|
+
}
|
|
691
|
+
|
|
555
692
|
type RapierRigidBody = RAPIER.RigidBody;
|
|
556
693
|
type RapierCollider = RAPIER.Collider;
|
|
557
694
|
/**
|
|
@@ -937,79 +1074,6 @@ declare class MeshComponent extends Component {
|
|
|
937
1074
|
constructor(mesh: THREE.Object3D);
|
|
938
1075
|
}
|
|
939
1076
|
|
|
940
|
-
/** Editable primitive kinds the mesh-geometry system can rebuild on the fly. `model` is a passthrough placeholder for entities that own a loaded GLTF/GLB instead. */
|
|
941
|
-
type EditableMeshObjectKind = "capsule" | "cube" | "cylinder" | "model" | "plane" | "sphere";
|
|
942
|
-
/** Box geometry parameters in world units. */
|
|
943
|
-
type CubeMeshParameters = {
|
|
944
|
-
/** Box width along X. */
|
|
945
|
-
width: number;
|
|
946
|
-
/** Box height along Y. */
|
|
947
|
-
height: number;
|
|
948
|
-
/** Box depth along Z. */
|
|
949
|
-
depth: number;
|
|
950
|
-
};
|
|
951
|
-
/** Plane geometry parameters in world units. */
|
|
952
|
-
type PlaneMeshParameters = {
|
|
953
|
-
/** Plane width along X. */
|
|
954
|
-
width: number;
|
|
955
|
-
/** Plane height along Y. */
|
|
956
|
-
height: number;
|
|
957
|
-
};
|
|
958
|
-
/** Radius-only primitive parameters (sphere). */
|
|
959
|
-
type RadiusMeshParameters = {
|
|
960
|
-
/** Sphere radius in world units. */
|
|
961
|
-
radius: number;
|
|
962
|
-
};
|
|
963
|
-
/** Radius + height primitive parameters (capsule, cylinder). */
|
|
964
|
-
type RadiusHeightMeshParameters = {
|
|
965
|
-
/** Radius of the cap/cylinder cross-section. */
|
|
966
|
-
radius: number;
|
|
967
|
-
/** Length of the straight section between caps (capsule) or full height (cylinder). */
|
|
968
|
-
height: number;
|
|
969
|
-
};
|
|
970
|
-
/** Empty parameter set for `model` entities. */
|
|
971
|
-
type ModelMeshParameters = Record<string, never>;
|
|
972
|
-
/** Map from {@link EditableMeshObjectKind} to its parameter shape. */
|
|
973
|
-
type MeshGeometryParametersByKind = {
|
|
974
|
-
capsule: RadiusHeightMeshParameters;
|
|
975
|
-
cube: CubeMeshParameters;
|
|
976
|
-
cylinder: RadiusHeightMeshParameters;
|
|
977
|
-
model: ModelMeshParameters;
|
|
978
|
-
plane: PlaneMeshParameters;
|
|
979
|
-
sphere: RadiusMeshParameters;
|
|
980
|
-
};
|
|
981
|
-
type MeshGeometryParameters = MeshGeometryParametersByKind[EditableMeshObjectKind];
|
|
982
|
-
declare const DEFAULT_MESH_GEOMETRY_PARAMETERS: MeshGeometryParametersByKind;
|
|
983
|
-
/**
|
|
984
|
-
* Editable geometry parameters for primitive meshes (cube, sphere, plane,
|
|
985
|
-
* capsule, cylinder) and the placeholder for `model` entities. Holds the
|
|
986
|
-
* authoring values plus shadow casting/receiving flags. The mesh-geometry
|
|
987
|
-
* system rebuilds the underlying `BufferGeometry` when parameters change.
|
|
988
|
-
*
|
|
989
|
-
* @category Components
|
|
990
|
-
*/
|
|
991
|
-
declare class MeshGeometryComponent extends Component {
|
|
992
|
-
/** Primitive kind (`cube`, `sphere`, `plane`, `capsule`, `cylinder`) or `model` for loaded assets. */
|
|
993
|
-
readonly kind: EditableMeshObjectKind;
|
|
994
|
-
/** Three.js geometry class name (e.g. `"BoxGeometry"`, `"SphereGeometry"`). Derived from {@link kind}. */
|
|
995
|
-
readonly geometryType: string;
|
|
996
|
-
/** Editable parameters whose shape depends on {@link kind}. The mesh-geometry system rebuilds geometry when these change. */
|
|
997
|
-
parameters: MeshGeometryParameters;
|
|
998
|
-
/** Live three.js object whose geometry is being managed. `null` until the object is built. */
|
|
999
|
-
object: THREE.Object3D | null;
|
|
1000
|
-
/** Human-readable model name shown in the inspector for `model` entities; empty for primitives. */
|
|
1001
|
-
modelName: string;
|
|
1002
|
-
/** Whether the mesh casts shadows in the renderer. */
|
|
1003
|
-
castShadow: boolean;
|
|
1004
|
-
/** Whether the mesh receives shadows in the renderer. */
|
|
1005
|
-
receiveShadow: boolean;
|
|
1006
|
-
constructor(kind: EditableMeshObjectKind, object: THREE.Object3D | null, parameters?: Partial<MeshGeometryParameters>, options?: {
|
|
1007
|
-
modelName?: string;
|
|
1008
|
-
castShadow?: boolean;
|
|
1009
|
-
receiveShadow?: boolean;
|
|
1010
|
-
});
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
1077
|
/**
|
|
1014
1078
|
* References a GLTF/GLB asset loaded from `path`. The model loading system
|
|
1015
1079
|
* resolves the asset asynchronously and populates {@link ModelComponent.object}
|
|
@@ -1258,4 +1322,4 @@ declare class VideoComponent extends Component {
|
|
|
1258
1322
|
stop(): void;
|
|
1259
1323
|
}
|
|
1260
1324
|
|
|
1261
|
-
export {
|
|
1325
|
+
export { type RadiusMeshParameters as $, AnimationComponent as A, type ImageTargetReference as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, type InstanceTransform as F, InstancedMeshComponent as G, type InstancedMeshKind as H, ImageComponent as I, type LightValueState as J, type MaterialTypeValue as K, LightComponent as L, MaterialComponent as M, type MaterialValueState as N, MeshComponent as O, MeshGeometryComponent as P, type MeshGeometryParameters as Q, type MeshGeometryParametersByKind as R, ModelComponent as S, Name as T, Object3DRef as U, PhysicsComponent as V, type PhysicsState as W, type PlaneMeshParameters as X, Postprocessing as Y, type PostprocessingState as Z, type RadiusHeightMeshParameters as _, type AnimationComponentOptions as a, type RigidbodyState as a0, type RigidbodyType as a1, ScriptComponent as a2, type ScriptEntry as a3, Selectable as a4, SelectionTransformState as a5, SpriteComponent as a6, type TextureFilteringValue as a7, type TransformModeValue as a8, type TransformSpaceValue as a9, VideoComponent as aa, normalizePhysicsState as ab, type AnimationStateCallbacks as ac, AnimationStateMachine as ad, AnimationStateManager as ae, type StateMachine as af, AudioComponent as b, type CameraComponentOptions as c, type CameraProjection as d, type CameraRuntimeType as e, type ColliderShape as f, type ColliderState as g, type CubeMeshParameters as h, DEFAULT_ENVIRONMENT_STATE as i, DEFAULT_INSTANCED_MESH_PARAMETERS as j, DEFAULT_INSTANCE_TRANSFORM as k, DEFAULT_MESH_GEOMETRY_PARAMETERS as l, DEFAULT_PHYSICS_STATE as m, DEFAULT_POSTPROCESSING_STATE as n, DEFAULT_RIGIDBODY_STATE as o, EntityType as p, Environment as q, type EnvironmentFogState as r, type EnvironmentFogType as s, type EnvironmentGradientEffect as t, type EnvironmentSkyboxState as u, type EnvironmentSkyboxType as v, type EnvironmentState as w, ImageTarget as x, ImageTargetAnchor as y, type ImageTargetAnchorOptions as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { C as Component, e as EcsEntityKind, m as EcsEntityEditorKind, n as EntityId } from './System-
|
|
2
|
+
import { C as Component, e as EcsEntityKind, m as EcsEntityEditorKind, n as EntityId } from './System-CIiWteft.js';
|
|
3
3
|
import * as RAPIER from '@dimforge/rapier3d-compat';
|
|
4
4
|
|
|
5
5
|
interface StateMachine {
|
|
@@ -552,6 +552,143 @@ declare class Postprocessing extends Component {
|
|
|
552
552
|
constructor(values?: Partial<PostprocessingState>);
|
|
553
553
|
}
|
|
554
554
|
|
|
555
|
+
/** Editable primitive kinds the mesh-geometry system can rebuild on the fly. `model` is a passthrough placeholder for entities that own a loaded GLTF/GLB instead. */
|
|
556
|
+
type EditableMeshObjectKind = "capsule" | "cube" | "cylinder" | "model" | "plane" | "sphere";
|
|
557
|
+
/** Box geometry parameters in world units. */
|
|
558
|
+
type CubeMeshParameters = {
|
|
559
|
+
/** Box width along X. */
|
|
560
|
+
width: number;
|
|
561
|
+
/** Box height along Y. */
|
|
562
|
+
height: number;
|
|
563
|
+
/** Box depth along Z. */
|
|
564
|
+
depth: number;
|
|
565
|
+
};
|
|
566
|
+
/** Plane geometry parameters in world units. */
|
|
567
|
+
type PlaneMeshParameters = {
|
|
568
|
+
/** Plane width along X. */
|
|
569
|
+
width: number;
|
|
570
|
+
/** Plane height along Y. */
|
|
571
|
+
height: number;
|
|
572
|
+
};
|
|
573
|
+
/** Radius-only primitive parameters (sphere). */
|
|
574
|
+
type RadiusMeshParameters = {
|
|
575
|
+
/** Sphere radius in world units. */
|
|
576
|
+
radius: number;
|
|
577
|
+
};
|
|
578
|
+
/** Radius + height primitive parameters (capsule, cylinder). */
|
|
579
|
+
type RadiusHeightMeshParameters = {
|
|
580
|
+
/** Radius of the cap/cylinder cross-section. */
|
|
581
|
+
radius: number;
|
|
582
|
+
/** Length of the straight section between caps (capsule) or full height (cylinder). */
|
|
583
|
+
height: number;
|
|
584
|
+
};
|
|
585
|
+
/** Empty parameter set for `model` entities. */
|
|
586
|
+
type ModelMeshParameters = Record<string, never>;
|
|
587
|
+
/** Map from {@link EditableMeshObjectKind} to its parameter shape. */
|
|
588
|
+
type MeshGeometryParametersByKind = {
|
|
589
|
+
capsule: RadiusHeightMeshParameters;
|
|
590
|
+
cube: CubeMeshParameters;
|
|
591
|
+
cylinder: RadiusHeightMeshParameters;
|
|
592
|
+
model: ModelMeshParameters;
|
|
593
|
+
plane: PlaneMeshParameters;
|
|
594
|
+
sphere: RadiusMeshParameters;
|
|
595
|
+
};
|
|
596
|
+
type MeshGeometryParameters = MeshGeometryParametersByKind[EditableMeshObjectKind];
|
|
597
|
+
declare const DEFAULT_MESH_GEOMETRY_PARAMETERS: MeshGeometryParametersByKind;
|
|
598
|
+
/**
|
|
599
|
+
* Editable geometry parameters for primitive meshes (cube, sphere, plane,
|
|
600
|
+
* capsule, cylinder) and the placeholder for `model` entities. Holds the
|
|
601
|
+
* authoring values plus shadow casting/receiving flags. The mesh-geometry
|
|
602
|
+
* system rebuilds the underlying `BufferGeometry` when parameters change.
|
|
603
|
+
*
|
|
604
|
+
* @category Components
|
|
605
|
+
*/
|
|
606
|
+
declare class MeshGeometryComponent extends Component {
|
|
607
|
+
/** Primitive kind (`cube`, `sphere`, `plane`, `capsule`, `cylinder`) or `model` for loaded assets. */
|
|
608
|
+
readonly kind: EditableMeshObjectKind;
|
|
609
|
+
/** Three.js geometry class name (e.g. `"BoxGeometry"`, `"SphereGeometry"`). Derived from {@link kind}. */
|
|
610
|
+
readonly geometryType: string;
|
|
611
|
+
/** Editable parameters whose shape depends on {@link kind}. The mesh-geometry system rebuilds geometry when these change. */
|
|
612
|
+
parameters: MeshGeometryParameters;
|
|
613
|
+
/** Live three.js object whose geometry is being managed. `null` until the object is built. */
|
|
614
|
+
object: THREE.Object3D | null;
|
|
615
|
+
/** Human-readable model name shown in the inspector for `model` entities; empty for primitives. */
|
|
616
|
+
modelName: string;
|
|
617
|
+
/** Whether the mesh casts shadows in the renderer. */
|
|
618
|
+
castShadow: boolean;
|
|
619
|
+
/** Whether the mesh receives shadows in the renderer. */
|
|
620
|
+
receiveShadow: boolean;
|
|
621
|
+
constructor(kind: EditableMeshObjectKind, object: THREE.Object3D | null, parameters?: Partial<MeshGeometryParameters>, options?: {
|
|
622
|
+
modelName?: string;
|
|
623
|
+
castShadow?: boolean;
|
|
624
|
+
receiveShadow?: boolean;
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Per-instance transform stored inside {@link InstancedMeshComponent}.
|
|
630
|
+
* All rotations are in radians.
|
|
631
|
+
*/
|
|
632
|
+
type InstanceTransform = {
|
|
633
|
+
position: {
|
|
634
|
+
x: number;
|
|
635
|
+
y: number;
|
|
636
|
+
z: number;
|
|
637
|
+
};
|
|
638
|
+
/** Euler rotation in radians (XYZ order). */
|
|
639
|
+
rotation: {
|
|
640
|
+
x: number;
|
|
641
|
+
y: number;
|
|
642
|
+
z: number;
|
|
643
|
+
};
|
|
644
|
+
scale: {
|
|
645
|
+
x: number;
|
|
646
|
+
y: number;
|
|
647
|
+
z: number;
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
/** Primitive geometry kinds supported by instanced mesh rendering. */
|
|
651
|
+
type InstancedMeshKind = "capsule" | "cube" | "cylinder" | "plane" | "sphere";
|
|
652
|
+
/** Default identity instance transform. */
|
|
653
|
+
declare const DEFAULT_INSTANCE_TRANSFORM: InstanceTransform;
|
|
654
|
+
/** Default geometry parameters per instanced mesh kind. */
|
|
655
|
+
declare const DEFAULT_INSTANCED_MESH_PARAMETERS: Record<InstancedMeshKind, MeshGeometryParameters>;
|
|
656
|
+
/**
|
|
657
|
+
* Holds authored instanced-mesh data for an entity that renders as a
|
|
658
|
+
* `THREE.InstancedMesh`. Supports primitive geometry kinds (cube, sphere,
|
|
659
|
+
* plane, capsule, cylinder).
|
|
660
|
+
*
|
|
661
|
+
* The `instancedMesh` field is a live runtime reference that is **not**
|
|
662
|
+
* serialized into snapshots — it is excluded by the snapshot normalizer in
|
|
663
|
+
* `worldSnapshotUtils.ts` to prevent history churn.
|
|
664
|
+
*
|
|
665
|
+
* @category Components
|
|
666
|
+
*/
|
|
667
|
+
declare class InstancedMeshComponent extends Component {
|
|
668
|
+
/** Primitive geometry kind shared by all instances. */
|
|
669
|
+
meshKind: InstancedMeshKind;
|
|
670
|
+
/** Editable geometry parameters (width/height/depth, radius, etc.). */
|
|
671
|
+
meshParameters: MeshGeometryParameters;
|
|
672
|
+
/** Whether all instances cast shadows. */
|
|
673
|
+
castShadow: boolean;
|
|
674
|
+
/** Whether all instances receive shadows. */
|
|
675
|
+
receiveShadow: boolean;
|
|
676
|
+
/** Per-instance transforms stored in local space relative to the anchor object. */
|
|
677
|
+
instances: InstanceTransform[];
|
|
678
|
+
/**
|
|
679
|
+
* Live `THREE.InstancedMesh` managed by {@link InstancedMeshSystem}.
|
|
680
|
+
* Excluded from snapshot serialization — do **not** read this in hydration code.
|
|
681
|
+
*/
|
|
682
|
+
instancedMesh: THREE.InstancedMesh | null;
|
|
683
|
+
constructor(meshKind?: InstancedMeshKind, meshParameters?: Partial<MeshGeometryParameters>, options?: {
|
|
684
|
+
castShadow?: boolean;
|
|
685
|
+
receiveShadow?: boolean;
|
|
686
|
+
instances?: InstanceTransform[];
|
|
687
|
+
});
|
|
688
|
+
/** Sanitize and return a copy of the current mesh parameters with valid values. */
|
|
689
|
+
getSanitizedParameters(): MeshGeometryParameters;
|
|
690
|
+
}
|
|
691
|
+
|
|
555
692
|
type RapierRigidBody = RAPIER.RigidBody;
|
|
556
693
|
type RapierCollider = RAPIER.Collider;
|
|
557
694
|
/**
|
|
@@ -937,79 +1074,6 @@ declare class MeshComponent extends Component {
|
|
|
937
1074
|
constructor(mesh: THREE.Object3D);
|
|
938
1075
|
}
|
|
939
1076
|
|
|
940
|
-
/** Editable primitive kinds the mesh-geometry system can rebuild on the fly. `model` is a passthrough placeholder for entities that own a loaded GLTF/GLB instead. */
|
|
941
|
-
type EditableMeshObjectKind = "capsule" | "cube" | "cylinder" | "model" | "plane" | "sphere";
|
|
942
|
-
/** Box geometry parameters in world units. */
|
|
943
|
-
type CubeMeshParameters = {
|
|
944
|
-
/** Box width along X. */
|
|
945
|
-
width: number;
|
|
946
|
-
/** Box height along Y. */
|
|
947
|
-
height: number;
|
|
948
|
-
/** Box depth along Z. */
|
|
949
|
-
depth: number;
|
|
950
|
-
};
|
|
951
|
-
/** Plane geometry parameters in world units. */
|
|
952
|
-
type PlaneMeshParameters = {
|
|
953
|
-
/** Plane width along X. */
|
|
954
|
-
width: number;
|
|
955
|
-
/** Plane height along Y. */
|
|
956
|
-
height: number;
|
|
957
|
-
};
|
|
958
|
-
/** Radius-only primitive parameters (sphere). */
|
|
959
|
-
type RadiusMeshParameters = {
|
|
960
|
-
/** Sphere radius in world units. */
|
|
961
|
-
radius: number;
|
|
962
|
-
};
|
|
963
|
-
/** Radius + height primitive parameters (capsule, cylinder). */
|
|
964
|
-
type RadiusHeightMeshParameters = {
|
|
965
|
-
/** Radius of the cap/cylinder cross-section. */
|
|
966
|
-
radius: number;
|
|
967
|
-
/** Length of the straight section between caps (capsule) or full height (cylinder). */
|
|
968
|
-
height: number;
|
|
969
|
-
};
|
|
970
|
-
/** Empty parameter set for `model` entities. */
|
|
971
|
-
type ModelMeshParameters = Record<string, never>;
|
|
972
|
-
/** Map from {@link EditableMeshObjectKind} to its parameter shape. */
|
|
973
|
-
type MeshGeometryParametersByKind = {
|
|
974
|
-
capsule: RadiusHeightMeshParameters;
|
|
975
|
-
cube: CubeMeshParameters;
|
|
976
|
-
cylinder: RadiusHeightMeshParameters;
|
|
977
|
-
model: ModelMeshParameters;
|
|
978
|
-
plane: PlaneMeshParameters;
|
|
979
|
-
sphere: RadiusMeshParameters;
|
|
980
|
-
};
|
|
981
|
-
type MeshGeometryParameters = MeshGeometryParametersByKind[EditableMeshObjectKind];
|
|
982
|
-
declare const DEFAULT_MESH_GEOMETRY_PARAMETERS: MeshGeometryParametersByKind;
|
|
983
|
-
/**
|
|
984
|
-
* Editable geometry parameters for primitive meshes (cube, sphere, plane,
|
|
985
|
-
* capsule, cylinder) and the placeholder for `model` entities. Holds the
|
|
986
|
-
* authoring values plus shadow casting/receiving flags. The mesh-geometry
|
|
987
|
-
* system rebuilds the underlying `BufferGeometry` when parameters change.
|
|
988
|
-
*
|
|
989
|
-
* @category Components
|
|
990
|
-
*/
|
|
991
|
-
declare class MeshGeometryComponent extends Component {
|
|
992
|
-
/** Primitive kind (`cube`, `sphere`, `plane`, `capsule`, `cylinder`) or `model` for loaded assets. */
|
|
993
|
-
readonly kind: EditableMeshObjectKind;
|
|
994
|
-
/** Three.js geometry class name (e.g. `"BoxGeometry"`, `"SphereGeometry"`). Derived from {@link kind}. */
|
|
995
|
-
readonly geometryType: string;
|
|
996
|
-
/** Editable parameters whose shape depends on {@link kind}. The mesh-geometry system rebuilds geometry when these change. */
|
|
997
|
-
parameters: MeshGeometryParameters;
|
|
998
|
-
/** Live three.js object whose geometry is being managed. `null` until the object is built. */
|
|
999
|
-
object: THREE.Object3D | null;
|
|
1000
|
-
/** Human-readable model name shown in the inspector for `model` entities; empty for primitives. */
|
|
1001
|
-
modelName: string;
|
|
1002
|
-
/** Whether the mesh casts shadows in the renderer. */
|
|
1003
|
-
castShadow: boolean;
|
|
1004
|
-
/** Whether the mesh receives shadows in the renderer. */
|
|
1005
|
-
receiveShadow: boolean;
|
|
1006
|
-
constructor(kind: EditableMeshObjectKind, object: THREE.Object3D | null, parameters?: Partial<MeshGeometryParameters>, options?: {
|
|
1007
|
-
modelName?: string;
|
|
1008
|
-
castShadow?: boolean;
|
|
1009
|
-
receiveShadow?: boolean;
|
|
1010
|
-
});
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
1077
|
/**
|
|
1014
1078
|
* References a GLTF/GLB asset loaded from `path`. The model loading system
|
|
1015
1079
|
* resolves the asset asynchronously and populates {@link ModelComponent.object}
|
|
@@ -1258,4 +1322,4 @@ declare class VideoComponent extends Component {
|
|
|
1258
1322
|
stop(): void;
|
|
1259
1323
|
}
|
|
1260
1324
|
|
|
1261
|
-
export {
|
|
1325
|
+
export { type RadiusMeshParameters as $, AnimationComponent as A, type ImageTargetReference as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, type InstanceTransform as F, InstancedMeshComponent as G, type InstancedMeshKind as H, ImageComponent as I, type LightValueState as J, type MaterialTypeValue as K, LightComponent as L, MaterialComponent as M, type MaterialValueState as N, MeshComponent as O, MeshGeometryComponent as P, type MeshGeometryParameters as Q, type MeshGeometryParametersByKind as R, ModelComponent as S, Name as T, Object3DRef as U, PhysicsComponent as V, type PhysicsState as W, type PlaneMeshParameters as X, Postprocessing as Y, type PostprocessingState as Z, type RadiusHeightMeshParameters as _, type AnimationComponentOptions as a, type RigidbodyState as a0, type RigidbodyType as a1, ScriptComponent as a2, type ScriptEntry as a3, Selectable as a4, SelectionTransformState as a5, SpriteComponent as a6, type TextureFilteringValue as a7, type TransformModeValue as a8, type TransformSpaceValue as a9, VideoComponent as aa, normalizePhysicsState as ab, type AnimationStateCallbacks as ac, AnimationStateMachine as ad, AnimationStateManager as ae, type StateMachine as af, AudioComponent as b, type CameraComponentOptions as c, type CameraProjection as d, type CameraRuntimeType as e, type ColliderShape as f, type ColliderState as g, type CubeMeshParameters as h, DEFAULT_ENVIRONMENT_STATE as i, DEFAULT_INSTANCED_MESH_PARAMETERS as j, DEFAULT_INSTANCE_TRANSFORM as k, DEFAULT_MESH_GEOMETRY_PARAMETERS as l, DEFAULT_PHYSICS_STATE as m, DEFAULT_POSTPROCESSING_STATE as n, DEFAULT_RIGIDBODY_STATE as o, EntityType as p, Environment as q, type EnvironmentFogState as r, type EnvironmentFogType as s, type EnvironmentGradientEffect as t, type EnvironmentSkyboxState as u, type EnvironmentSkyboxType as v, type EnvironmentState as w, ImageTarget as x, ImageTargetAnchor as y, type ImageTargetAnchorOptions as z };
|