@relu-interactives/spatial-ecs 0.2.20 → 0.2.21

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 (41) hide show
  1. package/dist/{System-BjwOBx81.d.cts → System-me3iAcMF.d.cts} +5 -1
  2. package/dist/{System-BjwOBx81.d.ts → System-me3iAcMF.d.ts} +5 -1
  3. package/dist/{Video-B9z5AtIf.d.ts → Video-DHnxjGhW.d.ts} +1 -1
  4. package/dist/{Video-B8yVI1tF.d.cts → Video-U9hAnf9y.d.cts} +1 -1
  5. package/dist/{chunk-67MFQDHX.js → chunk-5U3YS4JD.js} +196 -33
  6. package/dist/chunk-5U3YS4JD.js.map +1 -0
  7. package/dist/{chunk-DY4ETMP2.js → chunk-AXRCGF63.js} +3 -3
  8. package/dist/{chunk-DY4ETMP2.js.map → chunk-AXRCGF63.js.map} +1 -1
  9. package/dist/{chunk-HUHN6IFD.js → chunk-K6KMKKJ6.js} +4 -4
  10. package/dist/{chunk-HUHN6IFD.js.map → chunk-K6KMKKJ6.js.map} +1 -1
  11. package/dist/{chunk-Z6OMYEXU.js → chunk-V7BNVTJW.js} +11 -3
  12. package/dist/chunk-V7BNVTJW.js.map +1 -0
  13. package/dist/components/index.cjs +9 -1
  14. package/dist/components/index.cjs.map +1 -1
  15. package/dist/components/index.d.cts +3 -3
  16. package/dist/components/index.d.ts +3 -3
  17. package/dist/components/index.js +1 -1
  18. package/dist/docs/guide/prefabs.md +24 -5
  19. package/dist/factories/index.d.cts +2 -2
  20. package/dist/factories/index.d.ts +2 -2
  21. package/dist/factories/index.js +3 -3
  22. package/dist/{index-LHLKpJhZ.d.cts → index-CZo5I5Gs.d.cts} +29 -13
  23. package/dist/{index-BBI2YdCu.d.ts → index-D7FSg0Au.d.ts} +29 -13
  24. package/dist/index.cjs +458 -40
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +108 -10
  27. package/dist/index.d.ts +108 -10
  28. package/dist/index.js +249 -11
  29. package/dist/index.js.map +1 -1
  30. package/dist/systems/index.cjs +26 -7
  31. package/dist/systems/index.cjs.map +1 -1
  32. package/dist/systems/index.d.cts +2 -2
  33. package/dist/systems/index.d.ts +2 -2
  34. package/dist/systems/index.js +3 -3
  35. package/dist/types.d.cts +1 -1
  36. package/dist/types.d.ts +1 -1
  37. package/dist/worldSnapshotUtils.d.cts +1 -1
  38. package/dist/worldSnapshotUtils.d.ts +1 -1
  39. package/package.json +1 -1
  40. package/dist/chunk-67MFQDHX.js.map +0 -1
  41. package/dist/chunk-Z6OMYEXU.js.map +0 -1
