@relu-interactives/spatial-ecs 0.2.17 → 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 (54) hide show
  1. package/dist/{System-BeuJ1xt5.d.cts → System-me3iAcMF.d.cts} +150 -1
  2. package/dist/{System-BeuJ1xt5.d.ts → System-me3iAcMF.d.ts} +150 -1
  3. package/dist/{Video-Cym2C52L.d.ts → Video-DHnxjGhW.d.ts} +17 -3
  4. package/dist/{Video-D4B-z74P.d.cts → Video-U9hAnf9y.d.cts} +17 -3
  5. package/dist/{chunk-EPK6MA7X.js → chunk-5U3YS4JD.js} +1809 -8
  6. package/dist/chunk-5U3YS4JD.js.map +1 -0
  7. package/dist/{chunk-GRUK5TNL.js → chunk-AXRCGF63.js} +3 -3
  8. package/dist/{chunk-GRUK5TNL.js.map → chunk-AXRCGF63.js.map} +1 -1
  9. package/dist/{chunk-CJW6K3CL.js → chunk-K6KMKKJ6.js} +62 -5
  10. package/dist/chunk-K6KMKKJ6.js.map +1 -0
  11. package/dist/{chunk-FTIQQK62.js → chunk-V7BNVTJW.js} +50 -3
  12. package/dist/chunk-V7BNVTJW.js.map +1 -0
  13. package/dist/{chunk-R2WMVXZZ.js → chunk-ZXGHKX7N.js} +5 -3
  14. package/dist/chunk-ZXGHKX7N.js.map +1 -0
  15. package/dist/components/index.cjs +47 -0
  16. package/dist/components/index.cjs.map +1 -1
  17. package/dist/components/index.d.cts +3 -2
  18. package/dist/components/index.d.ts +3 -2
  19. package/dist/components/index.js +1 -1
  20. package/dist/docs/guide/components/material.md +4 -0
  21. package/dist/docs/guide/components/physics.md +10 -0
  22. package/dist/docs/guide/getting-started/editor/assets-browser.md +1 -1
  23. package/dist/docs/guide/prefabs.md +152 -0
  24. package/dist/docs/guide/world-api.md +1 -1
  25. package/dist/factories/index.cjs +136 -64
  26. package/dist/factories/index.cjs.map +1 -1
  27. package/dist/factories/index.d.cts +5 -4
  28. package/dist/factories/index.d.ts +5 -4
  29. package/dist/factories/index.js +3 -3
  30. package/dist/{index-BfoOC2CG.d.cts → index-CZo5I5Gs.d.cts} +76 -4
  31. package/dist/{index-BoJ3_6a3.d.ts → index-D7FSg0Au.d.ts} +76 -4
  32. package/dist/index.cjs +6386 -4962
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.cts +313 -7
  35. package/dist/index.d.ts +313 -7
  36. package/dist/index.js +407 -926
  37. package/dist/index.js.map +1 -1
  38. package/dist/systems/index.cjs +1386 -0
  39. package/dist/systems/index.cjs.map +1 -1
  40. package/dist/systems/index.d.cts +2 -2
  41. package/dist/systems/index.d.ts +2 -2
  42. package/dist/systems/index.js +3 -3
  43. package/dist/types.d.cts +1 -1
  44. package/dist/types.d.ts +1 -1
  45. package/dist/worldSnapshotUtils.cjs +3 -1
  46. package/dist/worldSnapshotUtils.cjs.map +1 -1
  47. package/dist/worldSnapshotUtils.d.cts +1 -1
  48. package/dist/worldSnapshotUtils.d.ts +1 -1
  49. package/dist/worldSnapshotUtils.js +1 -1
  50. package/package.json +4 -2
  51. package/dist/chunk-CJW6K3CL.js.map +0 -1
  52. package/dist/chunk-EPK6MA7X.js.map +0 -1
  53. package/dist/chunk-FTIQQK62.js.map +0 -1
  54. package/dist/chunk-R2WMVXZZ.js.map +0 -1
@@ -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-D4B-z74P.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-BeuJ1xt5.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
 
