@relu-interactives/spatial-ecs 0.2.23 → 0.2.25

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.
Files changed (40) hide show
  1. package/dist/{Video-ppAXaKt0.d.cts → Video-AIQYTAAr.d.cts} +15 -3
  2. package/dist/{Video-C1IOat7L.d.ts → Video-DlZ4G9ig.d.ts} +15 -3
  3. package/dist/{chunk-7BEZBIVB.js → chunk-3P3ZBP7K.js} +106 -76
  4. package/dist/chunk-3P3ZBP7K.js.map +1 -0
  5. package/dist/{chunk-JHCPRVBC.js → chunk-J6736FFO.js} +16 -6
  6. package/dist/chunk-J6736FFO.js.map +1 -0
  7. package/dist/{chunk-ZXGHKX7N.js → chunk-OWQSESTO.js} +12 -2
  8. package/dist/chunk-OWQSESTO.js.map +1 -0
  9. package/dist/{chunk-52CHDPRQ.js → chunk-RJ4J5UEX.js} +4 -4
  10. package/dist/{chunk-52CHDPRQ.js.map → chunk-RJ4J5UEX.js.map} +1 -1
  11. package/dist/{chunk-WKGCC7YL.js → chunk-XFD74BQL.js} +3 -3
  12. package/dist/{chunk-WKGCC7YL.js.map → chunk-XFD74BQL.js.map} +1 -1
  13. package/dist/components/index.cjs +12 -2
  14. package/dist/components/index.cjs.map +1 -1
  15. package/dist/components/index.d.cts +2 -2
  16. package/dist/components/index.d.ts +2 -2
  17. package/dist/components/index.js +1 -1
  18. package/dist/docs/guide/systems/physics-sync-system.md +1 -1
  19. package/dist/factories/index.cjs +11 -2
  20. package/dist/factories/index.cjs.map +1 -1
  21. package/dist/factories/index.d.cts +1 -1
  22. package/dist/factories/index.d.ts +1 -1
  23. package/dist/factories/index.js +3 -3
  24. package/dist/{index-DdiWu1b6.d.ts → index-BwiRJNIT.d.ts} +3 -2
  25. package/dist/{index-Cu2Pt7wN.d.cts → index-Gr8aCPRM.d.cts} +3 -2
  26. package/dist/index.cjs +125 -75
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +3 -3
  29. package/dist/index.d.ts +3 -3
  30. package/dist/index.js +9 -9
  31. package/dist/systems/index.cjs +113 -74
  32. package/dist/systems/index.cjs.map +1 -1
  33. package/dist/systems/index.js +3 -3
  34. package/dist/worldSnapshotUtils.cjs +10 -0
  35. package/dist/worldSnapshotUtils.cjs.map +1 -1
  36. package/dist/worldSnapshotUtils.js +1 -1
  37. package/package.json +1 -1
  38. package/dist/chunk-7BEZBIVB.js.map +0 -1
  39. package/dist/chunk-JHCPRVBC.js.map +0 -1
  40. package/dist/chunk-ZXGHKX7N.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { A as AnimationComponent, b as AudioComponent, c as CameraComponentOptions, C as CameraComponent, S as RigidbodyState, g as ColliderState, P as PhysicsComponent, n as EntityType, I as ImageComponent, p as ImageTargetAnchor, o as ImageTarget, L as LightComponent, M as MaterialComponent, z as MeshComponent, B as MeshGeometryComponent, H as ModelComponent, N as Name, O as Object3DRef, V as ScriptEntry, U as ScriptComponent, X as ScriptObjectComponentInput, W as ScriptObjectComponent, Z as Selectable, _ as SelectionTransformState, $ as SpriteComponent, v as InstancedMeshKind, F as MeshGeometryParameters, u as InstancedMeshComponent, s as InstanceSlotComponent, a3 as VideoComponent } from '../Video-ppAXaKt0.cjs';
1
+ import { A as AnimationComponent, b as AudioComponent, c as CameraComponentOptions, C as CameraComponent, S as RigidbodyState, g as ColliderState, P as PhysicsComponent, n as EntityType, I as ImageComponent, p as ImageTargetAnchor, o as ImageTarget, L as LightComponent, M as MaterialComponent, z as MeshComponent, B as MeshGeometryComponent, H as ModelComponent, N as Name, O as Object3DRef, V as ScriptEntry, U as ScriptComponent, X as ScriptObjectComponentInput, W as ScriptObjectComponent, Z as Selectable, _ as SelectionTransformState, $ as SpriteComponent, v as InstancedMeshKind, F as MeshGeometryParameters, u as InstancedMeshComponent, s as InstanceSlotComponent, a3 as VideoComponent } from '../Video-AIQYTAAr.cjs';
2
2
  import { l as World, g as EnvironmentState, E as Environment, P as ParentId, i as PostprocessingState, h as Postprocessing, T as TransformComponent, O as ObjectManagementSystem } from '../System-CYWZ_Zx5.cjs';
3
3
  import * as THREE from 'three';
4
4
  import '@dimforge/rapier3d-compat';
@@ -1,4 +1,4 @@
1
- import { A as AnimationComponent, b as AudioComponent, c as CameraComponentOptions, C as CameraComponent, S as RigidbodyState, g as ColliderState, P as PhysicsComponent, n as EntityType, I as ImageComponent, p as ImageTargetAnchor, o as ImageTarget, L as LightComponent, M as MaterialComponent, z as MeshComponent, B as MeshGeometryComponent, H as ModelComponent, N as Name, O as Object3DRef, V as ScriptEntry, U as ScriptComponent, X as ScriptObjectComponentInput, W as ScriptObjectComponent, Z as Selectable, _ as SelectionTransformState, $ as SpriteComponent, v as InstancedMeshKind, F as MeshGeometryParameters, u as InstancedMeshComponent, s as InstanceSlotComponent, a3 as VideoComponent } from '../Video-C1IOat7L.js';
1
+ import { A as AnimationComponent, b as AudioComponent, c as CameraComponentOptions, C as CameraComponent, S as RigidbodyState, g as ColliderState, P as PhysicsComponent, n as EntityType, I as ImageComponent, p as ImageTargetAnchor, o as ImageTarget, L as LightComponent, M as MaterialComponent, z as MeshComponent, B as MeshGeometryComponent, H as ModelComponent, N as Name, O as Object3DRef, V as ScriptEntry, U as ScriptComponent, X as ScriptObjectComponentInput, W as ScriptObjectComponent, Z as Selectable, _ as SelectionTransformState, $ as SpriteComponent, v as InstancedMeshKind, F as MeshGeometryParameters, u as InstancedMeshComponent, s as InstanceSlotComponent, a3 as VideoComponent } from '../Video-DlZ4G9ig.js';
2
2
  import { l as World, g as EnvironmentState, E as Environment, P as ParentId, i as PostprocessingState, h as Postprocessing, T as TransformComponent, O as ObjectManagementSystem } from '../System-CYWZ_Zx5.js';
