@relu-interactives/spatial-ecs 0.2.24 → 0.3.0
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-JHCPRVBC.js → chunk-7BPHZWQ6.js} +59 -17
- package/dist/chunk-7BPHZWQ6.js.map +1 -0
- package/dist/{chunk-CCE5K2TU.js → chunk-7JFSEV7A.js} +18 -13
- package/dist/chunk-7JFSEV7A.js.map +1 -0
- package/dist/{chunk-52CHDPRQ.js → chunk-AT5SPSPM.js} +4 -4
- package/dist/{chunk-52CHDPRQ.js.map → chunk-AT5SPSPM.js.map} +1 -1
- package/dist/{chunk-ZXGHKX7N.js → chunk-OWQSESTO.js} +12 -2
- package/dist/chunk-OWQSESTO.js.map +1 -0
- package/dist/{chunk-WKGCC7YL.js → chunk-PZ4CAALA.js} +3 -3
- package/dist/{chunk-WKGCC7YL.js.map → chunk-PZ4CAALA.js.map} +1 -1
- package/dist/components/index.cjs +55 -13
- 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/docs/api/Behaviour/classes/Behaviour.md +98 -51
- package/dist/docs/api/Component/classes/Component.md +4 -1
- package/dist/docs/api/components/classes/AnimationComponent.md +26 -26
- package/dist/docs/api/components/classes/AudioComponent.md +19 -19
- package/dist/docs/api/components/classes/CameraComponent.md +14 -14
- package/dist/docs/api/components/classes/EntityType.md +4 -4
- package/dist/docs/api/components/classes/Environment.md +3 -3
- package/dist/docs/api/components/classes/ImageComponent.md +7 -7
- package/dist/docs/api/components/classes/ImageTarget.md +7 -7
- package/dist/docs/api/components/classes/ImageTargetAnchor.md +4 -4
- package/dist/docs/api/components/classes/InstanceSlotComponent.md +4 -4
- package/dist/docs/api/components/classes/InstancedMeshComponent.md +10 -10
- package/dist/docs/api/components/classes/LightComponent.md +6 -6
- package/dist/docs/api/components/classes/MaterialComponent.md +57 -11
- package/dist/docs/api/components/classes/MeshComponent.md +3 -3
- package/dist/docs/api/components/classes/MeshGeometryComponent.md +9 -9
- package/dist/docs/api/components/classes/ModelComponent.md +4 -4
- package/dist/docs/api/components/classes/Name.md +3 -3
- package/dist/docs/api/components/classes/Object3DRef.md +4 -4
- package/dist/docs/api/components/classes/ParentId.md +3 -3
- package/dist/docs/api/components/classes/PhysicsComponent.md +12 -13
- package/dist/docs/api/components/classes/Postprocessing.md +3 -3
- package/dist/docs/api/components/classes/PrefabInstance.md +80 -0
- package/dist/docs/api/components/classes/PrefabNode.md +54 -0
- package/dist/docs/api/components/classes/ScriptComponent.md +5 -5
- package/dist/docs/api/components/classes/ScriptObjectComponent.md +55 -0
- package/dist/docs/api/components/classes/Selectable.md +3 -3
- package/dist/docs/api/components/classes/SelectionTransformState.md +5 -5
- package/dist/docs/api/components/classes/SpriteComponent.md +7 -7
- package/dist/docs/api/components/classes/TransformComponent.md +12 -12
- package/dist/docs/api/components/classes/VideoComponent.md +28 -28
- package/dist/docs/api/components/functions/defaultMaterialValue.md +17 -0
- package/dist/docs/api/components/functions/normalizePhysicsState.md +1 -1
- package/dist/docs/api/components/functions/setPhysicsLiveRef.md +34 -0
- package/dist/docs/api/components/index.md +8 -1
- package/dist/docs/api/components/type-aliases/AnimationComponentOptions.md +9 -9
- package/dist/docs/api/components/type-aliases/CameraComponentOptions.md +13 -13
- package/dist/docs/api/components/type-aliases/CameraProjection.md +1 -1
- package/dist/docs/api/components/type-aliases/CameraRuntimeType.md +1 -1
- package/dist/docs/api/components/type-aliases/ColliderShape.md +1 -1
- package/dist/docs/api/components/type-aliases/ColliderState.md +20 -20
- package/dist/docs/api/components/type-aliases/CubeMeshParameters.md +4 -4
- package/dist/docs/api/components/type-aliases/EditableMeshObjectKind.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentFogState.md +8 -8
- package/dist/docs/api/components/type-aliases/EnvironmentFogType.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentGradientEffect.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentSkyboxState.md +7 -7
- package/dist/docs/api/components/type-aliases/EnvironmentSkyboxType.md +1 -1
- package/dist/docs/api/components/type-aliases/EnvironmentState.md +5 -5
- package/dist/docs/api/components/type-aliases/ImageTargetAnchorOptions.md +3 -3
- package/dist/docs/api/components/type-aliases/ImageTargetReference.md +7 -7
- package/dist/docs/api/components/type-aliases/InstanceTransform.md +13 -13
- package/dist/docs/api/components/type-aliases/InstancedMeshKind.md +1 -1
- package/dist/docs/api/components/type-aliases/LightValueState.md +11 -11
- package/dist/docs/api/components/type-aliases/MaterialTypeValue.md +1 -1
- package/dist/docs/api/components/type-aliases/MaterialValueState.md +28 -28
- package/dist/docs/api/components/type-aliases/MeshGeometryParameters.md +1 -1
- package/dist/docs/api/components/type-aliases/MeshGeometryParametersByKind.md +7 -7
- package/dist/docs/api/components/type-aliases/PhysicsState.md +3 -3
- package/dist/docs/api/components/type-aliases/PlaneMeshParameters.md +3 -3
- package/dist/docs/api/components/type-aliases/PostprocessingState.md +62 -62
- package/dist/docs/api/components/type-aliases/RadiusHeightMeshParameters.md +3 -3
- package/dist/docs/api/components/type-aliases/RadiusMeshParameters.md +2 -2
- package/dist/docs/api/components/type-aliases/RigidbodyState.md +17 -17
- package/dist/docs/api/components/type-aliases/RigidbodyType.md +1 -1
- package/dist/docs/api/components/type-aliases/ScriptEntry.md +8 -10
- package/dist/docs/api/components/type-aliases/ScriptObjectComponentInput.md +20 -0
- package/dist/docs/api/components/type-aliases/ScriptObjectRuntimeState.md +13 -0
- package/dist/docs/api/components/type-aliases/TextureFilteringValue.md +1 -1
- package/dist/docs/api/components/type-aliases/TransformData.md +4 -4
- package/dist/docs/api/components/type-aliases/TransformModeValue.md +1 -1
- package/dist/docs/api/components/type-aliases/TransformSpaceValue.md +1 -1
- package/dist/docs/api/components/type-aliases/Vec3.md +4 -4
- package/dist/docs/api/components/variables/DEFAULT_COLLIDER_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_ENVIRONMENT_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_INSTANCED_MESH_PARAMETERS.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_INSTANCE_TRANSFORM.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_MESH_GEOMETRY_PARAMETERS.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_PHYSICS_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_POSTPROCESSING_STATE.md +1 -1
- package/dist/docs/api/components/variables/DEFAULT_RIGIDBODY_STATE.md +1 -1
- package/dist/docs/api/index/classes/AnimationStateMachine.md +16 -16
- package/dist/docs/api/index/classes/AnimationStateManager.md +13 -13
- package/dist/docs/api/index/classes/AnimationSystem.md +3 -3
- package/dist/docs/api/index/classes/AudioSystem.md +4 -4
- package/dist/docs/api/index/classes/CameraSyncSystem.md +2 -2
- package/dist/docs/api/index/classes/EnvironmentSyncSystem.md +4 -4
- package/dist/docs/api/index/classes/InputSystem.md +33 -33
- package/dist/docs/api/index/classes/InstancedMeshSystem.md +2 -2
- package/dist/docs/api/index/classes/LightSyncSystem.md +2 -2
- package/dist/docs/api/index/classes/MaterialSyncSystem.md +3 -3
- package/dist/docs/api/index/classes/MeshGeometrySystem.md +2 -2
- package/dist/docs/api/index/classes/ObjectManagementSystem.md +14 -14
- package/dist/docs/api/index/classes/ObjectVisibilitySystem.md +2 -2
- package/dist/docs/api/index/classes/PhysicsSyncSystem.md +4 -4
- package/dist/docs/api/index/classes/PostprocessingSyncSystem.md +4 -4
- package/dist/docs/api/index/classes/RenderSystem.md +3 -3
- package/dist/docs/api/index/classes/ScriptBehaviourSystem.md +5 -5
- package/dist/docs/api/index/classes/ScriptObject.md +156 -0
- package/dist/docs/api/index/classes/ScriptObjectSystem.md +129 -0
- package/dist/docs/api/index/classes/TransformSyncSystem.md +2 -2
- package/dist/docs/api/index/classes/VideoSystem.md +4 -4
- package/dist/docs/api/index/classes/World.md +183 -86
- package/dist/docs/api/index/functions/applyPrefabToSnapshotInstances.md +32 -0
- package/dist/docs/api/index/functions/buildComponentValueMaps.md +23 -0
- package/dist/docs/api/index/functions/buildNodeKeyMapsFromSnapshot.md +25 -0
- package/dist/docs/api/index/functions/buildNodeMapsFromSnapshot.md +23 -0
- package/dist/docs/api/index/functions/canonicalizeComponentValue.md +38 -0
- package/dist/docs/api/index/functions/clearModelCache.md +26 -0
- package/dist/docs/api/index/functions/clearPrefabCache.md +25 -0
- package/dist/docs/api/index/functions/collectDiffPaths.md +38 -0
- package/dist/docs/api/index/functions/collectDirectPrefabDependencies.md +27 -0
- package/dist/docs/api/index/functions/collectEntitySubtree.md +29 -0
- package/dist/docs/api/index/functions/collectSnapshotSubtreeIds.md +26 -0
- package/dist/docs/api/index/functions/computeInstanceOverrides.md +44 -0
- package/dist/docs/api/index/functions/createAnimationComponent.md +1 -1
- package/dist/docs/api/index/functions/createAudioComponent.md +1 -1
- package/dist/docs/api/index/functions/createCameraComponent.md +1 -1
- package/dist/docs/api/index/functions/createEntityTypeComponent.md +2 -2
- package/dist/docs/api/index/functions/createEnvironmentComponent.md +1 -1
- package/dist/docs/api/index/functions/createImageComponent.md +1 -1
- package/dist/docs/api/index/functions/createImageTargetAnchorComponent.md +1 -1
- package/dist/docs/api/index/functions/createImageTargetComponent.md +1 -1
- package/dist/docs/api/index/functions/createInstanceSlotComponent.md +1 -1
- package/dist/docs/api/index/functions/createInstancedMeshComponent.md +1 -1
- package/dist/docs/api/index/functions/createLightComponent.md +1 -1
- package/dist/docs/api/index/functions/createMaterialComponent.md +1 -1
- package/dist/docs/api/index/functions/createMeshComponent.md +1 -1
- package/dist/docs/api/index/functions/createMeshGeometryComponent.md +1 -1
- package/dist/docs/api/index/functions/createModelComponent.md +1 -1
- package/dist/docs/api/index/functions/createNameComponent.md +1 -1
- package/dist/docs/api/index/functions/createObject3DRefComponent.md +1 -1
- package/dist/docs/api/index/functions/createParentIdComponent.md +1 -1
- package/dist/docs/api/index/functions/createPhysicsComponent.md +2 -4
- package/dist/docs/api/index/functions/createPostprocessingComponent.md +1 -1
- package/dist/docs/api/index/functions/createScriptComponent.md +1 -1
- package/dist/docs/api/index/functions/createScriptObjectComponent.md +28 -0
- package/dist/docs/api/index/functions/createSelectableComponent.md +1 -1
- package/dist/docs/api/index/functions/createSelectionTransformStateComponent.md +1 -1
- package/dist/docs/api/index/functions/createSpriteComponent.md +1 -1
- package/dist/docs/api/index/functions/createTransformComponent.md +1 -1
- package/dist/docs/api/index/functions/createVideoComponent.md +1 -1
- package/dist/docs/api/index/functions/decanonicalizeComponentValue.md +28 -0
- package/dist/docs/api/index/functions/despawnPrefab.md +32 -0
- package/dist/docs/api/index/functions/encodeOverride.md +28 -0
- package/dist/docs/api/index/functions/findSnapshotRootEntityIds.md +25 -0
- package/dist/docs/api/index/functions/findTopLevelNestedRegions.md +28 -0
- package/dist/docs/api/index/functions/groupOverridePaths.md +25 -0
- package/dist/docs/api/index/functions/hydrateWorldFromSnapshot.md +1 -1
- package/dist/docs/api/index/functions/hydrateWorldFromSnapshotDetailed.md +4 -2
- package/dist/docs/api/index/functions/indexSnapshotByEntity.md +25 -0
- package/dist/docs/api/index/functions/instantiateSubtree.md +32 -0
- package/dist/docs/api/index/functions/loadPrefab.md +28 -0
- package/dist/docs/api/index/functions/loadSharedGltf.md +29 -0
- package/dist/docs/api/index/functions/mergeComponentValue.md +32 -0
- package/dist/docs/api/index/functions/parseOverride.md +34 -0
- package/dist/docs/api/index/functions/parsePrefabAsset.md +25 -0
- package/dist/docs/api/index/functions/prefabFileVersionFor.md +25 -0
- package/dist/docs/api/index/functions/registerDefaultComponentFactories.md +1 -1
- package/dist/docs/api/index/functions/registerDefaultFactories.md +1 -1
- package/dist/docs/api/index/functions/remapSnapshotEntityIds.md +46 -0
- package/dist/docs/api/index/functions/resolveDracoDecoderPath.md +17 -0
- package/dist/docs/api/index/functions/restoreComponentState.md +34 -0
- package/dist/docs/api/index/functions/restorePostCreateComponents.md +36 -0
- package/dist/docs/api/index/functions/serializeEntitySubtree.md +35 -0
- package/dist/docs/api/index/functions/setDracoDecoderPath.md +30 -0
- package/dist/docs/api/index/functions/setPrefabAssetUrlResolver.md +30 -0
- package/dist/docs/api/index/functions/spawnPrefab.md +36 -0
- package/dist/docs/api/index/index.md +65 -0
- package/dist/docs/api/index/interfaces/EcsSystem.md +3 -3
- package/dist/docs/api/index/interfaces/StateMachine.md +13 -13
- package/dist/docs/api/index/type-aliases/AnimationStateCallbacks.md +4 -4
- package/dist/docs/api/index/type-aliases/ApplyPrefabToSnapshotResult.md +23 -0
- package/dist/docs/api/index/type-aliases/ComponentFactory.md +1 -1
- package/dist/docs/api/index/type-aliases/ComponentValueMaps.md +69 -0
- package/dist/docs/api/index/type-aliases/EcsComponentFactoryKind.md +2 -1
- package/dist/docs/api/index/type-aliases/EcsWorldComponentSnapshot.md +3 -3
- package/dist/docs/api/index/type-aliases/EcsWorldStateSnapshotLike.md +4 -4
- package/dist/docs/api/index/type-aliases/ExternalRefWarning.md +27 -0
- package/dist/docs/api/index/type-aliases/HydrateOptions.md +27 -0
- package/dist/docs/api/index/type-aliases/HydrateWorldFromSnapshotResult.md +7 -5
- package/dist/docs/api/index/type-aliases/InstantiateSubtreeResult.md +23 -0
- package/dist/docs/api/index/type-aliases/KeyboardKey.md +1 -1
- package/dist/docs/api/index/type-aliases/ModuleLoader.md +25 -0
- package/dist/docs/api/index/type-aliases/MouseButton.md +1 -1
- package/dist/docs/api/index/type-aliases/NestedRegion.md +27 -0
- package/dist/docs/api/index/type-aliases/NodeKeyMaps.md +30 -0
- package/dist/docs/api/index/type-aliases/NodeMaps.md +25 -0
- package/dist/docs/api/index/type-aliases/PrefabAsset.md +32 -0
- package/dist/docs/api/index/type-aliases/RemapSnapshotOptions.md +21 -0
- package/dist/docs/api/index/type-aliases/SelectionContext.md +4 -4
- package/dist/docs/api/index/type-aliases/SerializeEntitySubtreeResult.md +25 -0
- package/dist/docs/api/index/type-aliases/SpawnPrefabOptions.md +27 -0
- package/dist/docs/api/index/type-aliases/SpawnPrefabSource.md +19 -0
- package/dist/docs/api/index/type-aliases/SubtreeSnapshot.md +43 -0
- package/dist/docs/api/index/variables/ADDED_NODE_MARKER_COMPONENT.md +19 -0
- package/dist/docs/api/index/variables/HYDRATABLE_ENTITY_KINDS.md +1 -1
- package/dist/docs/api/index/variables/KeyboardKeys.md +89 -89
- package/dist/docs/api/index/variables/NODE_KEY_SEPARATOR.md +13 -0
- package/dist/docs/api/index/variables/OVERRIDE_DIFF_EXCLUDED_COMPONENTS.md +15 -0
- package/dist/docs/api/index/variables/OVERRIDE_ROOT_EXCLUDED_COMPONENTS.md +16 -0
- package/dist/docs/api/index/variables/PREFAB_FILE_VERSION.md +13 -0
- package/dist/docs/api/index/variables/PREFAB_FILE_VERSION_NESTED.md +15 -0
- package/dist/docs/api/index/variables/SCRIPT_OBJECT_ROOT_FLAG.md +15 -0
- package/dist/docs/api/index/variables/SHARED_MODEL_RESOURCE_FLAG.md +17 -0
- package/dist/docs/api/typedoc-sidebar.json +1 -1
- package/dist/docs/api/types/type-aliases/AssetInput.md +3 -3
- package/dist/docs/api/types/type-aliases/CheckboxInput.md +3 -3
- package/dist/docs/api/types/type-aliases/ColorInput.md +1 -1
- package/dist/docs/api/types/type-aliases/ComponentInput.md +4 -4
- package/dist/docs/api/types/type-aliases/ComponentKind.md +2 -1
- package/dist/docs/api/types/type-aliases/DropdownInput.md +3 -3
- package/dist/docs/api/types/type-aliases/DropdownOption.md +3 -3
- package/dist/docs/api/types/type-aliases/EcsEntityEditorKind.md +1 -1
- package/dist/docs/api/types/type-aliases/EcsEntityKind.md +3 -2
- package/dist/docs/api/types/type-aliases/EntityId.md +1 -1
- package/dist/docs/api/types/type-aliases/EntityInput.md +3 -3
- package/dist/docs/api/types/type-aliases/FloatInput.md +1 -1
- package/dist/docs/api/types/type-aliases/IntersectionResult.md +3 -3
- package/dist/docs/api/types/type-aliases/ParentLookup.md +3 -3
- package/dist/docs/api/types/type-aliases/SelectionListener.md +1 -1
- package/dist/docs/api/types/type-aliases/SliderInput.md +5 -5
- package/dist/docs/api/types/type-aliases/TextInput.md +1 -1
- package/dist/docs/api/types/type-aliases/ToggleInput.md +1 -1
- package/dist/docs/api/types/type-aliases/Vec3.md +1 -1
- package/dist/docs/api/types/type-aliases/Vector2Input.md +3 -3
- package/dist/docs/api/types/type-aliases/Vector3Input.md +4 -4
- package/dist/docs/api/types/type-aliases/WorldEntityView.md +1 -1
- package/dist/docs/guide/components/_sidebar.json +4 -0
- package/dist/docs/guide/components/material.md +1 -0
- package/dist/docs/guide/components/script-object.md +32 -0
- package/dist/factories/index.cjs +54 -13
- 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 +80 -23
- 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 +68 -22
- 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 +4 -4
- package/dist/chunk-CCE5K2TU.js.map +0 -1
- package/dist/chunk-JHCPRVBC.js.map +0 -1
- package/dist/chunk-ZXGHKX7N.js.map +0 -1
|
@@ -598,12 +598,24 @@ declare function normalizePhysicsState(value: {
|
|
|
598
598
|
*
|
|
599
599
|
* @category Components
|
|
600
600
|
*/
|
|
601
|
+
/**
|
|
602
|
+
* Write a live Rapier ref as a NON-ENUMERABLE own property. Always via
|
|
603
|
+
* defineProperty (mirroring ScriptObjectComponent's `instance` ref): a
|
|
604
|
+
* history-restored clone that dropped the original slot would otherwise get an
|
|
605
|
+
* ENUMERABLE property from plain assignment, leaking Rapier objects — and for
|
|
606
|
+
* trimesh their huge vertex buffers — into snapshot/history/debug walks.
|
|
607
|
+
*/
|
|
608
|
+
declare function setPhysicsLiveRef(component: PhysicsComponent, key: "rigidBody" | "collider", value: RapierRigidBody | RapierCollider | null): void;
|
|
601
609
|
declare class PhysicsComponent extends Component {
|
|
602
610
|
/** Authoring state. Saved with the project. */
|
|
603
611
|
values: PhysicsState;
|
|
604
|
-
/**
|
|
612
|
+
/**
|
|
613
|
+
* Live Rapier rigid body. `null` until physics is initialized.
|
|
614
|
+
* NON-ENUMERABLE — Rapier wrappers (and, for trimesh, their vertex buffers)
|
|
615
|
+
* must never leak into snapshots/history/debug walks.
|
|
616
|
+
*/
|
|
605
617
|
rigidBody: RapierRigidBody | null;
|
|
606
|
-
/** Live Rapier collider. `null` until physics is initialized. */
|
|
618
|
+
/** Live Rapier collider. `null` until physics is initialized. NON-ENUMERABLE. */
|
|
607
619
|
collider: RapierCollider | null;
|
|
608
620
|
constructor(values?: {
|
|
609
621
|
rigidbody?: Partial<RigidbodyState>;
|
|
@@ -1156,4 +1168,4 @@ declare class VideoComponent extends Component {
|
|
|
1156
1168
|
stop(): void;
|
|
1157
1169
|
}
|
|
1158
1170
|
|
|
1159
|
-
export { SpriteComponent as $, AnimationComponent as A, MeshGeometryComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, type MeshGeometryParameters as F, type MeshGeometryParametersByKind as G, ModelComponent as H, ImageComponent as I, type PhysicsState as J, type PlaneMeshParameters as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type RadiusMeshParameters as Q, type RadiusHeightMeshParameters as R, type RigidbodyState as S, type RigidbodyType as T, ScriptComponent as U, type ScriptEntry as V, ScriptObjectComponent as W, type ScriptObjectComponentInput as X, type ScriptObjectRuntimeState as Y, Selectable as Z, SelectionTransformState as _, type AnimationComponentOptions as a, type TextureFilteringValue as a0, type TransformModeValue as a1, type TransformSpaceValue as a2, VideoComponent as a3, defaultMaterialValue as a4, normalizePhysicsState as a5, type AnimationStateCallbacks as
|
|
1171
|
+
export { SpriteComponent as $, AnimationComponent as A, MeshGeometryComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, type MeshGeometryParameters as F, type MeshGeometryParametersByKind as G, ModelComponent as H, ImageComponent as I, type PhysicsState as J, type PlaneMeshParameters as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type RadiusMeshParameters as Q, type RadiusHeightMeshParameters as R, type RigidbodyState as S, type RigidbodyType as T, ScriptComponent as U, type ScriptEntry as V, ScriptObjectComponent as W, type ScriptObjectComponentInput as X, type ScriptObjectRuntimeState as Y, Selectable as Z, SelectionTransformState as _, type AnimationComponentOptions as a, type TextureFilteringValue as a0, type TransformModeValue as a1, type TransformSpaceValue as a2, VideoComponent as a3, defaultMaterialValue as a4, normalizePhysicsState as a5, setPhysicsLiveRef as a6, type AnimationStateCallbacks as a7, AnimationStateMachine as a8, AnimationStateManager as a9, type StateMachine as aa, AudioComponent as b, type CameraComponentOptions as c, type CameraProjection as d, type CameraRuntimeType as e, type ColliderShape as f, type ColliderState as g, type CubeMeshParameters as h, DEFAULT_INSTANCED_MESH_PARAMETERS as i, DEFAULT_INSTANCE_TRANSFORM as j, DEFAULT_MESH_GEOMETRY_PARAMETERS as k, DEFAULT_PHYSICS_STATE as l, DEFAULT_RIGIDBODY_STATE as m, EntityType as n, ImageTarget as o, ImageTargetAnchor as p, type ImageTargetAnchorOptions as q, type ImageTargetReference as r, InstanceSlotComponent as s, type InstanceTransform as t, InstancedMeshComponent as u, type InstancedMeshKind as v, type LightValueState as w, type MaterialTypeValue as x, type MaterialValueState as y, MeshComponent as z };
|
|
@@ -598,12 +598,24 @@ declare function normalizePhysicsState(value: {
|
|
|
598
598
|
*
|
|
599
599
|
* @category Components
|
|
600
600
|
*/
|
|
601
|
+
/**
|
|
602
|
+
* Write a live Rapier ref as a NON-ENUMERABLE own property. Always via
|
|
603
|
+
* defineProperty (mirroring ScriptObjectComponent's `instance` ref): a
|
|
604
|
+
* history-restored clone that dropped the original slot would otherwise get an
|
|
605
|
+
* ENUMERABLE property from plain assignment, leaking Rapier objects — and for
|
|
606
|
+
* trimesh their huge vertex buffers — into snapshot/history/debug walks.
|
|
607
|
+
*/
|
|
608
|
+
declare function setPhysicsLiveRef(component: PhysicsComponent, key: "rigidBody" | "collider", value: RapierRigidBody | RapierCollider | null): void;
|
|
601
609
|
declare class PhysicsComponent extends Component {
|
|
602
610
|
/** Authoring state. Saved with the project. */
|
|
603
611
|
values: PhysicsState;
|
|
604
|
-
/**
|
|
612
|
+
/**
|
|
613
|
+
* Live Rapier rigid body. `null` until physics is initialized.
|
|
614
|
+
* NON-ENUMERABLE — Rapier wrappers (and, for trimesh, their vertex buffers)
|
|
615
|
+
* must never leak into snapshots/history/debug walks.
|
|
616
|
+
*/
|
|
605
617
|
rigidBody: RapierRigidBody | null;
|
|
606
|
-
/** Live Rapier collider. `null` until physics is initialized. */
|
|
618
|
+
/** Live Rapier collider. `null` until physics is initialized. NON-ENUMERABLE. */
|
|
607
619
|
collider: RapierCollider | null;
|
|
608
620
|
constructor(values?: {
|
|
609
621
|
rigidbody?: Partial<RigidbodyState>;
|
|
@@ -1156,4 +1168,4 @@ declare class VideoComponent extends Component {
|
|
|
1156
1168
|
stop(): void;
|
|
1157
1169
|
}
|
|
1158
1170
|
|
|
1159
|
-
export { SpriteComponent as $, AnimationComponent as A, MeshGeometryComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, type MeshGeometryParameters as F, type MeshGeometryParametersByKind as G, ModelComponent as H, ImageComponent as I, type PhysicsState as J, type PlaneMeshParameters as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type RadiusMeshParameters as Q, type RadiusHeightMeshParameters as R, type RigidbodyState as S, type RigidbodyType as T, ScriptComponent as U, type ScriptEntry as V, ScriptObjectComponent as W, type ScriptObjectComponentInput as X, type ScriptObjectRuntimeState as Y, Selectable as Z, SelectionTransformState as _, type AnimationComponentOptions as a, type TextureFilteringValue as a0, type TransformModeValue as a1, type TransformSpaceValue as a2, VideoComponent as a3, defaultMaterialValue as a4, normalizePhysicsState as a5, type AnimationStateCallbacks as
|
|
1171
|
+
export { SpriteComponent as $, AnimationComponent as A, MeshGeometryComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, type MeshGeometryParameters as F, type MeshGeometryParametersByKind as G, ModelComponent as H, ImageComponent as I, type PhysicsState as J, type PlaneMeshParameters as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type RadiusMeshParameters as Q, type RadiusHeightMeshParameters as R, type RigidbodyState as S, type RigidbodyType as T, ScriptComponent as U, type ScriptEntry as V, ScriptObjectComponent as W, type ScriptObjectComponentInput as X, type ScriptObjectRuntimeState as Y, Selectable as Z, SelectionTransformState as _, type AnimationComponentOptions as a, type TextureFilteringValue as a0, type TransformModeValue as a1, type TransformSpaceValue as a2, VideoComponent as a3, defaultMaterialValue as a4, normalizePhysicsState as a5, setPhysicsLiveRef as a6, type AnimationStateCallbacks as a7, AnimationStateMachine as a8, AnimationStateManager as a9, type StateMachine as aa, AudioComponent as b, type CameraComponentOptions as c, type CameraProjection as d, type CameraRuntimeType as e, type ColliderShape as f, type ColliderState as g, type CubeMeshParameters as h, DEFAULT_INSTANCED_MESH_PARAMETERS as i, DEFAULT_INSTANCE_TRANSFORM as j, DEFAULT_MESH_GEOMETRY_PARAMETERS as k, DEFAULT_PHYSICS_STATE as l, DEFAULT_RIGIDBODY_STATE as m, EntityType as n, ImageTarget as o, ImageTargetAnchor as p, type ImageTargetAnchorOptions as q, type ImageTargetReference as r, InstanceSlotComponent as s, type InstanceTransform as t, InstancedMeshComponent as u, type InstancedMeshKind as v, type LightValueState as w, type MaterialTypeValue as x, type MaterialValueState as y, MeshComponent as z };
|
|
@@ -43,7 +43,8 @@ __export(components_exports, {
|
|
|
43
43
|
TransformComponent: () => TransformComponent,
|
|
44
44
|
VideoComponent: () => VideoComponent,
|
|
45
45
|
defaultMaterialValue: () => defaultMaterialValue,
|
|
46
|
-
normalizePhysicsState: () => normalizePhysicsState
|
|
46
|
+
normalizePhysicsState: () => normalizePhysicsState,
|
|
47
|
+
setPhysicsLiveRef: () => setPhysicsLiveRef
|
|
47
48
|
});
|
|
48
49
|
|
|
49
50
|
// core/AnimationStateMachine.ts
|
|
@@ -1288,12 +1289,21 @@ function normalizePhysicsState(value) {
|
|
|
1288
1289
|
};
|
|
1289
1290
|
}
|
|
1290
1291
|
__name(normalizePhysicsState, "normalizePhysicsState");
|
|
1292
|
+
function setPhysicsLiveRef(component, key, value) {
|
|
1293
|
+
Object.defineProperty(component, key, {
|
|
1294
|
+
value,
|
|
1295
|
+
writable: true,
|
|
1296
|
+
configurable: true,
|
|
1297
|
+
enumerable: false
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
__name(setPhysicsLiveRef, "setPhysicsLiveRef");
|
|
1291
1301
|
var _PhysicsComponent = class _PhysicsComponent extends Component {
|
|
1292
1302
|
constructor(values) {
|
|
1293
1303
|
super();
|
|
1294
1304
|
this.values = normalizePhysicsState(values);
|
|
1295
|
-
this
|
|
1296
|
-
this
|
|
1305
|
+
setPhysicsLiveRef(this, "rigidBody", null);
|
|
1306
|
+
setPhysicsLiveRef(this, "collider", null);
|
|
1297
1307
|
}
|
|
1298
1308
|
/**
|
|
1299
1309
|
* Patch rigidbody and/or collider state. Each sub-object is deep-merged
|
|
@@ -1423,6 +1433,22 @@ function getMaterialType(material) {
|
|
|
1423
1433
|
return "standard";
|
|
1424
1434
|
}
|
|
1425
1435
|
__name(getMaterialType, "getMaterialType");
|
|
1436
|
+
function textureImageSrc(texture) {
|
|
1437
|
+
const src = texture?.image?.src;
|
|
1438
|
+
return typeof src === "string" ? src : void 0;
|
|
1439
|
+
}
|
|
1440
|
+
__name(textureImageSrc, "textureImageSrc");
|
|
1441
|
+
function textureSourceUrl(texture) {
|
|
1442
|
+
if (!texture?.image) {
|
|
1443
|
+
return void 0;
|
|
1444
|
+
}
|
|
1445
|
+
const currentSrc = texture.source?.data?.currentSrc;
|
|
1446
|
+
if (typeof currentSrc === "string" && currentSrc) {
|
|
1447
|
+
return currentSrc;
|
|
1448
|
+
}
|
|
1449
|
+
return textureImageSrc(texture);
|
|
1450
|
+
}
|
|
1451
|
+
__name(textureSourceUrl, "textureSourceUrl");
|
|
1426
1452
|
function createMaterialValue(material) {
|
|
1427
1453
|
const materialRecord = material;
|
|
1428
1454
|
const normalScale = materialRecord.normalScale;
|
|
@@ -1442,17 +1468,33 @@ function createMaterialValue(material) {
|
|
|
1442
1468
|
depthWrite: materialRecord.depthWrite !== false,
|
|
1443
1469
|
wireframe: Boolean(materialRecord.wireframe),
|
|
1444
1470
|
transparent: Boolean(materialRecord.transparent),
|
|
1445
|
-
textureMap: map
|
|
1446
|
-
alphaTextureMap:
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1471
|
+
textureMap: textureSourceUrl(map),
|
|
1472
|
+
alphaTextureMap: textureImageSrc(
|
|
1473
|
+
materialRecord.alphaMap
|
|
1474
|
+
),
|
|
1475
|
+
normalMap: textureImageSrc(
|
|
1476
|
+
materialRecord.normalMap
|
|
1477
|
+
),
|
|
1478
|
+
roughnessMap: textureImageSrc(
|
|
1479
|
+
materialRecord.roughnessMap
|
|
1480
|
+
),
|
|
1481
|
+
metalnessMap: textureImageSrc(
|
|
1482
|
+
materialRecord.metalnessMap
|
|
1483
|
+
),
|
|
1484
|
+
aoMap: textureImageSrc(materialRecord.aoMap),
|
|
1485
|
+
emissiveMap: textureImageSrc(
|
|
1486
|
+
materialRecord.emissiveMap
|
|
1487
|
+
),
|
|
1488
|
+
bumpMap: textureImageSrc(
|
|
1489
|
+
materialRecord.bumpMap
|
|
1490
|
+
),
|
|
1491
|
+
displacementMap: textureImageSrc(
|
|
1492
|
+
materialRecord.displacementMap
|
|
1493
|
+
),
|
|
1494
|
+
lightMap: textureImageSrc(
|
|
1495
|
+
materialRecord.lightMap
|
|
1496
|
+
),
|
|
1497
|
+
envMap: textureImageSrc(materialRecord.envMap),
|
|
1456
1498
|
textureFiltering: map?.magFilter === THREE5.NearestFilter ? "sharp" : "smooth",
|
|
1457
1499
|
useMipmaps: map?.generateMipmaps !== false
|
|
1458
1500
|
};
|
|
@@ -1869,6 +1911,6 @@ var _VideoComponent = class _VideoComponent extends Component {
|
|
|
1869
1911
|
__name(_VideoComponent, "VideoComponent");
|
|
1870
1912
|
var VideoComponent = _VideoComponent;
|
|
1871
1913
|
|
|
1872
|
-
export { AnimationComponent, AnimationStateMachine, AnimationStateManager, AudioComponent, CameraComponent, DEFAULT_COLLIDER_STATE, DEFAULT_ENVIRONMENT_STATE, DEFAULT_INSTANCED_MESH_PARAMETERS, DEFAULT_INSTANCE_TRANSFORM, DEFAULT_MESH_GEOMETRY_PARAMETERS, DEFAULT_PHYSICS_STATE, DEFAULT_POSTPROCESSING_STATE, DEFAULT_RIGIDBODY_STATE, EntityType, Environment, ImageComponent, ImageTarget, ImageTargetAnchor, InstanceSlotComponent, InstancedMeshComponent, LightComponent, MaterialComponent, MeshComponent, MeshGeometryComponent, ModelComponent, Name, Object3DRef, ParentId, PhysicsComponent, Postprocessing, PrefabInstance, PrefabNode, ScriptComponent, ScriptObjectComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, VideoComponent, components_exports, defaultMaterialValue, normalizePhysicsState };
|
|
1873
|
-
//# sourceMappingURL=chunk-
|
|
1874
|
-
//# sourceMappingURL=chunk-
|
|
1914
|
+
export { AnimationComponent, AnimationStateMachine, AnimationStateManager, AudioComponent, CameraComponent, DEFAULT_COLLIDER_STATE, DEFAULT_ENVIRONMENT_STATE, DEFAULT_INSTANCED_MESH_PARAMETERS, DEFAULT_INSTANCE_TRANSFORM, DEFAULT_MESH_GEOMETRY_PARAMETERS, DEFAULT_PHYSICS_STATE, DEFAULT_POSTPROCESSING_STATE, DEFAULT_RIGIDBODY_STATE, EntityType, Environment, ImageComponent, ImageTarget, ImageTargetAnchor, InstanceSlotComponent, InstancedMeshComponent, LightComponent, MaterialComponent, MeshComponent, MeshGeometryComponent, ModelComponent, Name, Object3DRef, ParentId, PhysicsComponent, Postprocessing, PrefabInstance, PrefabNode, ScriptComponent, ScriptObjectComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, VideoComponent, components_exports, defaultMaterialValue, normalizePhysicsState, setPhysicsLiveRef };
|
|
1915
|
+
//# sourceMappingURL=chunk-7BPHZWQ6.js.map
|
|
1916
|
+
//# sourceMappingURL=chunk-7BPHZWQ6.js.map
|