@@ -14,10 +14,11 @@ declare function createAudioComponent(world: World, entityId: number, path?: str
14
14
 
15
15
  declare function createCameraComponent(world: World, entityId: number, payload?: CameraComponentOptions): CameraComponent;
16
16
 
17
- declare function createPhysicsComponent(world: World, entityId: number, values?: {
17
+ type PhysicsFactoryValues = {
18
18
  rigidbody?: Partial<RigidbodyState>;
19
19
  collider?: Partial<ColliderState>;
20
- }): PhysicsComponent;
20
+ };
21
+ declare function createPhysicsComponent(world: World, entityId: number, values?: PhysicsFactoryValues): PhysicsComponent;
21
22
 
22
23
  declare function createEnvironmentComponent(world: World, entityId: number, values?: Partial<EnvironmentState>): Environment;
23
24
 
@@ -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-Cym2C52L.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-BeuJ1xt5.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
 
@@ -14,10 +14,11 @@ declare function createAudioComponent(world: World, entityId: number, path?: str
14
14
 
15
15
  declare function createCameraComponent(world: World, entityId: number, payload?: CameraComponentOptions): CameraComponent;
16
16
 
17
- declare function createPhysicsComponent(world: World, entityId: number, values?: {
17
+ type PhysicsFactoryValues = {
18
18
  rigidbody?: Partial<RigidbodyState>;
19
19
  collider?: Partial<ColliderState>;
20
- }): PhysicsComponent;
20
+ };
21
+ declare function createPhysicsComponent(world: World, entityId: number, values?: PhysicsFactoryValues): PhysicsComponent;
21
22
 
22
23
  declare function createEnvironmentComponent(world: World, entityId: number, values?: Partial<EnvironmentState>): Environment;
23
24
 
@@ -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-CJW6K3CL.js';
2
- import '../chunk-GRUK5TNL.js';
3
- import '../chunk-FTIQQK62.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,5 +1,72 @@
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 normalizePhysicsState } from './Video-D4B-z74P.cjs';
2
- import { 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-BeuJ1xt5.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
+
4
+ /**
5
+ * Marks the ROOT entity of a prefab instance and records its link to the
6
+ * source `.prefab` asset plus the instance's per-property overrides.
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
+ *
14
+ * `overrides` is a flat list of encoded strings so it survives snapshot
15
+ * serialization at any depth:
16
+ *
17
+ * ```
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)
23
+ * ```
24
+ *
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).
34
+ *
35
+ * @category Components
36
+ */
37
+ declare class PrefabInstance extends Component {
38
+ /** URL of the source `.prefab` asset (`localasset://…` inside the editor). */
39
+ url: string;
40
+ /** Encoded override paths — see class docs for the format. */
41
+ 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);
49
+ }
50
+
51
+ /**
52
+ * Stable identity for an entity that originated from a prefab asset.
53
+ *
54
+ * Every entity serialized into a `.prefab` file carries a `PrefabNode` with a
55
+ * uuid `nodeId`. Hydrating the prefab (editor instantiate or runtime spawn)
56
+ * restores the component, so each instance entity can be matched back to its
57
+ * prefab-file counterpart regardless of live entity ids. The per-property
58
+ * override system diffs and merges in nodeId-space.
59
+ *
60
+ * Node ids are unique within one prefab subtree — two instances of the same
61
+ * prefab intentionally share nodeIds.
62
+ *
63
+ * @category Components
64
+ */
65
+ declare class PrefabNode extends Component {
66
+ /** Stable uuid identifying this entity within its prefab definition. */
67
+ nodeId: string;
68
+ constructor(nodeId: string);
69
+ }
3
70
 
4
71
  declare const index_AnimationComponent: typeof AnimationComponent;
5
72
  declare const index_AnimationComponentOptions: typeof AnimationComponentOptions;
@@ -55,6 +122,10 @@ declare const index_PhysicsState: typeof PhysicsState;
55
122
  declare const index_PlaneMeshParameters: typeof PlaneMeshParameters;
56
123
  declare const index_Postprocessing: typeof Postprocessing;
57
124
  declare const index_PostprocessingState: typeof PostprocessingState;
125
+ type index_PrefabInstance = PrefabInstance;
126
+ declare const index_PrefabInstance: typeof PrefabInstance;
127
+ type index_PrefabNode = PrefabNode;
128
+ declare const index_PrefabNode: typeof PrefabNode;
58
129
  declare const index_RadiusHeightMeshParameters: typeof RadiusHeightMeshParameters;
59
130
  declare const index_RadiusMeshParameters: typeof RadiusMeshParameters;
60
131
  declare const index_RigidbodyState: typeof RigidbodyState;
@@ -71,9 +142,10 @@ declare const index_TransformModeValue: typeof TransformModeValue;
71
142
  declare const index_TransformSpaceValue: typeof TransformSpaceValue;
72
143
  declare const index_Vec3: typeof Vec3;
73
144
  declare const index_VideoComponent: typeof VideoComponent;
145
+ declare const index_defaultMaterialValue: typeof defaultMaterialValue;
74
146
  declare const index_normalizePhysicsState: typeof normalizePhysicsState;
75
147
  declare namespace index {
76
- 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_RadiusHeightMeshParameters as RadiusHeightMeshParameters, index_RadiusMeshParameters as RadiusMeshParameters, index_RigidbodyState as RigidbodyState, index_RigidbodyType as RigidbodyType, index_ScriptComponent as ScriptComponent, index_ScriptEntry as ScriptEntry, 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_normalizePhysicsState as normalizePhysicsState };
148
+ 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_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 };
77
149
  }
