@relu-interactives/spatial-ecs 0.2.24 → 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.
- package/dist/{Video-ppAXaKt0.d.cts → Video-AIQYTAAr.d.cts} +15 -3
- package/dist/{Video-C1IOat7L.d.ts → Video-DlZ4G9ig.d.ts} +15 -3
- package/dist/{chunk-CCE5K2TU.js → chunk-3P3ZBP7K.js} +17 -13
- package/dist/chunk-3P3ZBP7K.js.map +1 -0
- package/dist/{chunk-JHCPRVBC.js → chunk-J6736FFO.js} +16 -6
- package/dist/chunk-J6736FFO.js.map +1 -0
- package/dist/{chunk-ZXGHKX7N.js → chunk-OWQSESTO.js} +12 -2
- package/dist/chunk-OWQSESTO.js.map +1 -0
- package/dist/{chunk-52CHDPRQ.js → chunk-RJ4J5UEX.js} +4 -4
- package/dist/{chunk-52CHDPRQ.js.map → chunk-RJ4J5UEX.js.map} +1 -1
- package/dist/{chunk-WKGCC7YL.js → chunk-XFD74BQL.js} +3 -3
- package/dist/{chunk-WKGCC7YL.js.map → chunk-XFD74BQL.js.map} +1 -1
- package/dist/components/index.cjs +12 -2
- 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/factories/index.cjs +11 -2
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +1 -1
- package/dist/factories/index.d.ts +1 -1
- package/dist/factories/index.js +3 -3
- package/dist/{index-DdiWu1b6.d.ts → index-BwiRJNIT.d.ts} +3 -2
- package/dist/{index-Cu2Pt7wN.d.cts → index-Gr8aCPRM.d.cts} +3 -2
- package/dist/index.cjs +36 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/systems/index.cjs +24 -11
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.js +3 -3
- package/dist/worldSnapshotUtils.cjs +10 -0
- package/dist/worldSnapshotUtils.cjs.map +1 -1
- package/dist/worldSnapshotUtils.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-CCE5K2TU.js.map +0 -1
- package/dist/chunk-JHCPRVBC.js.map +0 -1
- 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-
|
|
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-
|
|
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';
|
package/dist/factories/index.js
CHANGED
|
@@ -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-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
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-
|
|
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-
|
|
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
|
|
1223
|
-
this
|
|
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
|
|
@@ -7004,8 +7024,8 @@ var _PhysicsSyncSystem = class _PhysicsSyncSystem {
|
|
|
7004
7024
|
}
|
|
7005
7025
|
if (!physics.values.rigidbody.enabled) {
|
|
7006
7026
|
this.removeEntityPhysics(physicsWorld, entityId);
|
|
7007
|
-
physics
|
|
7008
|
-
physics
|
|
7027
|
+
setPhysicsLiveRef(physics, "rigidBody", null);
|
|
7028
|
+
setPhysicsLiveRef(physics, "collider", null);
|
|
7009
7029
|
continue;
|
|
7010
7030
|
}
|
|
7011
7031
|
const rigidBodySignature = JSON.stringify(physics.values.rigidbody);
|
|
@@ -7049,7 +7069,7 @@ var _PhysicsSyncSystem = class _PhysicsSyncSystem {
|
|
|
7049
7069
|
}
|
|
7050
7070
|
this.rigidBodyHandles.set(entityId, body2.handle);
|
|
7051
7071
|
this.rigidBodySignatures.set(entityId, rigidBodySignature);
|
|
7052
|
-
physics
|
|
7072
|
+
setPhysicsLiveRef(physics, "rigidBody", body2);
|
|
7053
7073
|
}
|
|
7054
7074
|
const rigidBodyHandle = this.rigidBodyHandles.get(entityId);
|
|
7055
7075
|
if (typeof rigidBodyHandle !== "number") {
|
|
@@ -7058,11 +7078,11 @@ var _PhysicsSyncSystem = class _PhysicsSyncSystem {
|
|
|
7058
7078
|
const body = physicsWorld.getRigidBody(rigidBodyHandle);
|
|
7059
7079
|
if (!body) {
|
|
7060
7080
|
this.removeEntityPhysics(physicsWorld, entityId);
|
|
7061
|
-
physics
|
|
7062
|
-
physics
|
|
7081
|
+
setPhysicsLiveRef(physics, "rigidBody", null);
|
|
7082
|
+
setPhysicsLiveRef(physics, "collider", null);
|
|
7063
7083
|
continue;
|
|
7064
7084
|
}
|
|
7065
|
-
physics
|
|
7085
|
+
setPhysicsLiveRef(physics, "rigidBody", body);
|
|
7066
7086
|
if (this.isEditorMode || physics.values.rigidbody.type !== "dynamic") {
|
|
7067
7087
|
syncBodyFromTransform(body, transform);
|
|
7068
7088
|
}
|
|
@@ -7078,7 +7098,7 @@ var _PhysicsSyncSystem = class _PhysicsSyncSystem {
|
|
|
7078
7098
|
}
|
|
7079
7099
|
this.colliderHandles.delete(entityId);
|
|
7080
7100
|
this.colliderSignatures.delete(entityId);
|
|
7081
|
-
physics
|
|
7101
|
+
setPhysicsLiveRef(physics, "collider", null);
|
|
7082
7102
|
continue;
|
|
7083
7103
|
}
|
|
7084
7104
|
const colliderSignature = `${JSON.stringify(effectiveCollider)}:${triMeshParts?.signature ?? ""}`;
|
|
@@ -7099,10 +7119,14 @@ var _PhysicsSyncSystem = class _PhysicsSyncSystem {
|
|
|
7099
7119
|
const createdCollider = physicsWorld.createCollider(colliderDesc, body);
|
|
7100
7120
|
this.colliderHandles.set(entityId, createdCollider.handle);
|
|
7101
7121
|
this.colliderSignatures.set(entityId, colliderSignature);
|
|
7102
|
-
physics
|
|
7122
|
+
setPhysicsLiveRef(physics, "collider", createdCollider);
|
|
7103
7123
|
} else {
|
|
7104
7124
|
const colliderHandle = this.colliderHandles.get(entityId);
|
|
7105
|
-
|
|
7125
|
+
setPhysicsLiveRef(
|
|
7126
|
+
physics,
|
|
7127
|
+
"collider",
|
|
7128
|
+
typeof colliderHandle === "number" ? physicsWorld.getCollider(colliderHandle) ?? null : null
|
|
7129
|
+
);
|
|
7106
7130
|
}
|
|
7107
7131
|
}
|
|
7108
7132
|
if (!this.isEditorMode) {
|