@relu-interactives/spatial-ecs 0.2.2 → 0.2.3
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/README.md +30 -99
- package/dist/{System-rXAmagXA.d.cts → System-BTyYvKVH.d.cts} +2 -0
- package/dist/{System-rXAmagXA.d.ts → System-BTyYvKVH.d.ts} +2 -0
- package/dist/{Video-ChKV1UI7.d.ts → Video-BWhbvVPg.d.ts} +1 -1
- package/dist/{Video-CDemv74U.d.cts → Video-D2H5H-K3.d.cts} +1 -1
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/factories/index.d.cts +2 -2
- package/dist/factories/index.d.ts +2 -2
- package/dist/{index-BZUOKeTO.d.ts → index-Dm6zF1MY.d.ts} +2 -2
- package/dist/{index-B4-YyUNR.d.cts → index-KdEzEZox.d.cts} +2 -2
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/systems/index.d.cts +2 -2
- package/dist/systems/index.d.ts +2 -2
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/worldSnapshotUtils.d.cts +1 -1
- package/dist/worldSnapshotUtils.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-BTyYvKVH.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-BTyYvKVH.cjs';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
|
-
import { P as Object3DRef } from './Video-
|
|
5
|
-
export { a7 as AnimationStateCallbacks, a8 as AnimationStateMachine, a9 as AnimationStateManager, aa as StateMachine } from './Video-
|
|
6
|
-
export { i as CoreComponents } from './index-
|
|
4
|
+
import { P as Object3DRef } from './Video-D2H5H-K3.cjs';
|
|
5
|
+
export { a7 as AnimationStateCallbacks, a8 as AnimationStateMachine, a9 as AnimationStateManager, aa as StateMachine } from './Video-D2H5H-K3.cjs';
|
|
6
|
+
export { i as CoreComponents } from './index-KdEzEZox.cjs';
|
|
7
7
|
export { AnimationSystem, AudioSystem, CameraSyncSystem, EnvironmentSyncSystem, LightSyncSystem, MaterialSyncSystem, MeshGeometrySystem, ObjectVisibilitySystem, PhysicsSyncSystem, PostprocessingSyncSystem, ScriptBehaviourSystem, SelectionContext, VideoSystem } from './systems/index.cjs';
|
|
8
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';
|
|
9
9
|
import '@dimforge/rapier3d-compat';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-BTyYvKVH.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-BTyYvKVH.js';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
|
-
import { P as Object3DRef } from './Video-
|
|
5
|
-
export { a7 as AnimationStateCallbacks, a8 as AnimationStateMachine, a9 as AnimationStateManager, aa as StateMachine } from './Video-
|
|
6
|
-
export { i as CoreComponents } from './index-
|
|
4
|
+
import { P as Object3DRef } from './Video-BWhbvVPg.js';
|
|
5
|
+
export { a7 as AnimationStateCallbacks, a8 as AnimationStateMachine, a9 as AnimationStateManager, aa as StateMachine } from './Video-BWhbvVPg.js';
|
|
6
|
+
export { i as CoreComponents } from './index-Dm6zF1MY.js';
|
|
7
7
|
export { AnimationSystem, AudioSystem, CameraSyncSystem, EnvironmentSyncSystem, LightSyncSystem, MaterialSyncSystem, MeshGeometrySystem, ObjectVisibilitySystem, PhysicsSyncSystem, PostprocessingSyncSystem, ScriptBehaviourSystem, SelectionContext, VideoSystem } from './systems/index.js';
|
|
8
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';
|
|
9
9
|
import '@dimforge/rapier3d-compat';
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ var _World = class _World {
|
|
|
21
21
|
this.storeListeners = /* @__PURE__ */ new Set();
|
|
22
22
|
this.components = /* @__PURE__ */ new Map();
|
|
23
23
|
this.inputSystem = null;
|
|
24
|
+
this.objectManagementSystem = null;
|
|
24
25
|
this.rapierModule = null;
|
|
25
26
|
this.rapierModulePromise = null;
|
|
26
27
|
this.physicsWorld = null;
|
|
@@ -398,6 +399,7 @@ var _World = class _World {
|
|
|
398
399
|
);
|
|
399
400
|
}
|
|
400
401
|
this.isEditor = isEditor ?? false;
|
|
402
|
+
this.objectManagementSystem = objectManagementSystem;
|
|
401
403
|
return {
|
|
402
404
|
objectManagementSystem,
|
|
403
405
|
transformSyncSystem,
|
|
@@ -548,6 +550,14 @@ var _World = class _World {
|
|
|
548
550
|
}
|
|
549
551
|
return this.toEntityView(entityId);
|
|
550
552
|
}
|
|
553
|
+
getObjectManagementSystem() {
|
|
554
|
+
if (this.objectManagementSystem) return this.objectManagementSystem;
|
|
555
|
+
const objectManagementSystem = this.systems.find(
|
|
556
|
+
(system) => system.constructor.name === "ObjectManagementSystem"
|
|
557
|
+
);
|
|
558
|
+
this.objectManagementSystem = objectManagementSystem;
|
|
559
|
+
return this.objectManagementSystem;
|
|
560
|
+
}
|
|
551
561
|
/**
|
|
552
562
|
* Cast a ray from `origin` along `direction` and return every intersected
|
|
553
563
|
* entity-bound mesh, sorted by distance. Each result is a standard
|