@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
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { E as EcsSystem, C as Component, W as WorldEntityView, T as TransformComponent, b as World, c as ComponentClass, d as ParentLookup, e as EcsEntityKind, O as ObjectManagementSystem } from './System-
|
|
2
|
-
export { A as AssetInput, f as CheckboxInput, g as ColorInput, h as ComponentFactory, i as ComponentInput, j as ComponentKind, D as DropdownInput, k as DropdownOption, l as EcsComponentFactoryKind, m as EcsEntityEditorKind, n as EntityId, o as EntityInput, F as FloatInput, I as InputSystem, p as IntersectionResult, K as KeyboardKey, q as KeyboardKeys, M as MouseButton, R as RenderSystem, S as SelectionListener, r as SliderInput, s as TextInput, t as ToggleInput, u as TransformSyncSystem, v as Vec3, w as Vector2Input, x as Vector3Input } from './System-
|
|
1
|
+
import { E as EcsSystem, C as Component, W as WorldEntityView, T as TransformComponent, b as World, c as ComponentClass, d as ParentLookup, e as EcsEntityKind, O as ObjectManagementSystem } from './System-CIiWteft.cjs';
|
|
2
|
+
export { A as AssetInput, f as CheckboxInput, g as ColorInput, h as ComponentFactory, i as ComponentInput, j as ComponentKind, D as DropdownInput, k as DropdownOption, l as EcsComponentFactoryKind, m as EcsEntityEditorKind, n as EntityId, o as EntityInput, F as FloatInput, I as InputSystem, p as IntersectionResult, K as KeyboardKey, q as KeyboardKeys, M as MouseButton, R as RenderSystem, S as SelectionListener, r as SliderInput, s as TextInput, t as ToggleInput, u as TransformSyncSystem, v as Vec3, w as Vector2Input, x as Vector3Input } from './System-CIiWteft.cjs';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
6
|
-
export { i as CoreComponents } from './index-
|
|
7
|
-
export { AnimationSystem, AudioSystem, CameraSyncSystem, EnvironmentSyncSystem, LightSyncSystem, MaterialSyncSystem, MeshGeometrySystem, ObjectVisibilitySystem, PhysicsSyncSystem, PostprocessingSyncSystem, ScriptBehaviourSystem, SelectionContext, VideoSystem } from './systems/index.cjs';
|
|
8
|
-
export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVideoComponent, registerDefaultComponentFactories, registerDefaultFactories } from './factories/index.cjs';
|
|
4
|
+
import { U as Object3DRef } from './Video-ChVFs9Tl.cjs';
|
|
5
|
+
export { ac as AnimationStateCallbacks, ad as AnimationStateMachine, ae as AnimationStateManager, af as StateMachine } from './Video-ChVFs9Tl.cjs';
|
|
6
|
+
export { i as CoreComponents } from './index-D1I5L7bA.cjs';
|
|
7
|
+
export { AnimationSystem, AudioSystem, CameraSyncSystem, EnvironmentSyncSystem, InstancedMeshSystem, LightSyncSystem, MaterialSyncSystem, MeshGeometrySystem, ObjectVisibilitySystem, PhysicsSyncSystem, PostprocessingSyncSystem, ScriptBehaviourSystem, SelectionContext, VideoSystem } from './systems/index.cjs';
|
|
8
|
+
export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVideoComponent, registerDefaultComponentFactories, registerDefaultFactories } from './factories/index.cjs';
|
|
9
9
|
import '@dimforge/rapier3d-compat';
|
|
10
10
|
|
|
11
11
|
interface CustomEcsSystem extends EcsSystem {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { E as EcsSystem, C as Component, W as WorldEntityView, T as TransformComponent, b as World, c as ComponentClass, d as ParentLookup, e as EcsEntityKind, O as ObjectManagementSystem } from './System-
|
|
2
|
-
export { A as AssetInput, f as CheckboxInput, g as ColorInput, h as ComponentFactory, i as ComponentInput, j as ComponentKind, D as DropdownInput, k as DropdownOption, l as EcsComponentFactoryKind, m as EcsEntityEditorKind, n as EntityId, o as EntityInput, F as FloatInput, I as InputSystem, p as IntersectionResult, K as KeyboardKey, q as KeyboardKeys, M as MouseButton, R as RenderSystem, S as SelectionListener, r as SliderInput, s as TextInput, t as ToggleInput, u as TransformSyncSystem, v as Vec3, w as Vector2Input, x as Vector3Input } from './System-
|
|
1
|
+
import { E as EcsSystem, C as Component, W as WorldEntityView, T as TransformComponent, b as World, c as ComponentClass, d as ParentLookup, e as EcsEntityKind, O as ObjectManagementSystem } from './System-CIiWteft.js';
|
|
2
|
+
export { A as AssetInput, f as CheckboxInput, g as ColorInput, h as ComponentFactory, i as ComponentInput, j as ComponentKind, D as DropdownInput, k as DropdownOption, l as EcsComponentFactoryKind, m as EcsEntityEditorKind, n as EntityId, o as EntityInput, F as FloatInput, I as InputSystem, p as IntersectionResult, K as KeyboardKey, q as KeyboardKeys, M as MouseButton, R as RenderSystem, S as SelectionListener, r as SliderInput, s as TextInput, t as ToggleInput, u as TransformSyncSystem, v as Vec3, w as Vector2Input, x as Vector3Input } from './System-CIiWteft.js';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
6
|
-
export { i as CoreComponents } from './index-
|
|
7
|
-
export { AnimationSystem, AudioSystem, CameraSyncSystem, EnvironmentSyncSystem, LightSyncSystem, MaterialSyncSystem, MeshGeometrySystem, ObjectVisibilitySystem, PhysicsSyncSystem, PostprocessingSyncSystem, ScriptBehaviourSystem, SelectionContext, VideoSystem } from './systems/index.js';
|
|
8
|
-
export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVideoComponent, registerDefaultComponentFactories, registerDefaultFactories } from './factories/index.js';
|
|
4
|
+
import { U as Object3DRef } from './Video-DCMCLInA.js';
|
|
5
|
+
export { ac as AnimationStateCallbacks, ad as AnimationStateMachine, ae as AnimationStateManager, af as StateMachine } from './Video-DCMCLInA.js';
|
|
6
|
+
export { i as CoreComponents } from './index-DGZDgt3p.js';
|
|
7
|
+
export { AnimationSystem, AudioSystem, CameraSyncSystem, EnvironmentSyncSystem, InstancedMeshSystem, LightSyncSystem, MaterialSyncSystem, MeshGeometrySystem, ObjectVisibilitySystem, PhysicsSyncSystem, PostprocessingSyncSystem, ScriptBehaviourSystem, SelectionContext, VideoSystem } from './systems/index.js';
|
|
8
|
+
export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVideoComponent, registerDefaultComponentFactories, registerDefaultFactories } from './factories/index.js';
|
|
9
9
|
import '@dimforge/rapier3d-compat';
|
|
10
10
|
|
|
11
11
|
interface CustomEcsSystem extends EcsSystem {
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { MeshGeometrySystem, EnvironmentSyncSystem, PostprocessingSyncSystem, LightSyncSystem, MaterialSyncSystem, PhysicsSyncSystem, AnimationSystem, AudioSystem, VideoSystem, CameraSyncSystem, TransformSyncSystem, ObjectVisibilitySystem, RenderSystem } from './chunk-
|
|
2
|
-
export { AnimationSystem, AudioSystem, Behaviour, CameraSyncSystem, EnvironmentSyncSystem, InputSystem, KeyboardKeys, LightSyncSystem, MaterialSyncSystem, MeshGeometrySystem, ObjectVisibilitySystem, PhysicsSyncSystem, PostprocessingSyncSystem, RenderSystem, ScriptBehaviourSystem, TransformSyncSystem, VideoSystem } from './chunk-
|
|
3
|
-
import { registerDefaultFactories } from './chunk-
|
|
4
|
-
export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVideoComponent, registerDefaultComponentFactories, registerDefaultFactories } from './chunk-
|
|
5
|
-
import { ObjectManagementSystem, applyTransform } from './chunk-
|
|
6
|
-
export { ObjectManagementSystem } from './chunk-
|
|
7
|
-
import { SelectionTransformState, Object3DRef, Name, EntityType, ScriptComponent, AnimationComponent, TransformComponent, ModelComponent, ImageComponent, SpriteComponent, VideoComponent, AudioComponent, CameraComponent, Environment, Postprocessing, ImageTarget, LightComponent, MaterialComponent, MeshGeometryComponent, Selectable, PhysicsComponent } from './chunk-
|
|
8
|
-
export { AnimationStateMachine, AnimationStateManager, components_exports as CoreComponents } from './chunk-
|
|
1
|
+
import { MeshGeometrySystem, InstancedMeshSystem, EnvironmentSyncSystem, PostprocessingSyncSystem, LightSyncSystem, MaterialSyncSystem, PhysicsSyncSystem, AnimationSystem, AudioSystem, VideoSystem, CameraSyncSystem, TransformSyncSystem, ObjectVisibilitySystem, RenderSystem } from './chunk-RXCUHGRB.js';
|
|
2
|
+
export { AnimationSystem, AudioSystem, Behaviour, CameraSyncSystem, EnvironmentSyncSystem, InputSystem, InstancedMeshSystem, KeyboardKeys, LightSyncSystem, MaterialSyncSystem, MeshGeometrySystem, ObjectVisibilitySystem, PhysicsSyncSystem, PostprocessingSyncSystem, RenderSystem, ScriptBehaviourSystem, TransformSyncSystem, VideoSystem } from './chunk-RXCUHGRB.js';
|
|
3
|
+
import { registerDefaultFactories } from './chunk-4A66FSFT.js';
|
|
4
|
+
export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVideoComponent, registerDefaultComponentFactories, registerDefaultFactories } from './chunk-4A66FSFT.js';
|
|
5
|
+
import { ObjectManagementSystem, applyTransform } from './chunk-CRP3W2GK.js';
|
|
6
|
+
export { ObjectManagementSystem } from './chunk-CRP3W2GK.js';
|
|
7
|
+
import { SelectionTransformState, Object3DRef, Name, EntityType, ScriptComponent, AnimationComponent, TransformComponent, ModelComponent, ImageComponent, SpriteComponent, VideoComponent, AudioComponent, CameraComponent, Environment, Postprocessing, ImageTarget, LightComponent, MaterialComponent, MeshGeometryComponent, Selectable, PhysicsComponent, InstancedMeshComponent } from './chunk-KRZLEPRI.js';
|
|
8
|
+
export { AnimationStateMachine, AnimationStateManager, components_exports as CoreComponents } from './chunk-KRZLEPRI.js';
|
|
9
9
|
import './chunk-QHILSPT4.js';
|
|
10
|
-
import { normalizeDebugValue, DEBUG_CHANGE_IGNORED_SYSTEMS, cloneHistoryValue } from './chunk-
|
|
10
|
+
import { normalizeDebugValue, DEBUG_CHANGE_IGNORED_SYSTEMS, cloneHistoryValue } from './chunk-NB6I5JJN.js';
|
|
11
11
|
import { __name } from './chunk-OY7ZODZP.js';
|
|
12
12
|
export { Component } from './chunk-OY7ZODZP.js';
|
|
13
13
|
import * as THREE from 'three';
|
|
@@ -348,6 +348,7 @@ var _World = class _World {
|
|
|
348
348
|
isEditor ?? false
|
|
349
349
|
);
|
|
350
350
|
const meshGeometrySystem = new MeshGeometrySystem();
|
|
351
|
+
const instancedMeshSystem = new InstancedMeshSystem();
|
|
351
352
|
const environmentSyncSystem = this.featureFlags.supportSkybox ? new EnvironmentSyncSystem(this.scene) : null;
|
|
352
353
|
const postprocessingSyncSystem = this.featureFlags.supportPostprocessing ? new PostprocessingSyncSystem(this.renderer, this.scene, this.camera) : null;
|
|
353
354
|
const lightSyncSystem = new LightSyncSystem();
|
|
@@ -370,7 +371,8 @@ var _World = class _World {
|
|
|
370
371
|
this.inputSystem = null;
|
|
371
372
|
const coreSystems = [
|
|
372
373
|
objectManagementSystem,
|
|
373
|
-
meshGeometrySystem
|
|
374
|
+
meshGeometrySystem,
|
|
375
|
+
instancedMeshSystem
|
|
374
376
|
];
|
|
375
377
|
if (environmentSyncSystem) {
|
|
376
378
|
coreSystems.push(environmentSyncSystem);
|
|
@@ -927,7 +929,8 @@ function buildComponentValueMaps(snapshot) {
|
|
|
927
929
|
physicsValues: readByComponent(snapshot.components, "PhysicsComponent"),
|
|
928
930
|
animationValues: readByComponent(snapshot.components, "AnimationComponent"),
|
|
929
931
|
imageTargetAnchorValues: readByComponent(snapshot.components, "ImageTargetAnchor"),
|
|
930
|
-
scriptValues: readByComponent(snapshot.components, "ScriptComponent")
|
|
932
|
+
scriptValues: readByComponent(snapshot.components, "ScriptComponent"),
|
|
933
|
+
instancedMeshValues: readByComponent(snapshot.components, "InstancedMeshComponent")
|
|
931
934
|
};
|
|
932
935
|
}
|
|
933
936
|
__name(buildComponentValueMaps, "buildComponentValueMaps");
|
|
@@ -1524,6 +1527,29 @@ function restoreComponentState(world, objectManagementSystem, targetEntityId, so
|
|
|
1524
1527
|
sourceAnimation
|
|
1525
1528
|
);
|
|
1526
1529
|
}
|
|
1530
|
+
const sourceInstancedMesh = asRecord(values.instancedMeshValues.get(sourceEntityId));
|
|
1531
|
+
if (sourceInstancedMesh) {
|
|
1532
|
+
const imComponent = world.getComponent(targetEntityId, InstancedMeshComponent);
|
|
1533
|
+
if (imComponent) {
|
|
1534
|
+
if (typeof sourceInstancedMesh.meshKind === "string") {
|
|
1535
|
+
imComponent.meshKind = sourceInstancedMesh.meshKind;
|
|
1536
|
+
}
|
|
1537
|
+
const parameters = asRecord(sourceInstancedMesh.meshParameters);
|
|
1538
|
+
if (parameters) {
|
|
1539
|
+
imComponent.meshParameters = parameters;
|
|
1540
|
+
}
|
|
1541
|
+
if (typeof sourceInstancedMesh.castShadow === "boolean") {
|
|
1542
|
+
imComponent.castShadow = sourceInstancedMesh.castShadow;
|
|
1543
|
+
}
|
|
1544
|
+
if (typeof sourceInstancedMesh.receiveShadow === "boolean") {
|
|
1545
|
+
imComponent.receiveShadow = sourceInstancedMesh.receiveShadow;
|
|
1546
|
+
}
|
|
1547
|
+
if (Array.isArray(sourceInstancedMesh.instances)) {
|
|
1548
|
+
imComponent.instances = sourceInstancedMesh.instances;
|
|
1549
|
+
}
|
|
1550
|
+
imComponent.instancedMesh = null;
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1527
1553
|
}
|
|
1528
1554
|
__name(restoreComponentState, "restoreComponentState");
|
|
1529
1555
|
|
|
@@ -1546,7 +1572,8 @@ var HYDRATABLE_ENTITY_KINDS = /* @__PURE__ */ new Set([
|
|
|
1546
1572
|
"directionalLight",
|
|
1547
1573
|
"pointLight",
|
|
1548
1574
|
"spotLight",
|
|
1549
|
-
"areaLight"
|
|
1575
|
+
"areaLight",
|
|
1576
|
+
"instancedMesh"
|
|
1550
1577
|
]);
|
|
1551
1578
|
|
|
1552
1579
|
// core/hydration/hydrateWorld.ts
|
|
@@ -1623,6 +1650,18 @@ function buildEntityCreationPayload(sourceEntityId, kind, componentValues) {
|
|
|
1623
1650
|
};
|
|
1624
1651
|
}
|
|
1625
1652
|
}
|
|
1653
|
+
if (kind === "instancedMesh") {
|
|
1654
|
+
const im = asRecord(componentValues.instancedMeshValues.get(sourceEntityId));
|
|
1655
|
+
if (im) {
|
|
1656
|
+
payload.options = {
|
|
1657
|
+
meshKind: typeof im.meshKind === "string" ? im.meshKind : "cube",
|
|
1658
|
+
meshParameters: asRecord(im.meshParameters) ?? void 0,
|
|
1659
|
+
castShadow: typeof im.castShadow === "boolean" ? im.castShadow : false,
|
|
1660
|
+
receiveShadow: typeof im.receiveShadow === "boolean" ? im.receiveShadow : false,
|
|
1661
|
+
instances: Array.isArray(im.instances) ? im.instances : void 0
|
|
1662
|
+
};
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1626
1665
|
return payload;
|
|
1627
1666
|
}
|
|
1628
1667
|
__name(buildEntityCreationPayload, "buildEntityCreationPayload");
|