3
3
  import * as THREE from 'three';
4
4
  import '@dimforge/rapier3d-compat';
@@ -1,6 +1,6 @@
1
- export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstanceSlotComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createScriptObjectComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVideoComponent, registerDefaultComponentFactories, registerDefaultFactories } from '../chunk-52CHDPRQ.js';
2
- import '../chunk-WKGCC7YL.js';
3
- import '../chunk-JHCPRVBC.js';
1
+ export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstanceSlotComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createScriptObjectComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVideoComponent, registerDefaultComponentFactories, registerDefaultFactories } from '../chunk-RJ4J5UEX.js';
2
+ import '../chunk-XFD74BQL.js';
3
+ import '../chunk-J6736FFO.js';
4
4
  import '../chunk-OY7ZODZP.js';
5
5
  //# sourceMappingURL=index.js.map
6
6
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { A as AnimationComponent, a as AnimationComponentOptions, b as AudioComponent, C as CameraComponent, c as CameraComponentOptions, d as CameraProjection, e as CameraRuntimeType, f as ColliderShape, g as ColliderState, h as CubeMeshParameters, D as DEFAULT_COLLIDER_STATE, i as DEFAULT_INSTANCED_MESH_PARAMETERS, j as DEFAULT_INSTANCE_TRANSFORM, k as DEFAULT_MESH_GEOMETRY_PARAMETERS, l as DEFAULT_PHYSICS_STATE, m as DEFAULT_RIGIDBODY_STATE, E as EditableMeshObjectKind, n as EntityType, I as ImageComponent, o as ImageTarget, p as ImageTargetAnchor, q as ImageTargetAnchorOptions, r as ImageTargetReference, s as InstanceSlotComponent, t as InstanceTransform, u as InstancedMeshComponent, v as InstancedMeshKind, L as LightComponent, w as LightValueState, M as MaterialComponent, x as MaterialTypeValue, y as MaterialValueState, z as MeshComponent, B as MeshGeometryComponent, F as MeshGeometryParameters, G as MeshGeometryParametersByKind, H as ModelComponent, N as Name, O as Object3DRef, P as PhysicsComponent, J as PhysicsState, K as PlaneMeshParameters, R as RadiusHeightMeshParameters, Q as RadiusMeshParameters, S as RigidbodyState, T as RigidbodyType, U as ScriptComponent, V as ScriptEntry, W as ScriptObjectComponent, X as ScriptObjectComponentInput, Y as ScriptObjectRuntimeState, Z as Selectable, _ as SelectionTransformState, $ as SpriteComponent, a0 as TextureFilteringValue, a1 as TransformModeValue, a2 as TransformSpaceValue, a3 as VideoComponent, a4 as defaultMaterialValue, a5 as normalizePhysicsState } from './Video-C1IOat7L.js';
1
+ import { A as AnimationComponent, a as AnimationComponentOptions, b as AudioComponent, C as CameraComponent, c as CameraComponentOptions, d as CameraProjection, e as CameraRuntimeType, f as ColliderShape, g as ColliderState, h as CubeMeshParameters, D as DEFAULT_COLLIDER_STATE, i as DEFAULT_INSTANCED_MESH_PARAMETERS, j as DEFAULT_INSTANCE_TRANSFORM, k as DEFAULT_MESH_GEOMETRY_PARAMETERS, l as DEFAULT_PHYSICS_STATE, m as DEFAULT_RIGIDBODY_STATE, E as EditableMeshObjectKind, n as EntityType, I as ImageComponent, o as ImageTarget, p as ImageTargetAnchor, q as ImageTargetAnchorOptions, r as ImageTargetReference, s as InstanceSlotComponent, t as InstanceTransform, u as InstancedMeshComponent, v as InstancedMeshKind, L as LightComponent, w as LightValueState, M as MaterialComponent, x as MaterialTypeValue, y as MaterialValueState, z as MeshComponent, B as MeshGeometryComponent, F as MeshGeometryParameters, G as MeshGeometryParametersByKind, H as ModelComponent, N as Name, O as Object3DRef, P as PhysicsComponent, J as PhysicsState, K as PlaneMeshParameters, R as RadiusHeightMeshParameters, Q as RadiusMeshParameters, S as RigidbodyState, T as RigidbodyType, U as ScriptComponent, V as ScriptEntry, W as ScriptObjectComponent, X as ScriptObjectComponentInput, Y as ScriptObjectRuntimeState, Z as Selectable, _ as SelectionTransformState, $ as SpriteComponent, a0 as TextureFilteringValue, a1 as TransformModeValue, a2 as TransformSpaceValue, a3 as VideoComponent, a4 as defaultMaterialValue, a5 as normalizePhysicsState, a6 as setPhysicsLiveRef } from './Video-DlZ4G9ig.js';
2
2
  import { C as Component, D as DEFAULT_ENVIRONMENT_STATE, a as DEFAULT_POSTPROCESSING_STATE, E as Environment, b as EnvironmentFogState, c as EnvironmentFogType, d as EnvironmentGradientEffect, e as EnvironmentSkyboxState, f as EnvironmentSkyboxType, g as EnvironmentState, P as ParentId, h as Postprocessing, i as PostprocessingState, T as TransformComponent, j as TransformData, V as Vec3 } from './System-CYWZ_Zx5.js';
3
3
 