@@ -1,5 +1,5 @@
1
- export { 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 Selectable, X as SelectionTransformState, Y as SpriteComponent, Z as TextureFilteringValue, _ as TransformModeValue, $ as TransformSpaceValue, a0 as VideoComponent, a1 as defaultMaterialValue, a2 as normalizePhysicsState } from '../Video-B8yVI1tF.cjs';
2
- export { 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-BjwOBx81.cjs';
3
- export { P as PrefabInstance, a as PrefabNode } from '../index-LHLKpJhZ.cjs';
1
+ export { 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 Selectable, X as SelectionTransformState, Y as SpriteComponent, Z as TextureFilteringValue, _ as TransformModeValue, $ as TransformSpaceValue, a0 as VideoComponent, a1 as defaultMaterialValue, a2 as normalizePhysicsState } from '../Video-U9hAnf9y.cjs';
2
+ export { 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-me3iAcMF.cjs';
3
+ export { P as PrefabInstance, a as PrefabNode } from '../index-CZo5I5Gs.cjs';
4
4
  import 'three';
5
5
  import '@dimforge/rapier3d-compat';
@@ -1,5 +1,5 @@
1
- export { 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 Selectable, X as SelectionTransformState, Y as SpriteComponent, Z as TextureFilteringValue, _ as TransformModeValue, $ as TransformSpaceValue, a0 as VideoComponent, a1 as defaultMaterialValue, a2 as normalizePhysicsState } from '../Video-B9z5AtIf.js';
2
- export { 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-BjwOBx81.js';
3
- export { P as PrefabInstance, a as PrefabNode } from '../index-BBI2YdCu.js';
1
+ export { 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 Selectable, X as SelectionTransformState, Y as SpriteComponent, Z as TextureFilteringValue, _ as TransformModeValue, $ as TransformSpaceValue, a0 as VideoComponent, a1 as defaultMaterialValue, a2 as normalizePhysicsState } from '../Video-DHnxjGhW.js';
2
+ export { 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-me3iAcMF.js';
3
+ export { P as PrefabInstance, a as PrefabNode } from '../index-D7FSg0Au.js';
4
4
  import 'three';
5
5
  import '@dimforge/rapier3d-compat';
@@ -1,4 +1,4 @@
1
- export { AnimationComponent, 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, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, VideoComponent, defaultMaterialValue, normalizePhysicsState } from '../chunk-Z6OMYEXU.js';
1
+ export { AnimationComponent, 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, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, VideoComponent, defaultMaterialValue, normalizePhysicsState } from '../chunk-V7BNVTJW.js';
2
2
  import '../chunk-OY7ZODZP.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -55,15 +55,34 @@ keep their per-instance values while everything else syncs from the file.
55
55
  Always per-instance (never synced): the instance **root's** position /
56
56
  rotation / scale, name, and place in the scene hierarchy.
57
57
 
58
- v1 rules of thumb:
58
+ Rules of thumb:
59
59
 
60
60
  - Components or children you *add* to an instance are yours — prefab
61
61
  updates never remove them.
62
62
  - Components or children you *delete* from an instance come back on the
63
- next prefab apply (deletion tracking is not part of v1).
64
- - "Unpack" in the inspector detaches an instance permanently — it becomes
65
- ordinary objects with no link.
66
- - Nested prefabs (a prefab inside another prefab) are not supported in v1.
63
+ next prefab apply (deletion tracking is not supported).
64
+ - "Unpack" in the inspector detaches ONE level — the objects lose their
65
+ link but any nested instances inside survive as standalone instances.
66
+
67
+ ## Nested prefabs
68
+
69
+ Prefabs can contain other prefab instances: drag a prefab into an open
70
+ prefab (Prefab Mode), or create a prefab from a subtree that contains whole
71
+ instances. Node identity is scoped per placement, so a prefab may nest two
72
+ copies of the same child prefab and each keeps independent overrides.
73
+
74
+ - Editing a child prefab **cascades**: every prefab file that nests it is
75
+ patched (overrides preserved), and every scene instance updates when you
76
+ close the editor — transitively through any depth of nesting.
77
+ - A prefab can never contain itself, directly or through another prefab
78
+ (the editor rejects the drop).
79
+ - Only *whole* instances nest — a partial slice of an instance can't become
80
+ a prefab.
81
+ - In the scene, content can't be re-parented across a nested instance
82
+ boundary (its identity would change); open the host prefab to
83
+ restructure.
84
+ - Runtime spawning is unaffected: files are fully materialized, so
85
+ `spawnPrefab` needs no resolution regardless of nesting depth.
67
86
 
68
87
  ## Spawning at runtime
69
88
 
@@ -1,5 +1,5 @@
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, W as Selectable, X as SelectionTransformState, Y as SpriteComponent, v as InstancedMeshKind, F as MeshGeometryParameters, u as InstancedMeshComponent, s as InstanceSlotComponent, a0 as VideoComponent } from '../Video-B8yVI1tF.cjs';
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-BjwOBx81.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, W as Selectable, X as SelectionTransformState, Y as SpriteComponent, v as InstancedMeshKind, F as MeshGeometryParameters, u as InstancedMeshComponent, s as InstanceSlotComponent, a0 as VideoComponent } from '../Video-U9hAnf9y.cjs';
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-me3iAcMF.cjs';
3
3
  import * as THREE from 'three';
4
4
  import '@dimforge/rapier3d-compat';
5
5
 
@@ -1,5 +1,5 @@
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, W as Selectable, X as SelectionTransformState, Y as SpriteComponent, v as InstancedMeshKind, F as MeshGeometryParameters, u as InstancedMeshComponent, s as InstanceSlotComponent, a0 as VideoComponent } from '../Video-B9z5AtIf.js';
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-BjwOBx81.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, W as Selectable, X as SelectionTransformState, Y as SpriteComponent, v as InstancedMeshKind, F as MeshGeometryParameters, u as InstancedMeshComponent, s as InstanceSlotComponent, a0 as VideoComponent } from '../Video-DHnxjGhW.js';
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-me3iAcMF.js';
3
3
  import * as THREE from 'three';
