@relu-interactives/spatial-ecs 0.2.8 → 0.2.9

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.js CHANGED
@@ -1,5 +1,5 @@
1
- import { MeshGeometrySystem, InstancedMeshSystem, EnvironmentSyncSystem, PostprocessingSyncSystem, LightSyncSystem, MaterialSyncSystem, PhysicsSyncSystem, AnimationSystem, AudioSystem, VideoSystem, CameraSyncSystem, TransformSyncSystem, ObjectVisibilitySystem, RenderSystem } from './chunk-TVBWYIGY.js';
2
- export { AnimationSystem, AudioSystem, Behaviour, CameraSyncSystem, EnvironmentSyncSystem, InputSystem, InstancedMeshSystem, KeyboardKeys, LightSyncSystem, MaterialSyncSystem, MeshGeometrySystem, ObjectVisibilitySystem, PhysicsSyncSystem, PostprocessingSyncSystem, RenderSystem, ScriptBehaviourSystem, TransformSyncSystem, VideoSystem } from './chunk-TVBWYIGY.js';
1
+ import { MeshGeometrySystem, InstancedMeshSystem, EnvironmentSyncSystem, PostprocessingSyncSystem, LightSyncSystem, MaterialSyncSystem, PhysicsSyncSystem, AnimationSystem, AudioSystem, VideoSystem, CameraSyncSystem, TransformSyncSystem, ObjectVisibilitySystem, RenderSystem } from './chunk-SABZQFSA.js';
2
+ export { AnimationSystem, AudioSystem, Behaviour, CameraSyncSystem, EnvironmentSyncSystem, InputSystem, InstancedMeshSystem, KeyboardKeys, LightSyncSystem, MaterialSyncSystem, MeshGeometrySystem, ObjectVisibilitySystem, PhysicsSyncSystem, PostprocessingSyncSystem, RenderSystem, ScriptBehaviourSystem, TransformSyncSystem, VideoSystem } from './chunk-SABZQFSA.js';
3
3
  import { registerDefaultFactories } from './chunk-LE6ARNYQ.js';
4
4
  export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstanceSlotComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVideoComponent, registerDefaultComponentFactories, registerDefaultFactories } from './chunk-LE6ARNYQ.js';
5
5
  import { ObjectManagementSystem, applyTransform } from './chunk-ODCWJHPS.js';
@@ -4276,6 +4276,10 @@ var _InstancedMeshSystem = class _InstancedMeshSystem {
4276
4276
  this.loadingSignatures.delete(entityId);
4277
4277
  this.modelMeshEntries.delete(entityId);
4278
4278
  }
4279
+ if (instanceCount === 0) {
4280
+ this.geometrySignatures.set(entityId, geometrySignature);
4281
+ continue;
4282
+ }
4279
4283
  if (comp.meshKind === "model") {
4280
4284
  if (comp.modelPath && !this.loadingSignatures.has(entityId)) {
4281
4285
  this.loadingSignatures.set(entityId, geometrySignature);
@@ -4360,7 +4364,7 @@ var _InstancedMeshSystem = class _InstancedMeshSystem {
4360
4364
  }
4361
4365
  continue;
4362
4366
  }
4363
- const count = Math.max(1, instanceCount);
4367
+ const count = instanceCount;
4364
4368
  const geometry = buildGeometry(comp);
4365
4369
  const material = new THREE13__namespace.MeshStandardMaterial({ color: "#ffffff" });
4366
4370
  const instancedMesh = new THREE13__namespace.InstancedMesh(geometry, material, count);