4
4
  /**
@@ -147,8 +147,9 @@ declare const index_Vec3: typeof Vec3;
147
147
  declare const index_VideoComponent: typeof VideoComponent;
148
148
  declare const index_defaultMaterialValue: typeof defaultMaterialValue;
149
149
  declare const index_normalizePhysicsState: typeof normalizePhysicsState;
150
+ declare const index_setPhysicsLiveRef: typeof setPhysicsLiveRef;
150
151
  declare namespace index {
151
- export { index_AnimationComponent as AnimationComponent, index_AnimationComponentOptions as AnimationComponentOptions, index_AudioComponent as AudioComponent, index_CameraComponent as CameraComponent, index_CameraComponentOptions as CameraComponentOptions, index_CameraProjection as CameraProjection, index_CameraRuntimeType as CameraRuntimeType, index_ColliderShape as ColliderShape, index_ColliderState as ColliderState, index_CubeMeshParameters as CubeMeshParameters, index_DEFAULT_COLLIDER_STATE as DEFAULT_COLLIDER_STATE, index_DEFAULT_ENVIRONMENT_STATE as DEFAULT_ENVIRONMENT_STATE, index_DEFAULT_INSTANCED_MESH_PARAMETERS as DEFAULT_INSTANCED_MESH_PARAMETERS, index_DEFAULT_INSTANCE_TRANSFORM as DEFAULT_INSTANCE_TRANSFORM, index_DEFAULT_MESH_GEOMETRY_PARAMETERS as DEFAULT_MESH_GEOMETRY_PARAMETERS, index_DEFAULT_PHYSICS_STATE as DEFAULT_PHYSICS_STATE, index_DEFAULT_POSTPROCESSING_STATE as DEFAULT_POSTPROCESSING_STATE, index_DEFAULT_RIGIDBODY_STATE as DEFAULT_RIGIDBODY_STATE, index_EditableMeshObjectKind as EditableMeshObjectKind, index_EntityType as EntityType, index_Environment as Environment, index_EnvironmentFogState as EnvironmentFogState, index_EnvironmentFogType as EnvironmentFogType, index_EnvironmentGradientEffect as EnvironmentGradientEffect, index_EnvironmentSkyboxState as EnvironmentSkyboxState, index_EnvironmentSkyboxType as EnvironmentSkyboxType, index_EnvironmentState as EnvironmentState, index_ImageComponent as ImageComponent, index_ImageTarget as ImageTarget, index_ImageTargetAnchor as ImageTargetAnchor, index_ImageTargetAnchorOptions as ImageTargetAnchorOptions, index_ImageTargetReference as ImageTargetReference, index_InstanceSlotComponent as InstanceSlotComponent, index_InstanceTransform as InstanceTransform, index_InstancedMeshComponent as InstancedMeshComponent, index_InstancedMeshKind as InstancedMeshKind, index_LightComponent as LightComponent, index_LightValueState as LightValueState, index_MaterialComponent as MaterialComponent, index_MaterialTypeValue as MaterialTypeValue, index_MaterialValueState as MaterialValueState, index_MeshComponent as MeshComponent, index_MeshGeometryComponent as MeshGeometryComponent, index_MeshGeometryParameters as MeshGeometryParameters, index_MeshGeometryParametersByKind as MeshGeometryParametersByKind, index_ModelComponent as ModelComponent, index_Name as Name, index_Object3DRef as Object3DRef, index_ParentId as ParentId, index_PhysicsComponent as PhysicsComponent, index_PhysicsState as PhysicsState, index_PlaneMeshParameters as PlaneMeshParameters, index_Postprocessing as Postprocessing, index_PostprocessingState as PostprocessingState, index_PrefabInstance as PrefabInstance, index_PrefabNode as PrefabNode, index_RadiusHeightMeshParameters as RadiusHeightMeshParameters, index_RadiusMeshParameters as RadiusMeshParameters, index_RigidbodyState as RigidbodyState, index_RigidbodyType as RigidbodyType, index_ScriptComponent as ScriptComponent, index_ScriptEntry as ScriptEntry, index_ScriptObjectComponent as ScriptObjectComponent, index_ScriptObjectComponentInput as ScriptObjectComponentInput, index_ScriptObjectRuntimeState as ScriptObjectRuntimeState, index_Selectable as Selectable, index_SelectionTransformState as SelectionTransformState, index_SpriteComponent as SpriteComponent, index_TextureFilteringValue as TextureFilteringValue, index_TransformComponent as TransformComponent, index_TransformData as TransformData, index_TransformModeValue as TransformModeValue, index_TransformSpaceValue as TransformSpaceValue, index_Vec3 as Vec3, index_VideoComponent as VideoComponent, index_defaultMaterialValue as defaultMaterialValue, index_normalizePhysicsState as normalizePhysicsState };
152
+ export { index_AnimationComponent as AnimationComponent, index_AnimationComponentOptions as AnimationComponentOptions, index_AudioComponent as AudioComponent, index_CameraComponent as CameraComponent, index_CameraComponentOptions as CameraComponentOptions, index_CameraProjection as CameraProjection, index_CameraRuntimeType as CameraRuntimeType, index_ColliderShape as ColliderShape, index_ColliderState as ColliderState, index_CubeMeshParameters as CubeMeshParameters, index_DEFAULT_COLLIDER_STATE as DEFAULT_COLLIDER_STATE, index_DEFAULT_ENVIRONMENT_STATE as DEFAULT_ENVIRONMENT_STATE, index_DEFAULT_INSTANCED_MESH_PARAMETERS as DEFAULT_INSTANCED_MESH_PARAMETERS, index_DEFAULT_INSTANCE_TRANSFORM as DEFAULT_INSTANCE_TRANSFORM, index_DEFAULT_MESH_GEOMETRY_PARAMETERS as DEFAULT_MESH_GEOMETRY_PARAMETERS, index_DEFAULT_PHYSICS_STATE as DEFAULT_PHYSICS_STATE, index_DEFAULT_POSTPROCESSING_STATE as DEFAULT_POSTPROCESSING_STATE, index_DEFAULT_RIGIDBODY_STATE as DEFAULT_RIGIDBODY_STATE, index_EditableMeshObjectKind as EditableMeshObjectKind, index_EntityType as EntityType, index_Environment as Environment, index_EnvironmentFogState as EnvironmentFogState, index_EnvironmentFogType as EnvironmentFogType, index_EnvironmentGradientEffect as EnvironmentGradientEffect, index_EnvironmentSkyboxState as EnvironmentSkyboxState, index_EnvironmentSkyboxType as EnvironmentSkyboxType, index_EnvironmentState as EnvironmentState, index_ImageComponent as ImageComponent, index_ImageTarget as ImageTarget, index_ImageTargetAnchor as ImageTargetAnchor, index_ImageTargetAnchorOptions as ImageTargetAnchorOptions, index_ImageTargetReference as ImageTargetReference, index_InstanceSlotComponent as InstanceSlotComponent, index_InstanceTransform as InstanceTransform, index_InstancedMeshComponent as InstancedMeshComponent, index_InstancedMeshKind as InstancedMeshKind, index_LightComponent as LightComponent, index_LightValueState as LightValueState, index_MaterialComponent as MaterialComponent, index_MaterialTypeValue as MaterialTypeValue, index_MaterialValueState as MaterialValueState, index_MeshComponent as MeshComponent, index_MeshGeometryComponent as MeshGeometryComponent, index_MeshGeometryParameters as MeshGeometryParameters, index_MeshGeometryParametersByKind as MeshGeometryParametersByKind, index_ModelComponent as ModelComponent, index_Name as Name, index_Object3DRef as Object3DRef, index_ParentId as ParentId, index_PhysicsComponent as PhysicsComponent, index_PhysicsState as PhysicsState, index_PlaneMeshParameters as PlaneMeshParameters, index_Postprocessing as Postprocessing, index_PostprocessingState as PostprocessingState, index_PrefabInstance as PrefabInstance, index_PrefabNode as PrefabNode, index_RadiusHeightMeshParameters as RadiusHeightMeshParameters, index_RadiusMeshParameters as RadiusMeshParameters, index_RigidbodyState as RigidbodyState, index_RigidbodyType as RigidbodyType, index_ScriptComponent as ScriptComponent, index_ScriptEntry as ScriptEntry, index_ScriptObjectComponent as ScriptObjectComponent, index_ScriptObjectComponentInput as ScriptObjectComponentInput, index_ScriptObjectRuntimeState as ScriptObjectRuntimeState, index_Selectable as Selectable, index_SelectionTransformState as SelectionTransformState, index_SpriteComponent as SpriteComponent, index_TextureFilteringValue as TextureFilteringValue, index_TransformComponent as TransformComponent, index_TransformData as TransformData, index_TransformModeValue as TransformModeValue, index_TransformSpaceValue as TransformSpaceValue, index_Vec3 as Vec3, index_VideoComponent as VideoComponent, index_defaultMaterialValue as defaultMaterialValue, index_normalizePhysicsState as normalizePhysicsState, index_setPhysicsLiveRef as setPhysicsLiveRef };
152
153
  }
153
154
 
154
155
  export { PrefabInstance as P, PrefabNode as a, index as i };
@@ -1,4 +1,4 @@
1
- import { A as AnimationComponent, a as AnimationComponentOptions, b as AudioComponent, C as CameraComponent, c as CameraComponentOptions, d as CameraProjection, e as CameraRuntimeType, f as ColliderShape, g as ColliderState, h as CubeMeshParameters, D as DEFAULT_COLLIDER_STATE, i as DEFAULT_INSTANCED_MESH_PARAMETERS, j as DEFAULT_INSTANCE_TRANSFORM, k as DEFAULT_MESH_GEOMETRY_PARAMETERS, l as DEFAULT_PHYSICS_STATE, m as DEFAULT_RIGIDBODY_STATE, E as EditableMeshObjectKind, n as EntityType, I as ImageComponent, o as ImageTarget, p as ImageTargetAnchor, q as ImageTargetAnchorOptions, r as ImageTargetReference, s as InstanceSlotComponent, t as InstanceTransform, u as InstancedMeshComponent, v as InstancedMeshKind, L as LightComponent, w as LightValueState, M as MaterialComponent, x as MaterialTypeValue, y as MaterialValueState, z as MeshComponent, B as MeshGeometryComponent, F as MeshGeometryParameters, G as MeshGeometryParametersByKind, H as ModelComponent, N as Name, O as Object3DRef, P as PhysicsComponent, J as PhysicsState, K as PlaneMeshParameters, R as RadiusHeightMeshParameters, Q as RadiusMeshParameters, S as RigidbodyState, T as RigidbodyType, U as ScriptComponent, V as ScriptEntry, W as ScriptObjectComponent, X as ScriptObjectComponentInput, Y as ScriptObjectRuntimeState, Z as Selectable, _ as SelectionTransformState, $ as SpriteComponent, a0 as TextureFilteringValue, a1 as TransformModeValue, a2 as TransformSpaceValue, a3 as VideoComponent, a4 as defaultMaterialValue, a5 as normalizePhysicsState } from './Video-ppAXaKt0.cjs';
1
+ import { A as AnimationComponent, a as AnimationComponentOptions, b as AudioComponent, C as CameraComponent, c as CameraComponentOptions, d as CameraProjection, e as CameraRuntimeType, f as ColliderShape, g as ColliderState, h as CubeMeshParameters, D as DEFAULT_COLLIDER_STATE, i as DEFAULT_INSTANCED_MESH_PARAMETERS, j as DEFAULT_INSTANCE_TRANSFORM, k as DEFAULT_MESH_GEOMETRY_PARAMETERS, l as DEFAULT_PHYSICS_STATE, m as DEFAULT_RIGIDBODY_STATE, E as EditableMeshObjectKind, n as EntityType, I as ImageComponent, o as ImageTarget, p as ImageTargetAnchor, q as ImageTargetAnchorOptions, r as ImageTargetReference, s as InstanceSlotComponent, t as InstanceTransform, u as InstancedMeshComponent, v as InstancedMeshKind, L as LightComponent, w as LightValueState, M as MaterialComponent, x as MaterialTypeValue, y as MaterialValueState, z as MeshComponent, B as MeshGeometryComponent, F as MeshGeometryParameters, G as MeshGeometryParametersByKind, H as ModelComponent, N as Name, O as Object3DRef, P as PhysicsComponent, J as PhysicsState, K as PlaneMeshParameters, R as RadiusHeightMeshParameters, Q as RadiusMeshParameters, S as RigidbodyState, T as RigidbodyType, U as ScriptComponent, V as ScriptEntry, W as ScriptObjectComponent, X as ScriptObjectComponentInput, Y as ScriptObjectRuntimeState, Z as Selectable, _ as SelectionTransformState, $ as SpriteComponent, a0 as TextureFilteringValue, a1 as TransformModeValue, a2 as TransformSpaceValue, a3 as VideoComponent, a4 as defaultMaterialValue, a5 as normalizePhysicsState, a6 as setPhysicsLiveRef } from './Video-AIQYTAAr.cjs';
2
2
  import { C as Component, D as DEFAULT_ENVIRONMENT_STATE, a as DEFAULT_POSTPROCESSING_STATE, E as Environment, b as EnvironmentFogState, c as EnvironmentFogType, d as EnvironmentGradientEffect, e as EnvironmentSkyboxState, f as EnvironmentSkyboxType, g as EnvironmentState, P as ParentId, h as Postprocessing, i as PostprocessingState, T as TransformComponent, j as TransformData, V as Vec3 } from './System-CYWZ_Zx5.cjs';
3
3
 
4
4
  /**
@@ -147,8 +147,9 @@ declare const index_Vec3: typeof Vec3;
147
147
  declare const index_VideoComponent: typeof VideoComponent;
148
148
  declare const index_defaultMaterialValue: typeof defaultMaterialValue;
149
149
  declare const index_normalizePhysicsState: typeof normalizePhysicsState;
150
+ declare const index_setPhysicsLiveRef: typeof setPhysicsLiveRef;
150
151
  declare namespace index {
151
- export { index_AnimationComponent as AnimationComponent, index_AnimationComponentOptions as AnimationComponentOptions, index_AudioComponent as AudioComponent, index_CameraComponent as CameraComponent, index_CameraComponentOptions as CameraComponentOptions, index_CameraProjection as CameraProjection, index_CameraRuntimeType as CameraRuntimeType, index_ColliderShape as ColliderShape, index_ColliderState as ColliderState, index_CubeMeshParameters as CubeMeshParameters, index_DEFAULT_COLLIDER_STATE as DEFAULT_COLLIDER_STATE, index_DEFAULT_ENVIRONMENT_STATE as DEFAULT_ENVIRONMENT_STATE, index_DEFAULT_INSTANCED_MESH_PARAMETERS as DEFAULT_INSTANCED_MESH_PARAMETERS, index_DEFAULT_INSTANCE_TRANSFORM as DEFAULT_INSTANCE_TRANSFORM, index_DEFAULT_MESH_GEOMETRY_PARAMETERS as DEFAULT_MESH_GEOMETRY_PARAMETERS, index_DEFAULT_PHYSICS_STATE as DEFAULT_PHYSICS_STATE, index_DEFAULT_POSTPROCESSING_STATE as DEFAULT_POSTPROCESSING_STATE, index_DEFAULT_RIGIDBODY_STATE as DEFAULT_RIGIDBODY_STATE, index_EditableMeshObjectKind as EditableMeshObjectKind, index_EntityType as EntityType, index_Environment as Environment, index_EnvironmentFogState as EnvironmentFogState, index_EnvironmentFogType as EnvironmentFogType, index_EnvironmentGradientEffect as EnvironmentGradientEffect, index_EnvironmentSkyboxState as EnvironmentSkyboxState, index_EnvironmentSkyboxType as EnvironmentSkyboxType, index_EnvironmentState as EnvironmentState, index_ImageComponent as ImageComponent, index_ImageTarget as ImageTarget, index_ImageTargetAnchor as ImageTargetAnchor, index_ImageTargetAnchorOptions as ImageTargetAnchorOptions, index_ImageTargetReference as ImageTargetReference, index_InstanceSlotComponent as InstanceSlotComponent, index_InstanceTransform as InstanceTransform, index_InstancedMeshComponent as InstancedMeshComponent, index_InstancedMeshKind as InstancedMeshKind, index_LightComponent as LightComponent, index_LightValueState as LightValueState, index_MaterialComponent as MaterialComponent, index_MaterialTypeValue as MaterialTypeValue, index_MaterialValueState as MaterialValueState, index_MeshComponent as MeshComponent, index_MeshGeometryComponent as MeshGeometryComponent, index_MeshGeometryParameters as MeshGeometryParameters, index_MeshGeometryParametersByKind as MeshGeometryParametersByKind, index_ModelComponent as ModelComponent, index_Name as Name, index_Object3DRef as Object3DRef, index_ParentId as ParentId, index_PhysicsComponent as PhysicsComponent, index_PhysicsState as PhysicsState, index_PlaneMeshParameters as PlaneMeshParameters, index_Postprocessing as Postprocessing, index_PostprocessingState as PostprocessingState, index_PrefabInstance as PrefabInstance, index_PrefabNode as PrefabNode, index_RadiusHeightMeshParameters as RadiusHeightMeshParameters, index_RadiusMeshParameters as RadiusMeshParameters, index_RigidbodyState as RigidbodyState, index_RigidbodyType as RigidbodyType, index_ScriptComponent as ScriptComponent, index_ScriptEntry as ScriptEntry, index_ScriptObjectComponent as ScriptObjectComponent, index_ScriptObjectComponentInput as ScriptObjectComponentInput, index_ScriptObjectRuntimeState as ScriptObjectRuntimeState, index_Selectable as Selectable, index_SelectionTransformState as SelectionTransformState, index_SpriteComponent as SpriteComponent, index_TextureFilteringValue as TextureFilteringValue, index_TransformComponent as TransformComponent, index_TransformData as TransformData, index_TransformModeValue as TransformModeValue, index_TransformSpaceValue as TransformSpaceValue, index_Vec3 as Vec3, index_VideoComponent as VideoComponent, index_defaultMaterialValue as defaultMaterialValue, index_normalizePhysicsState as normalizePhysicsState };
152
+ export { index_AnimationComponent as AnimationComponent, index_AnimationComponentOptions as AnimationComponentOptions, index_AudioComponent as AudioComponent, index_CameraComponent as CameraComponent, index_CameraComponentOptions as CameraComponentOptions, index_CameraProjection as CameraProjection, index_CameraRuntimeType as CameraRuntimeType, index_ColliderShape as ColliderShape, index_ColliderState as ColliderState, index_CubeMeshParameters as CubeMeshParameters, index_DEFAULT_COLLIDER_STATE as DEFAULT_COLLIDER_STATE, index_DEFAULT_ENVIRONMENT_STATE as DEFAULT_ENVIRONMENT_STATE, index_DEFAULT_INSTANCED_MESH_PARAMETERS as DEFAULT_INSTANCED_MESH_PARAMETERS, index_DEFAULT_INSTANCE_TRANSFORM as DEFAULT_INSTANCE_TRANSFORM, index_DEFAULT_MESH_GEOMETRY_PARAMETERS as DEFAULT_MESH_GEOMETRY_PARAMETERS, index_DEFAULT_PHYSICS_STATE as DEFAULT_PHYSICS_STATE, index_DEFAULT_POSTPROCESSING_STATE as DEFAULT_POSTPROCESSING_STATE, index_DEFAULT_RIGIDBODY_STATE as DEFAULT_RIGIDBODY_STATE, index_EditableMeshObjectKind as EditableMeshObjectKind, index_EntityType as EntityType, index_Environment as Environment, index_EnvironmentFogState as EnvironmentFogState, index_EnvironmentFogType as EnvironmentFogType, index_EnvironmentGradientEffect as EnvironmentGradientEffect, index_EnvironmentSkyboxState as EnvironmentSkyboxState, index_EnvironmentSkyboxType as EnvironmentSkyboxType, index_EnvironmentState as EnvironmentState, index_ImageComponent as ImageComponent, index_ImageTarget as ImageTarget, index_ImageTargetAnchor as ImageTargetAnchor, index_ImageTargetAnchorOptions as ImageTargetAnchorOptions, index_ImageTargetReference as ImageTargetReference, index_InstanceSlotComponent as InstanceSlotComponent, index_InstanceTransform as InstanceTransform, index_InstancedMeshComponent as InstancedMeshComponent, index_InstancedMeshKind as InstancedMeshKind, index_LightComponent as LightComponent, index_LightValueState as LightValueState, index_MaterialComponent as MaterialComponent, index_MaterialTypeValue as MaterialTypeValue, index_MaterialValueState as MaterialValueState, index_MeshComponent as MeshComponent, index_MeshGeometryComponent as MeshGeometryComponent, index_MeshGeometryParameters as MeshGeometryParameters, index_MeshGeometryParametersByKind as MeshGeometryParametersByKind, index_ModelComponent as ModelComponent, index_Name as Name, index_Object3DRef as Object3DRef, index_ParentId as ParentId, index_PhysicsComponent as PhysicsComponent, index_PhysicsState as PhysicsState, index_PlaneMeshParameters as PlaneMeshParameters, index_Postprocessing as Postprocessing, index_PostprocessingState as PostprocessingState, index_PrefabInstance as PrefabInstance, index_PrefabNode as PrefabNode, index_RadiusHeightMeshParameters as RadiusHeightMeshParameters, index_RadiusMeshParameters as RadiusMeshParameters, index_RigidbodyState as RigidbodyState, index_RigidbodyType as RigidbodyType, index_ScriptComponent as ScriptComponent, index_ScriptEntry as ScriptEntry, index_ScriptObjectComponent as ScriptObjectComponent, index_ScriptObjectComponentInput as ScriptObjectComponentInput, index_ScriptObjectRuntimeState as ScriptObjectRuntimeState, index_Selectable as Selectable, index_SelectionTransformState as SelectionTransformState, index_SpriteComponent as SpriteComponent, index_TextureFilteringValue as TextureFilteringValue, index_TransformComponent as TransformComponent, index_TransformData as TransformData, index_TransformModeValue as TransformModeValue, index_TransformSpaceValue as TransformSpaceValue, index_Vec3 as Vec3, index_VideoComponent as VideoComponent, index_defaultMaterialValue as defaultMaterialValue, index_normalizePhysicsState as normalizePhysicsState, index_setPhysicsLiveRef as setPhysicsLiveRef };
152
153
  }
153
154
 
154
155
  export { PrefabInstance as P, PrefabNode as a, index as i };
package/dist/index.cjs CHANGED
@@ -78,6 +78,16 @@ function normalizeDebugValue(value, ctx) {
78
78
  return String(value);
79
79
  }
80
80
  const objectValue = value;
81
+ if (ArrayBuffer.isView(value)) {
82
+ const view = value;
83
+ return {
84
+ __type: view.constructor?.name ?? "TypedArray",
85
+ length: typeof view.length === "number" ? view.length : view.byteLength
86
+ };
87
+ }
88
+ if (value instanceof ArrayBuffer) {
89
+ return { __type: "ArrayBuffer", byteLength: value.byteLength };
90
+ }
81
91
  const constructorName = objectValue.constructor?.name && objectValue.constructor.name !== "Object" ? objectValue.constructor.name : null;
82
92
  if (constructorName === "AnimationClip") {
83
93
  return {
@@ -1215,12 +1225,21 @@ function normalizePhysicsState(value) {
1215
1225
  };
1216
1226
  }
1217
1227
  __name(normalizePhysicsState, "normalizePhysicsState");
1228
+ function setPhysicsLiveRef(component, key, value) {
1229
+ Object.defineProperty(component, key, {
1230
+ value,
1231
+ writable: true,
1232
+ configurable: true,
1233
+ enumerable: false
1234
+ });
1235
+ }
1236
+ __name(setPhysicsLiveRef, "setPhysicsLiveRef");
1218
1237
  var _PhysicsComponent = class _PhysicsComponent extends Component {
1219
1238
  constructor(values) {
1220
1239
  super();
1221
1240
  this.values = normalizePhysicsState(values);
1222
- this.rigidBody = null;
1223
- this.collider = null;
1241
+ setPhysicsLiveRef(this, "rigidBody", null);
1242
+ setPhysicsLiveRef(this, "collider", null);
1224
1243
  }
1225
1244
  /**
1226
1245
  * Patch rigidbody and/or collider state. Each sub-object is deep-merged
@@ -3570,7 +3589,8 @@ __export(components_exports, {
3570
3589
  TransformComponent: () => TransformComponent,
3571
3590
  VideoComponent: () => VideoComponent,
3572
3591
  defaultMaterialValue: () => defaultMaterialValue,
3573
- normalizePhysicsState: () => normalizePhysicsState
3592
+ normalizePhysicsState: () => normalizePhysicsState,
3593
+ setPhysicsLiveRef: () => setPhysicsLiveRef
3574
3594
  });
3575
3595
 
3576
3596
  // core/components/PrefabInstance.ts
@@ -6789,82 +6809,108 @@ function createColliderDesc(RAPIER, values, triMeshData) {
6789
6809
  return desc;
6790
6810
  }
6791
6811
  __name(createColliderDesc, "createColliderDesc");
6792
- function findFirstMeshWithGeometry(object) {
6793
- if (object instanceof THREE36__namespace.Mesh && object.geometry) {
6794
- return object;
6812
+ function collectTriMeshParts(object) {
6813
+ if (!object) {
6814
+ return null;
6795
6815
  }
6796
- let found = null;
6816
+ object.updateWorldMatrix(true, true);
6817
+ const worldScale = new THREE36__namespace.Vector3();
6818
+ object.getWorldScale(worldScale);
6819
+ const scale = {
6820
+ x: Math.abs(worldScale.x) || 1,
6821
+ y: Math.abs(worldScale.y) || 1,
6822
+ z: Math.abs(worldScale.z) || 1
6823
+ };
6824
+ const worldToObject = new THREE36__namespace.Matrix4().copy(object.matrixWorld).invert();
6825
+ const parts = [];
6797
6826
  object.traverse((child) => {
6798
- if (found) {
6827
+ if (!(child instanceof THREE36__namespace.Mesh) || !child.geometry) {
6799
6828
  return;
6800
6829
  }
6801
- if (child instanceof THREE36__namespace.Mesh && child.geometry) {
6802
- found = child;
6830
+ const geometry = child.geometry;
6831
+ const positionAttribute = geometry.getAttribute("position");
6832
+ if (!positionAttribute || positionAttribute.itemSize < 3) {
6833
+ return;
6834
+ }
6835
+ const positionCount = positionAttribute.count;
6836
+ if (positionCount < 3) {
6837
+ return;
6838
+ }
6839
+ const indexAttribute = geometry.getIndex();
6840
+ const indexCount = indexAttribute ? indexAttribute.count : Math.floor(positionCount / 3) * 3;
6841
+ if (indexCount < 3) {
6842
+ return;
6803
6843
  }
6844
+ const relativeMatrix = new THREE36__namespace.Matrix4().multiplyMatrices(
6845
+ worldToObject,
6846
+ child.matrixWorld
6847
+ );
6848
+ const matrixSignature = relativeMatrix.elements.map((value) => value.toFixed(5)).join(",");
6849
+ parts.push({
6850
+ positionAttribute,
6851
+ indexAttribute,
6852
+ positionCount,
6853
+ indexCount,
6854
+ relativeMatrix,
6855
+ signature: `${child.uuid}:${geometry.uuid}:${positionCount}:${indexCount}:${matrixSignature}`
6856
+ });
6804
6857
  });
6805
- return found;
6806
- }
6807
- __name(findFirstMeshWithGeometry, "findFirstMeshWithGeometry");
6808
- function createTriMeshData(object) {
6809
- if (!object) {
6858
+ if (parts.length === 0) {
6810
6859
  return null;
6811
6860
  }
6812
- const mesh = findFirstMeshWithGeometry(object);
6813
- if (!mesh) {
6861
+ const scaleSignature = `${scale.x.toFixed(5)},${scale.y.toFixed(5)},${scale.z.toFixed(5)}`;
6862
+ return {
6863
+ parts,
6864
+ scale,
6865
+ signature: `${scaleSignature}|${parts.map((p) => p.signature).join("|")}`
6866
+ };
6867
+ }
6868
+ __name(collectTriMeshParts, "collectTriMeshParts");
6869
+ function createTriMeshData(collected) {
6870
+ if (!collected) {
6814
6871
  return null;
6815
6872
  }
6816
- const geometry = mesh.geometry;
6817
- const positionAttribute = geometry.getAttribute("position");
6818
- if (!positionAttribute || positionAttribute.itemSize < 3) {
6819
- return null;
6873
+ const { parts, scale } = collected;
6874
+ let vertexTotal = 0;
6875
+ let indexTotal = 0;
6876
+ for (const part of parts) {
6877
+ vertexTotal += part.positionCount;
6878
+ indexTotal += part.indexCount;
6820
6879
  }
6821
- const positionCount = positionAttribute.count;
6822
- if (positionCount < 3) {
6880
+ if (vertexTotal < 3 || indexTotal < 3) {
6823
6881
  return null;
6824
6882
  }
6825
- object.updateWorldMatrix(true, true);
6826
- mesh.updateWorldMatrix(true, true);
6827
- const worldToObject = new THREE36__namespace.Matrix4().copy(object.matrixWorld).invert();
6828
- const relativeMatrix = new THREE36__namespace.Matrix4().multiplyMatrices(
6829
- worldToObject,
6830
- mesh.matrixWorld
6831
- );
6832
- const vertices = new Float32Array(positionCount * 3);
6883
+ const vertices = new Float32Array(vertexTotal * 3);
6884
+ const indices = new Uint32Array(indexTotal);
6833
6885
  const point = new THREE36__namespace.Vector3();
6834
- for (let index = 0; index < positionCount; index += 1) {
6835
- point.set(
6836
- positionAttribute.getX(index),
6837
- positionAttribute.getY(index),
6838
- positionAttribute.getZ(index)
6839
- ).applyMatrix4(relativeMatrix);
6840
- const outputIndex = index * 3;
6841
- vertices[outputIndex] = point.x;
6842
- vertices[outputIndex + 1] = point.y;
6843
- vertices[outputIndex + 2] = point.z;
6844
- }
6845
- const indexAttribute = geometry.getIndex();
6846
- let indices;
6847
- if (indexAttribute) {
6848
- indices = new Uint32Array(indexAttribute.count);
6849
- for (let index = 0; index < indexAttribute.count; index += 1) {
6850
- indices[index] = indexAttribute.getX(index);
6851
- }
6852
- } else {
6853
- const triangleIndexCount = Math.floor(positionCount / 3) * 3;
6854
- if (triangleIndexCount < 3) {
6855
- return null;
6856
- }
6857
- indices = new Uint32Array(triangleIndexCount);
6858
- for (let index = 0; index < triangleIndexCount; index += 1) {
6859
- indices[index] = index;
6886
+ let vertexOffset = 0;
6887
+ let indexOffset = 0;
6888
+ for (const part of parts) {
6889
+ const { positionAttribute, indexAttribute, relativeMatrix } = part;
6890
+ for (let index = 0; index < part.positionCount; index += 1) {
6891
+ point.set(
6892
+ positionAttribute.getX(index),
6893
+ positionAttribute.getY(index),
6894
+ positionAttribute.getZ(index)
6895
+ ).applyMatrix4(relativeMatrix);
6896
+ const outputIndex = (vertexOffset + index) * 3;
6897
+ vertices[outputIndex] = point.x * scale.x;
6898
+ vertices[outputIndex + 1] = point.y * scale.y;
6899
+ vertices[outputIndex + 2] = point.z * scale.z;
6900
+ }
6901
+ if (indexAttribute) {
6902
+ for (let index = 0; index < part.indexCount; index += 1) {
6903
+ indices[indexOffset + index] = vertexOffset + indexAttribute.getX(index);
6904
+ }
6905
+ } else {
6906
+ for (let index = 0; index < part.indexCount; index += 1) {
6907
+ indices[indexOffset + index] = vertexOffset + index;
6908
+ }
6860
6909
  }
6910
+ vertexOffset += part.positionCount;
6911
+ indexOffset += part.indexCount;
6861
6912
  }
6862
- const matrixSignature = relativeMatrix.elements.map((value) => value.toFixed(5)).join(",");
6863
- return {
6864
- vertices,
6865
- indices,
6866
- signature: `${mesh.uuid}:${geometry.uuid}:${positionCount}:${indices.length}:${matrixSignature}`
6867
- };
6913
+ return { vertices, indices, signature: collected.signature };
6868
6914
  }
6869
6915
  __name(createTriMeshData, "createTriMeshData");
6870
6916
  function syncBodyFromTransform(body, transform) {
@@ -6978,8 +7024,8 @@ var _PhysicsSyncSystem = class _PhysicsSyncSystem {
6978
7024
  }
6979
7025
  if (!physics.values.rigidbody.enabled) {
6980
7026
  this.removeEntityPhysics(physicsWorld, entityId);
6981
- physics.rigidBody = null;
6982
- physics.collider = null;
7027
+ setPhysicsLiveRef(physics, "rigidBody", null);
7028
+ setPhysicsLiveRef(physics, "collider", null);
6983
7029
  continue;
6984
7030
  }
6985
7031
  const rigidBodySignature = JSON.stringify(physics.values.rigidbody);
@@ -7023,7 +7069,7 @@ var _PhysicsSyncSystem = class _PhysicsSyncSystem {
7023
7069
  }
7024
7070
  this.rigidBodyHandles.set(entityId, body2.handle);
7025
7071
  this.rigidBodySignatures.set(entityId, rigidBodySignature);
7026
- physics.rigidBody = body2;
7072
+ setPhysicsLiveRef(physics, "rigidBody", body2);
7027
7073
  }
7028
7074
  const rigidBodyHandle = this.rigidBodyHandles.get(entityId);
7029
7075
  if (typeof rigidBodyHandle !== "number") {
@@ -7032,16 +7078,16 @@ var _PhysicsSyncSystem = class _PhysicsSyncSystem {
7032
7078
  const body = physicsWorld.getRigidBody(rigidBodyHandle);
7033
7079
  if (!body) {
7034
7080
  this.removeEntityPhysics(physicsWorld, entityId);
7035
- physics.rigidBody = null;
7036
- physics.collider = null;
7081
+ setPhysicsLiveRef(physics, "rigidBody", null);
7082
+ setPhysicsLiveRef(physics, "collider", null);
7037
7083
  continue;
7038
7084
  }
7039
- physics.rigidBody = body;
7085
+ setPhysicsLiveRef(physics, "rigidBody", body);
7040
7086
  if (this.isEditorMode || physics.values.rigidbody.type !== "dynamic") {
7041
7087
  syncBodyFromTransform(body, transform);
7042
7088
  }
7043
7089
  const effectiveCollider = computeColliderState(physics.values.collider, object);
7044
- const triMeshData = effectiveCollider.shape === "trimesh" ? createTriMeshData(object) : null;
7090
+ const triMeshParts = effectiveCollider.shape === "trimesh" ? collectTriMeshParts(object) : null;
7045
7091
  if (!effectiveCollider || !effectiveCollider.enabled) {
7046
7092
  const colliderHandle = this.colliderHandles.get(entityId);
7047
7093
  if (typeof colliderHandle === "number") {
@@ -7052,10 +7098,10 @@ var _PhysicsSyncSystem = class _PhysicsSyncSystem {
7052
7098
  }
7053
7099
  this.colliderHandles.delete(entityId);
7054
7100
  this.colliderSignatures.delete(entityId);
7055
- physics.collider = null;
7101
+ setPhysicsLiveRef(physics, "collider", null);
7056
7102
  continue;
7057
7103
  }
7058
- const colliderSignature = `${JSON.stringify(effectiveCollider)}:${triMeshData?.signature ?? ""}`;
7104
+ const colliderSignature = `${JSON.stringify(effectiveCollider)}:${triMeshParts?.signature ?? ""}`;
7059
7105
  const previousColliderSignature = this.colliderSignatures.get(entityId);
7060
7106
  if (!this.colliderHandles.has(entityId) || previousColliderSignature !== colliderSignature) {
7061
7107
  const previousColliderHandle = this.colliderHandles.get(entityId);
@@ -7068,15 +7114,19 @@ var _PhysicsSyncSystem = class _PhysicsSyncSystem {
7068
7114
  const colliderDesc = createColliderDesc(
7069
7115
  this.rapier,
7070
7116
  effectiveCollider,
7071
- triMeshData
7117
+ createTriMeshData(triMeshParts)
7072
7118
  );
7073
7119
  const createdCollider = physicsWorld.createCollider(colliderDesc, body);
7074
7120
  this.colliderHandles.set(entityId, createdCollider.handle);
7075
7121
  this.colliderSignatures.set(entityId, colliderSignature);
7076
- physics.collider = createdCollider;
7122
+ setPhysicsLiveRef(physics, "collider", createdCollider);
7077
7123
  } else {
7078
7124
  const colliderHandle = this.colliderHandles.get(entityId);
7079
- physics.collider = typeof colliderHandle === "number" ? physicsWorld.getCollider(colliderHandle) ?? null : null;
7125
+ setPhysicsLiveRef(
7126
+ physics,
7127
+ "collider",
7128
+ typeof colliderHandle === "number" ? physicsWorld.getCollider(colliderHandle) ?? null : null
7129
+ );
7080
7130
  }
7081
7131
  }
7082
7132
  if (!this.isEditorMode) {