4
4
  import '@dimforge/rapier3d-compat';
5
5
 
@@ -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, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVideoComponent, registerDefaultComponentFactories, registerDefaultFactories } from '../chunk-HUHN6IFD.js';
2
- import '../chunk-DY4ETMP2.js';
3
- import '../chunk-Z6OMYEXU.js';
1
+ export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstanceSlotComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVideoComponent, registerDefaultComponentFactories, registerDefaultFactories } from '../chunk-K6KMKKJ6.js';
2
+ import '../chunk-AXRCGF63.js';
3
+ import '../chunk-V7BNVTJW.js';
4
4
  import '../chunk-OY7ZODZP.js';
5
5
  //# sourceMappingURL=index.js.map
6
6
  //# sourceMappingURL=index.js.map
@@ -1,26 +1,36 @@
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 Selectable, X as SelectionTransformState, Y as SpriteComponent, Z as TextureFilteringValue, _ as TransformModeValue, $ as TransformSpaceValue, a0 as VideoComponent, a1 as defaultMaterialValue, a2 as normalizePhysicsState } from './Video-B8yVI1tF.cjs';
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-BjwOBx81.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 Selectable, X as SelectionTransformState, Y as SpriteComponent, Z as TextureFilteringValue, _ as TransformModeValue, $ as TransformSpaceValue, a0 as VideoComponent, a1 as defaultMaterialValue, a2 as normalizePhysicsState } from './Video-U9hAnf9y.cjs';
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-me3iAcMF.cjs';
3
3
 
4
4
  /**
5
5
  * Marks the ROOT entity of a prefab instance and records its link to the
6
6
  * source `.prefab` asset plus the instance's per-property overrides.
7
7
  *
8
+ * Instances may appear in a scene OR nested inside another prefab's file
9
+ * (nested prefabs): the nested root keeps the child prefab's `PrefabNode`
10
+ * identity AND this link. `instanceId` is a per-placement uuid that scopes
11
+ * node identity across nesting — two nested instances of the same prefab
12
+ * share nodeIds but never instanceIds, so override keys stay unambiguous.
13
+ *
8
14
  * `overrides` is a flat list of encoded strings so it survives snapshot
9
15
  * serialization at any depth:
10
16
  *
11
17
  * ```
12
- * "<nodeId>|<ComponentName>|<slash/separated/path>"
13
- * "<nodeId>|<ComponentName>|" // empty path = whole component overridden
18
+ * "<nodeKey>|<ComponentName>|<slash/separated/path>"
19
+ * "<nodeKey>|<ComponentName>|" // empty path = whole component overridden
20
+ * "<nodeKey>|+node|" // marker: node added by the HOST document
21
+ * // inside a nested region (never deleted by
22
+ * // file patching)
14
23
  * ```
15
24
  *
16
- * e.g. `"9f2c…|MaterialComponent|values/0/color"`.
17
- *
18
- * Overridden paths keep their per-instance values when the prefab asset is
19
- * re-applied; everything else syncs from the file. The instance root's
20
- * Transform, Name, and ParentId are implicitly per-instance and never appear
21
- * here. Overrides are an editor-side concern — the runtime never resolves
22
- * them (scene-placed instances are fully materialized; runtime spawns are
23
- * fresh copies of the file).
25
+ * where `<nodeKey>` is the entity's `PrefabNode.nodeId` prefixed by the
26
+ * `instanceId` chain of any nested instance roots between the scope root and
27
+ * the entity (e.g. `"9f2c…"` for direct children, `"<iB>/<bNode>"` inside a
28
+ * nested instance). Overridden paths keep their per-instance values when the
29
+ * prefab asset is re-applied; everything else syncs from the file. The
30
+ * instance root's Transform, Name, and ParentId are implicitly per-instance
31
+ * and never appear here. Overrides are an editor-side concern — the runtime
32
+ * never resolves them (scene-placed instances are fully materialized;
33
+ * runtime spawns are fresh copies of the file).
24
34
  *
25
35
  * @category Components
26
36
  */
