@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/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-rXAmagXA.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-rXAmagXA.cjs';
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-CDemv74U.cjs';
5
- export { a7 as AnimationStateCallbacks, a8 as AnimationStateMachine, a9 as AnimationStateManager, aa as StateMachine } from './Video-CDemv74U.cjs';
6
- export { i as CoreComponents } from './index-B4-YyUNR.cjs';
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-rXAmagXA.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-rXAmagXA.js';
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-ChKV1UI7.js';
5
- export { a7 as AnimationStateCallbacks, a8 as AnimationStateMachine, a9 as AnimationStateManager, aa as StateMachine } from './Video-ChKV1UI7.js';
6
- export { i as CoreComponents } from './index-BZUOKeTO.js';
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