78
150
 
79
- export { index as i };
151
+ export { PrefabInstance as P, PrefabNode as a, index as i };
@@ -1,5 +1,72 @@
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 normalizePhysicsState } from './Video-Cym2C52L.js';
2
- import { 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-BeuJ1xt5.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
+
4
+ /**
5
+ * Marks the ROOT entity of a prefab instance and records its link to the
6
+ * source `.prefab` asset plus the instance's per-property overrides.
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
+ *
14
+ * `overrides` is a flat list of encoded strings so it survives snapshot
15
+ * serialization at any depth:
16
+ *
17
+ * ```
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)
23
+ * ```
24
+ *
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).
34
+ *
35
+ * @category Components
36
+ */
37
+ declare class PrefabInstance extends Component {
38
+ /** URL of the source `.prefab` asset (`localasset://…` inside the editor). */
39
+ url: string;
40
+ /** Encoded override paths — see class docs for the format. */
41
+ 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);
49
+ }
50
+
51
+ /**
52
+ * Stable identity for an entity that originated from a prefab asset.
53
+ *
54
+ * Every entity serialized into a `.prefab` file carries a `PrefabNode` with a
55
+ * uuid `nodeId`. Hydrating the prefab (editor instantiate or runtime spawn)
56
+ * restores the component, so each instance entity can be matched back to its
57
+ * prefab-file counterpart regardless of live entity ids. The per-property
58
+ * override system diffs and merges in nodeId-space.
59
+ *
60
+ * Node ids are unique within one prefab subtree — two instances of the same
61
+ * prefab intentionally share nodeIds.
62
+ *
63
+ * @category Components
64
+ */
65
+ declare class PrefabNode extends Component {
66
+ /** Stable uuid identifying this entity within its prefab definition. */
67
+ nodeId: string;
68
+ constructor(nodeId: string);
69
+ }
3
70
 
4
71
  declare const index_AnimationComponent: typeof AnimationComponent;
5
72
  declare const index_AnimationComponentOptions: typeof AnimationComponentOptions;
@@ -55,6 +122,10 @@ declare const index_PhysicsState: typeof PhysicsState;
55
122
  declare const index_PlaneMeshParameters: typeof PlaneMeshParameters;
56
123
  declare const index_Postprocessing: typeof Postprocessing;
57
124
  declare const index_PostprocessingState: typeof PostprocessingState;
125
+ type index_PrefabInstance = PrefabInstance;
126
+ declare const index_PrefabInstance: typeof PrefabInstance;
127
+ type index_PrefabNode = PrefabNode;
128
+ declare const index_PrefabNode: typeof PrefabNode;
58
129
  declare const index_RadiusHeightMeshParameters: typeof RadiusHeightMeshParameters;
59
130
  declare const index_RadiusMeshParameters: typeof RadiusMeshParameters;
60
131
  declare const index_RigidbodyState: typeof RigidbodyState;
@@ -71,9 +142,10 @@ declare const index_TransformModeValue: typeof TransformModeValue;
71
142
  declare const index_TransformSpaceValue: typeof TransformSpaceValue;
72
143
  declare const index_Vec3: typeof Vec3;
73
144
  declare const index_VideoComponent: typeof VideoComponent;
145
+ declare const index_defaultMaterialValue: typeof defaultMaterialValue;
74
146
  declare const index_normalizePhysicsState: typeof normalizePhysicsState;
75
147
  declare namespace index {
76
- 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_RadiusHeightMeshParameters as RadiusHeightMeshParameters, index_RadiusMeshParameters as RadiusMeshParameters, index_RigidbodyState as RigidbodyState, index_RigidbodyType as RigidbodyType, index_ScriptComponent as ScriptComponent, index_ScriptEntry as ScriptEntry, 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_normalizePhysicsState as normalizePhysicsState };
148
+ 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_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 };
77
149
  }
78
150
 
79
- export { index as i };
151
+ export { PrefabInstance as P, PrefabNode as a, index as i };