@@ -29,7 +39,13 @@ declare class PrefabInstance extends Component {
29
39
  url: string;
30
40
  /** Encoded override paths — see class docs for the format. */
31
41
  overrides: string[];
32
- constructor(url: string, overrides?: string[]);
42
+ /**
43
+ * Per-placement uuid scoping node identity across nesting. Stable for the
44
+ * lifetime of the placement (persisted; survives applies) so override keys
45
+ * referencing nested content stay valid.
46
+ */
47
+ instanceId: string;
48
+ constructor(url: string, overrides?: string[], instanceId?: string);
33
49
  }
34
50
 
35
51
  /**
@@ -1,26 +1,36 @@
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 Selectable, X as SelectionTransformState, Y as SpriteComponent, Z as TextureFilteringValue, _ as TransformModeValue, $ as TransformSpaceValue, a0 as VideoComponent, a1 as defaultMaterialValue, a2 as normalizePhysicsState } from './Video-B9z5AtIf.js';
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-BjwOBx81.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 Selectable, X as SelectionTransformState, Y as SpriteComponent, Z as TextureFilteringValue, _ as TransformModeValue, $ as TransformSpaceValue, a0 as VideoComponent, a1 as defaultMaterialValue, a2 as normalizePhysicsState } from './Video-DHnxjGhW.js';
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-me3iAcMF.js';
3
3
 
4
4
  /**
5
5
  * Marks the ROOT entity of a prefab instance and records its link to the
6
6
  * source `.prefab` asset plus the instance's per-property overrides.
7
7
  *
8
+ * Instances may appear in a scene OR nested inside another prefab's file
9
+ * (nested prefabs): the nested root keeps the child prefab's `PrefabNode`
10
+ * identity AND this link. `instanceId` is a per-placement uuid that scopes
11
+ * node identity across nesting — two nested instances of the same prefab
12
+ * share nodeIds but never instanceIds, so override keys stay unambiguous.
13
+ *
8
14
  * `overrides` is a flat list of encoded strings so it survives snapshot
9
15
  * serialization at any depth:
10
16
  *
11
17
  * ```
12
- * "<nodeId>|<ComponentName>|<slash/separated/path>"
13
- * "<nodeId>|<ComponentName>|" // empty path = whole component overridden
18
+ * "<nodeKey>|<ComponentName>|<slash/separated/path>"
19
+ * "<nodeKey>|<ComponentName>|" // empty path = whole component overridden
20
+ * "<nodeKey>|+node|" // marker: node added by the HOST document
21
+ * // inside a nested region (never deleted by
22
+ * // file patching)
14
23
  * ```
15
24
  *
16
- * e.g. `"9f2c…|MaterialComponent|values/0/color"`.
17
- *
18
- * Overridden paths keep their per-instance values when the prefab asset is
19
- * re-applied; everything else syncs from the file. The instance root's
20
- * Transform, Name, and ParentId are implicitly per-instance and never appear
21
- * here. Overrides are an editor-side concern — the runtime never resolves
22
- * them (scene-placed instances are fully materialized; runtime spawns are
23
- * fresh copies of the file).
25
+ * where `<nodeKey>` is the entity's `PrefabNode.nodeId` prefixed by the
26
+ * `instanceId` chain of any nested instance roots between the scope root and
27
+ * the entity (e.g. `"9f2c…"` for direct children, `"<iB>/<bNode>"` inside a
28
+ * nested instance). Overridden paths keep their per-instance values when the
29
+ * prefab asset is re-applied; everything else syncs from the file. The
30
+ * instance root's Transform, Name, and ParentId are implicitly per-instance
31
+ * and never appear here. Overrides are an editor-side concern — the runtime
32
+ * never resolves them (scene-placed instances are fully materialized;
33
+ * runtime spawns are fresh copies of the file).
24
34
  *
25
35
  * @category Components
26
36
  */
@@ -29,7 +39,13 @@ declare class PrefabInstance extends Component {
29
39
  url: string;
30
40
  /** Encoded override paths — see class docs for the format. */
31
41
  overrides: string[];
32
- constructor(url: string, overrides?: string[]);
42
+ /**
43
+ * Per-placement uuid scoping node identity across nesting. Stable for the
44
+ * lifetime of the placement (persisted; survives applies) so override keys
45
+ * referencing nested content stay valid.
46
+ */
47
+ instanceId: string;
48
+ constructor(url: string, overrides?: string[], instanceId?: string);
33
49
  }
34
50
 
35
51
  /**