@relu-interactives/spatial-ecs 0.2.25 → 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/{chunk-J6736FFO.js → chunk-7BPHZWQ6.js} +45 -13
- package/dist/chunk-7BPHZWQ6.js.map +1 -0
- package/dist/{chunk-3P3ZBP7K.js → chunk-7JFSEV7A.js} +5 -4
- package/dist/chunk-7JFSEV7A.js.map +1 -0
- package/dist/{chunk-RJ4J5UEX.js → chunk-AT5SPSPM.js} +4 -4
- package/dist/{chunk-RJ4J5UEX.js.map → chunk-AT5SPSPM.js.map} +1 -1
- package/dist/{chunk-XFD74BQL.js → chunk-PZ4CAALA.js} +3 -3
- package/dist/{chunk-XFD74BQL.js.map → chunk-PZ4CAALA.js.map} +1 -1
- package/dist/components/index.cjs +43 -11
- package/dist/components/index.cjs.map +1 -1
- 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 +43 -11
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.js +3 -3
- package/dist/index.cjs +44 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -8
- package/dist/systems/index.cjs +44 -11
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.js +3 -3
- package/package.json +4 -4
- package/dist/chunk-3P3ZBP7K.js.map +0 -1
- package/dist/chunk-J6736FFO.js.map +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / applyPrefabToSnapshotInstances
|
|
6
|
+
|
|
7
|
+
# Function: applyPrefabToSnapshotInstances()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function applyPrefabToSnapshotInstances(
|
|
11
|
+
hostSnapshot,
|
|
12
|
+
nestedUrl,
|
|
13
|
+
newNestedSnapshot): ApplyPrefabToSnapshotResult;
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Defined in: [prefab/applyPrefabToSnapshot.ts:122](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/prefab/applyPrefabToSnapshot.ts#L122)
|
|
17
|
+
|
|
18
|
+
Patch every top-level-relative nested instance of `nestedUrl` inside
|
|
19
|
+
`hostSnapshot` with `newNestedSnapshot`. Deeper nesting (B inside C inside
|
|
20
|
+
A) is NOT touched here — it cascades through C's own file.
|
|
21
|
+
|
|
22
|
+
## Parameters
|
|
23
|
+
|
|
24
|
+
| Parameter | Type |
|
|
25
|
+
| ------ | ------ |
|
|
26
|
+
| `hostSnapshot` | [`SubtreeSnapshot`](../type-aliases/SubtreeSnapshot.md) |
|
|
27
|
+
| `nestedUrl` | `string` |
|
|
28
|
+
| `newNestedSnapshot` | [`SubtreeSnapshot`](../type-aliases/SubtreeSnapshot.md) |
|
|
29
|
+
|
|
30
|
+
## Returns
|
|
31
|
+
|
|
32
|
+
[`ApplyPrefabToSnapshotResult`](../type-aliases/ApplyPrefabToSnapshotResult.md)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / buildComponentValueMaps
|
|
6
|
+
|
|
7
|
+
# Function: buildComponentValueMaps()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function buildComponentValueMaps(snapshot): ComponentValueMaps;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [hydration/componentValues.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/hydration/componentValues.ts#L4)
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type |
|
|
18
|
+
| ------ | ------ |
|
|
19
|
+
| `snapshot` | [`EcsWorldStateSnapshotLike`](../type-aliases/EcsWorldStateSnapshotLike.md) |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
[`ComponentValueMaps`](../type-aliases/ComponentValueMaps.md)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / buildNodeKeyMapsFromSnapshot
|
|
6
|
+
|
|
7
|
+
# Function: buildNodeKeyMapsFromSnapshot()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function buildNodeKeyMapsFromSnapshot(snapshot, options?): NodeKeyMaps;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [prefab/nodeKeys.ts:70](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/prefab/nodeKeys.ts#L70)
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type |
|
|
18
|
+
| ------ | ------ |
|
|
19
|
+
| `snapshot` | [`SubtreeSnapshot`](../type-aliases/SubtreeSnapshot.md) |
|
|
20
|
+
| `options?` | \{ `scopeRootEntityId?`: `number`; \} |
|
|
21
|
+
| `options.scopeRootEntityId?` | `number` |
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
[`NodeKeyMaps`](../type-aliases/NodeKeyMaps.md)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / buildNodeMapsFromSnapshot
|
|
6
|
+
|
|
7
|
+
# Function: buildNodeMapsFromSnapshot()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function buildNodeMapsFromSnapshot(snapshot): NodeMaps;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [prefab/overrides.ts:86](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/prefab/overrides.ts#L86)
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type |
|
|
18
|
+
| ------ | ------ |
|
|
19
|
+
| `snapshot` | [`SubtreeSnapshot`](../type-aliases/SubtreeSnapshot.md) |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
[`NodeMaps`](../type-aliases/NodeMaps.md)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / canonicalizeComponentValue
|
|
6
|
+
|
|
7
|
+
# Function: canonicalizeComponentValue()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function canonicalizeComponentValue(
|
|
11
|
+
componentName,
|
|
12
|
+
value,
|
|
13
|
+
idToNode): unknown;
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Defined in: [prefab/overrides.ts:177](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/prefab/overrides.ts#L177)
|
|
17
|
+
|
|
18
|
+
Canonicalize a serialized component value into nodeId-space:
|
|
19
|
+
- entity-id fields → `{$node}` (internal) or raw id (external)
|
|
20
|
+
- ScriptComponent entries keep only `{className, scriptUrl, enabled, data}`
|
|
21
|
+
(entityId/runtimeState/runtimeMessage are per-instance transients)
|
|
22
|
+
- ScriptObjectComponent keeps only `{scriptUrl, className, enabled, data}`
|
|
23
|
+
(runtimeState/runtimeMessage are per-instance transients)
|
|
24
|
+
- Object3DRef keeps only `{visibility}` (the rest is a live object ref)
|
|
25
|
+
|
|
26
|
+
Keep the id-bearing field list in sync with `snapshotIdUtils.ts`.
|
|
27
|
+
|
|
28
|
+
## Parameters
|
|
29
|
+
|
|
30
|
+
| Parameter | Type |
|
|
31
|
+
| ------ | ------ |
|
|
32
|
+
| `componentName` | `string` |
|
|
33
|
+
| `value` | `unknown` |
|
|
34
|
+
| `idToNode` | `Map`\<`number`, `string`\> |
|
|
35
|
+
|
|
36
|
+
## Returns
|
|
37
|
+
|
|
38
|
+
`unknown`
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / clearModelCache
|
|
6
|
+
|
|
7
|
+
# Function: clearModelCache()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function clearModelCache(url?): void;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [utils/modelCache.ts:71](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/utils/modelCache.ts#L71)
|
|
14
|
+
|
|
15
|
+
Forget cached models (one URL, or everything). Subsequent loads fetch and
|
|
16
|
+
parse anew. Does not dispose GPU resources — live clones may still use them.
|
|
17
|
+
|
|
18
|
+
## Parameters
|
|
19
|
+
|
|
20
|
+
| Parameter | Type |
|
|
21
|
+
| ------ | ------ |
|
|
22
|
+
| `url?` | `string` |
|
|
23
|
+
|
|
24
|
+
## Returns
|
|
25
|
+
|
|
26
|
+
`void`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / clearPrefabCache
|
|
6
|
+
|
|
7
|
+
# Function: clearPrefabCache()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function clearPrefabCache(url?): void;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [prefab/spawnPrefab.ts:98](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/prefab/spawnPrefab.ts#L98)
|
|
14
|
+
|
|
15
|
+
Drop one cached prefab (or all when no url is given).
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
| Parameter | Type |
|
|
20
|
+
| ------ | ------ |
|
|
21
|
+
| `url?` | `string` |
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`void`
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / collectDiffPaths
|
|
6
|
+
|
|
7
|
+
# Function: collectDiffPaths()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function collectDiffPaths(
|
|
11
|
+
base,
|
|
12
|
+
current,
|
|
13
|
+
prefix?,
|
|
14
|
+
out?): string[];
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Defined in: [prefab/overrides.ts:338](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/prefab/overrides.ts#L338)
|
|
18
|
+
|
|
19
|
+
Collect leaf paths where two canonical values differ. Semantics:
|
|
20
|
+
- `{$node}` refs compare atomically by nodeId
|
|
21
|
+
- arrays of differing length are ONE atomic override (the array path);
|
|
22
|
+
equal lengths recurse per index
|
|
23
|
+
- object key present on one side only marks that key's path
|
|
24
|
+
- type mismatches mark the current path
|
|
25
|
+
An empty-string path means the values differ at the top level.
|
|
26
|
+
|
|
27
|
+
## Parameters
|
|
28
|
+
|
|
29
|
+
| Parameter | Type | Default value |
|
|
30
|
+
| ------ | ------ | ------ |
|
|
31
|
+
| `base` | `unknown` | `undefined` |
|
|
32
|
+
| `current` | `unknown` | `undefined` |
|
|
33
|
+
| `prefix` | `string` | `""` |
|
|
34
|
+
| `out` | `string`[] | `[]` |
|
|
35
|
+
|
|
36
|
+
## Returns
|
|
37
|
+
|
|
38
|
+
`string`[]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / collectDirectPrefabDependencies
|
|
6
|
+
|
|
7
|
+
# Function: collectDirectPrefabDependencies()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function collectDirectPrefabDependencies(snapshot): string[];
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [prefab/dependencies.ts:9](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/prefab/dependencies.ts#L9)
|
|
14
|
+
|
|
15
|
+
Direct (top-level-relative) prefab urls a document depends on — the edges
|
|
16
|
+
of the nesting graph. Deeper nesting is reached transitively through each
|
|
17
|
+
dependency's own file, never directly.
|
|
18
|
+
|
|
19
|
+
## Parameters
|
|
20
|
+
|
|
21
|
+
| Parameter | Type |
|
|
22
|
+
| ------ | ------ |
|
|
23
|
+
| `snapshot` | [`SubtreeSnapshot`](../type-aliases/SubtreeSnapshot.md) |
|
|
24
|
+
|
|
25
|
+
## Returns
|
|
26
|
+
|
|
27
|
+
`string`[]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / collectEntitySubtree
|
|
6
|
+
|
|
7
|
+
# Function: collectEntitySubtree()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function collectEntitySubtree(world, rootIds): number[];
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [prefab/collectEntitySubtree.ts:11](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/prefab/collectEntitySubtree.ts#L11)
|
|
14
|
+
|
|
15
|
+
Collect the given roots plus every descendant, BFS parent-first, using the
|
|
16
|
+
`ParentId` component edges. Parent-first ordering matters: serialization
|
|
17
|
+
renumbers ids in this order and instantiation creates entities in file
|
|
18
|
+
order, so parents always exist before their children are linked.
|
|
19
|
+
|
|
20
|
+
## Parameters
|
|
21
|
+
|
|
22
|
+
| Parameter | Type |
|
|
23
|
+
| ------ | ------ |
|
|
24
|
+
| `world` | [`World`](../classes/World.md) |
|
|
25
|
+
| `rootIds` | `number`[] |
|
|
26
|
+
|
|
27
|
+
## Returns
|
|
28
|
+
|
|
29
|
+
`number`[]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / collectSnapshotSubtreeIds
|
|
6
|
+
|
|
7
|
+
# Function: collectSnapshotSubtreeIds()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function collectSnapshotSubtreeIds(snapshot, rootEntityId): number[];
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [prefab/nodeKeys.ts:166](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/prefab/nodeKeys.ts#L166)
|
|
14
|
+
|
|
15
|
+
JSON-space subtree ids (root first, BFS) via ParentId edges.
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
| Parameter | Type |
|
|
20
|
+
| ------ | ------ |
|
|
21
|
+
| `snapshot` | [`SubtreeSnapshot`](../type-aliases/SubtreeSnapshot.md) |
|
|
22
|
+
| `rootEntityId` | `number` |
|
|
23
|
+
|
|
24
|
+
## Returns
|
|
25
|
+
|
|
26
|
+
`number`[]
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / computeInstanceOverrides
|
|
6
|
+
|
|
7
|
+
# Function: computeInstanceOverrides()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function computeInstanceOverrides(
|
|
11
|
+
baseSnapshot,
|
|
12
|
+
instanceSnapshot,
|
|
13
|
+
options?): string[];
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Defined in: [prefab/overrides.ts:416](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/prefab/overrides.ts#L416)
|
|
17
|
+
|
|
18
|
+
Diff a live instance subtree against its prefab base (both as serialized
|
|
19
|
+
subtree snapshots carrying PrefabNode identity) and return the encoded
|
|
20
|
+
override list: every path where the instance deviates from the base.
|
|
21
|
+
|
|
22
|
+
Identity is nodeKey-scoped ([buildNodeKeyMapsFromSnapshot](buildNodeKeyMapsFromSnapshot.md)), so
|
|
23
|
+
nested instance regions diff correctly; for nested-free documents the
|
|
24
|
+
keys degenerate to bare nodeIds (v1 behavior unchanged).
|
|
25
|
+
|
|
26
|
+
Policies: components missing on the instance produce no override (apply
|
|
27
|
+
re-adds them); components/nodes only on the instance are local additions
|
|
28
|
+
and produce no override — EXCEPT when `emitAdditionMarkers` is set
|
|
29
|
+
(file-space callers), which records `"<key>|+node|"` for instance nodes
|
|
30
|
+
absent from the base so pure-JSON patching never deletes host-authored
|
|
31
|
+
nodes inside nested regions.
|
|
32
|
+
|
|
33
|
+
## Parameters
|
|
34
|
+
|
|
35
|
+
| Parameter | Type |
|
|
36
|
+
| ------ | ------ |
|
|
37
|
+
| `baseSnapshot` | [`SubtreeSnapshot`](../type-aliases/SubtreeSnapshot.md) |
|
|
38
|
+
| `instanceSnapshot` | [`SubtreeSnapshot`](../type-aliases/SubtreeSnapshot.md) |
|
|
39
|
+
| `options?` | \{ `emitAdditionMarkers?`: `boolean`; \} |
|
|
40
|
+
| `options.emitAdditionMarkers?` | `boolean` |
|
|
41
|
+
|
|
42
|
+
## Returns
|
|
43
|
+
|
|
44
|
+
`string`[]
|
|
@@ -13,7 +13,7 @@ function createAnimationComponent(
|
|
|
13
13
|
args): AnimationComponent;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/AnimationFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/AnimationFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/AnimationFactory.ts#L4)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -15,7 +15,7 @@ function createAudioComponent(
|
|
|
15
15
|
context?): AudioComponent;
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
Defined in: [factories/components/AudioComponentFactory.ts:126](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
18
|
+
Defined in: [factories/components/AudioComponentFactory.ts:126](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/AudioComponentFactory.ts#L126)
|
|
19
19
|
|
|
20
20
|
## Parameters
|
|
21
21
|
|
|
@@ -13,7 +13,7 @@ function createCameraComponent(
|
|
|
13
13
|
payload?): CameraComponent;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/CameraFactory.ts:7](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/CameraFactory.ts:7](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/CameraFactory.ts#L7)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ function createEntityTypeComponent(
|
|
|
13
13
|
args): EntityType;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/EntityTypeFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/EntityTypeFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/EntityTypeFactory.ts#L4)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -21,7 +21,7 @@ Defined in: [factories/components/EntityTypeFactory.ts:4](https://github.com/Rel
|
|
|
21
21
|
| ------ | ------ |
|
|
22
22
|
| `world` | [`World`](../classes/World.md) |
|
|
23
23
|
| `entityId` | `number` |
|
|
24
|
-
| ...`args` | \[ \| `"model"` \| `"image"` \| `"capsule"` \| `"cube"` \| `"cylinder"` \| `"plane"` \| `"sphere"` \| `"empty"` \| `"imageTarget"` \| `"sprite"` \| `"audio"` \| `"camera"` \| `"video"` \| `"ambientLight"` \| `"directionalLight"` \| `"pointLight"` \| `"spotLight"` \| `"areaLight"` \| `"instancedMesh"` \| `"instanceSlot"` \| `"editorUtility"`\] |
|
|
24
|
+
| ...`args` | \[ \| `"model"` \| `"image"` \| `"capsule"` \| `"cube"` \| `"cylinder"` \| `"plane"` \| `"sphere"` \| `"empty"` \| `"imageTarget"` \| `"sprite"` \| `"audio"` \| `"camera"` \| `"video"` \| `"ambientLight"` \| `"directionalLight"` \| `"pointLight"` \| `"spotLight"` \| `"areaLight"` \| `"instancedMesh"` \| `"instanceSlot"` \| `"scriptObject"` \| `"editorUtility"`\] |
|
|
25
25
|
|
|
26
26
|
## Returns
|
|
27
27
|
|
|
@@ -13,7 +13,7 @@ function createEnvironmentComponent(
|
|
|
13
13
|
values?): Environment;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/EnvironmentFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/EnvironmentFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/EnvironmentFactory.ts#L4)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ function createImageComponent(
|
|
|
13
13
|
args): ImageComponent;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/ImageComponentFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/ImageComponentFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/ImageComponentFactory.ts#L4)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ function createImageTargetAnchorComponent(
|
|
|
13
13
|
args): ImageTargetAnchor;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/ImageTargetAnchorFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/ImageTargetAnchorFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/ImageTargetAnchorFactory.ts#L4)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ function createImageTargetComponent(
|
|
|
13
13
|
args): ImageTarget;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/ImageTargetFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/ImageTargetFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/ImageTargetFactory.ts#L4)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -14,7 +14,7 @@ function createInstanceSlotComponent(
|
|
|
14
14
|
slotIndex): InstanceSlotComponent;
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Defined in: [factories/components/InstanceSlotComponentFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
17
|
+
Defined in: [factories/components/InstanceSlotComponentFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/InstanceSlotComponentFactory.ts#L4)
|
|
18
18
|
|
|
19
19
|
## Parameters
|
|
20
20
|
|
|
@@ -15,7 +15,7 @@ function createInstancedMeshComponent(
|
|
|
15
15
|
options?): InstancedMeshComponent;
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
Defined in: [factories/components/InstancedMeshComponentFactory.ts:6](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
18
|
+
Defined in: [factories/components/InstancedMeshComponentFactory.ts:6](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/InstancedMeshComponentFactory.ts#L6)
|
|
19
19
|
|
|
20
20
|
## Parameters
|
|
21
21
|
|
|
@@ -13,7 +13,7 @@ function createLightComponent(
|
|
|
13
13
|
args): LightComponent;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/LightFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/LightFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/LightFactory.ts#L4)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ function createMaterialComponent(
|
|
|
13
13
|
args): MaterialComponent;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/MaterialFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/MaterialFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/MaterialFactory.ts#L4)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ function createMeshComponent(
|
|
|
13
13
|
args): MeshComponent;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/MeshFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/MeshFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/MeshFactory.ts#L4)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ function createMeshGeometryComponent(
|
|
|
13
13
|
args): MeshGeometryComponent;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/MeshGeometryFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/MeshGeometryFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/MeshGeometryFactory.ts#L4)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ function createModelComponent(
|
|
|
13
13
|
args): ModelComponent;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/ModelFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/ModelFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/ModelFactory.ts#L4)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ function createNameComponent(
|
|
|
13
13
|
args): Name;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/NameFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/NameFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/NameFactory.ts#L4)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ function createObject3DRefComponent(
|
|
|
13
13
|
args): Object3DRef;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/Object3DRefFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/Object3DRefFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/Object3DRefFactory.ts#L4)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ function createParentIdComponent(
|
|
|
13
13
|
args): ParentId;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/ParentIdFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/ParentIdFactory.ts:4](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/ParentIdFactory.ts#L4)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ function createPhysicsComponent(
|
|
|
13
13
|
values?): PhysicsComponent;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/PhysicsFactory.ts:
|
|
16
|
+
Defined in: [factories/components/PhysicsFactory.ts:95](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/PhysicsFactory.ts#L95)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -21,9 +21,7 @@ Defined in: [factories/components/PhysicsFactory.ts:8](https://github.com/Relu-I
|
|
|
21
21
|
| ------ | ------ |
|
|
22
22
|
| `world` | [`World`](../classes/World.md) |
|
|
23
23
|
| `entityId` | `number` |
|
|
24
|
-
| `values?` |
|
|
25
|
-
| `values.rigidbody?` | `Partial`\<[`RigidbodyState`](../../components/type-aliases/RigidbodyState.md)\> |
|
|
26
|
-
| `values.collider?` | `Partial`\<[`ColliderState`](../../components/type-aliases/ColliderState.md)\> |
|
|
24
|
+
| `values?` | `PhysicsFactoryValues` |
|
|
27
25
|
|
|
28
26
|
## Returns
|
|
29
27
|
|
|
@@ -13,7 +13,7 @@ function createPostprocessingComponent(
|
|
|
13
13
|
values?): Postprocessing;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/PostprocessingFactory.ts:7](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/PostprocessingFactory.ts:7](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/PostprocessingFactory.ts#L7)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ function createScriptComponent(
|
|
|
13
13
|
payload?): ScriptComponent;
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Defined in: [factories/components/ScriptComponentFactory.ts:8](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
16
|
+
Defined in: [factories/components/ScriptComponentFactory.ts:8](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/ScriptComponentFactory.ts#L8)
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / createScriptObjectComponent
|
|
6
|
+
|
|
7
|
+
# Function: createScriptObjectComponent()
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
function createScriptObjectComponent(
|
|
11
|
+
world,
|
|
12
|
+
entityId,
|
|
13
|
+
payload?): ScriptObjectComponent;
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Defined in: [factories/components/ScriptObjectComponentFactory.ts:7](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/factories/components/ScriptObjectComponentFactory.ts#L7)
|
|
17
|
+
|
|
18
|
+
## Parameters
|
|
19
|
+
|
|
20
|
+
| Parameter | Type |
|
|
21
|
+
| ------ | ------ |
|
|
22
|
+
| `world` | [`World`](../classes/World.md) |
|
|
23
|
+
| `entityId` | `number` |
|
|
24
|
+
| `payload` | [`ScriptObjectComponentInput`](../../components/type-aliases/ScriptObjectComponentInput.md) |
|
|
25
|
+
|
|
26
|
+
## Returns
|
|
27
|
+
|
|
28
|
+
[`ScriptObjectComponent`](../../components/classes/ScriptObjectComponent.md)
|