@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
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: LightSyncSystem
|
|
8
8
|
|
|
9
|
-
Defined in: [systems/LightSyncSystem.ts:69](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
9
|
+
Defined in: [systems/LightSyncSystem.ts:69](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/LightSyncSystem.ts#L69)
|
|
10
10
|
|
|
11
11
|
## Implements
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ new LightSyncSystem(): LightSyncSystem;
|
|
|
32
32
|
update(world): void;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Defined in: [systems/LightSyncSystem.ts:72](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
35
|
+
Defined in: [systems/LightSyncSystem.ts:72](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/LightSyncSystem.ts#L72)
|
|
36
36
|
|
|
37
37
|
#### Parameters
|
|
38
38
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: MaterialSyncSystem
|
|
8
8
|
|
|
9
|
-
Defined in: [systems/MaterialSyncSystem.ts:282](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
9
|
+
Defined in: [systems/MaterialSyncSystem.ts:282](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/MaterialSyncSystem.ts#L282)
|
|
10
10
|
|
|
11
11
|
## Implements
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ new MaterialSyncSystem(): MaterialSyncSystem;
|
|
|
32
32
|
update(world): void;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Defined in: [systems/MaterialSyncSystem.ts:286](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
35
|
+
Defined in: [systems/MaterialSyncSystem.ts:286](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/MaterialSyncSystem.ts#L286)
|
|
36
36
|
|
|
37
37
|
#### Parameters
|
|
38
38
|
|
|
@@ -56,7 +56,7 @@ Defined in: [systems/MaterialSyncSystem.ts:286](https://github.com/Relu-Interact
|
|
|
56
56
|
dispose(): void;
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
Defined in: [systems/MaterialSyncSystem.ts:365](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
59
|
+
Defined in: [systems/MaterialSyncSystem.ts:365](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/MaterialSyncSystem.ts#L365)
|
|
60
60
|
|
|
61
61
|
#### Returns
|
|
62
62
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: MeshGeometrySystem
|
|
8
8
|
|
|
9
|
-
Defined in: [systems/MeshGeometrySystem.ts:161](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
9
|
+
Defined in: [systems/MeshGeometrySystem.ts:161](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/MeshGeometrySystem.ts#L161)
|
|
10
10
|
|
|
11
11
|
## Implements
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ new MeshGeometrySystem(): MeshGeometrySystem;
|
|
|
32
32
|
update(world): void;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Defined in: [systems/MeshGeometrySystem.ts:165](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
35
|
+
Defined in: [systems/MeshGeometrySystem.ts:165](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/MeshGeometrySystem.ts#L165)
|
|
36
36
|
|
|
37
37
|
#### Parameters
|
|
38
38
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: ObjectManagementSystem
|
|
8
8
|
|
|
9
|
-
Defined in: [systems/ObjectManagementSystem.ts:
|
|
9
|
+
Defined in: [systems/ObjectManagementSystem.ts:93](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectManagementSystem.ts#L93)
|
|
10
10
|
|
|
11
11
|
## Implements
|
|
12
12
|
|
|
@@ -23,7 +23,7 @@ new ObjectManagementSystem(
|
|
|
23
23
|
isEditor?): ObjectManagementSystem;
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Defined in: [systems/ObjectManagementSystem.ts:
|
|
26
|
+
Defined in: [systems/ObjectManagementSystem.ts:104](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectManagementSystem.ts#L104)
|
|
27
27
|
|
|
28
28
|
#### Parameters
|
|
29
29
|
|
|
@@ -45,7 +45,7 @@ Defined in: [systems/ObjectManagementSystem.ts:102](https://github.com/Relu-Inte
|
|
|
45
45
|
register(kind, factory): void;
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
Defined in: [systems/ObjectManagementSystem.ts:
|
|
48
|
+
Defined in: [systems/ObjectManagementSystem.ts:114](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectManagementSystem.ts#L114)
|
|
49
49
|
|
|
50
50
|
#### Parameters
|
|
51
51
|
|
|
@@ -66,7 +66,7 @@ Defined in: [systems/ObjectManagementSystem.ts:112](https://github.com/Relu-Inte
|
|
|
66
66
|
registerComponentFactory(kind, factory): void;
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
Defined in: [systems/ObjectManagementSystem.ts:
|
|
69
|
+
Defined in: [systems/ObjectManagementSystem.ts:118](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectManagementSystem.ts#L118)
|
|
70
70
|
|
|
71
71
|
#### Parameters
|
|
72
72
|
|
|
@@ -87,7 +87,7 @@ Defined in: [systems/ObjectManagementSystem.ts:116](https://github.com/Relu-Inte
|
|
|
87
87
|
getOrCreateAudioListener(): AudioListener;
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
Defined in: [systems/ObjectManagementSystem.ts:
|
|
90
|
+
Defined in: [systems/ObjectManagementSystem.ts:125](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectManagementSystem.ts#L125)
|
|
91
91
|
|
|
92
92
|
#### Returns
|
|
93
93
|
|
|
@@ -101,7 +101,7 @@ Defined in: [systems/ObjectManagementSystem.ts:123](https://github.com/Relu-Inte
|
|
|
101
101
|
isEditorMode(): boolean;
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
Defined in: [systems/ObjectManagementSystem.ts:
|
|
104
|
+
Defined in: [systems/ObjectManagementSystem.ts:137](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectManagementSystem.ts#L137)
|
|
105
105
|
|
|
106
106
|
#### Returns
|
|
107
107
|
|
|
@@ -115,7 +115,7 @@ Defined in: [systems/ObjectManagementSystem.ts:135](https://github.com/Relu-Inte
|
|
|
115
115
|
getComponentFactory(kind): ComponentFactory | null;
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
Defined in: [systems/ObjectManagementSystem.ts:
|
|
118
|
+
Defined in: [systems/ObjectManagementSystem.ts:141](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectManagementSystem.ts#L141)
|
|
119
119
|
|
|
120
120
|
#### Parameters
|
|
121
121
|
|
|
@@ -139,7 +139,7 @@ createComponentNow(
|
|
|
139
139
|
args): unknown;
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
Defined in: [systems/ObjectManagementSystem.ts:
|
|
142
|
+
Defined in: [systems/ObjectManagementSystem.ts:145](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectManagementSystem.ts#L145)
|
|
143
143
|
|
|
144
144
|
#### Parameters
|
|
145
145
|
|
|
@@ -165,7 +165,7 @@ requestCreate(
|
|
|
165
165
|
onCreated?): void;
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
Defined in: [systems/ObjectManagementSystem.ts:
|
|
168
|
+
Defined in: [systems/ObjectManagementSystem.ts:159](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectManagementSystem.ts#L159)
|
|
169
169
|
|
|
170
170
|
#### Parameters
|
|
171
171
|
|
|
@@ -190,7 +190,7 @@ createNow(
|
|
|
190
190
|
payload?): number;
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
Defined in: [systems/ObjectManagementSystem.ts:
|
|
193
|
+
Defined in: [systems/ObjectManagementSystem.ts:167](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectManagementSystem.ts#L167)
|
|
194
194
|
|
|
195
195
|
#### Parameters
|
|
196
196
|
|
|
@@ -215,7 +215,7 @@ deleteEntity(
|
|
|
215
215
|
dispose?): boolean;
|
|
216
216
|
```
|
|
217
217
|
|
|
218
|
-
Defined in: [systems/ObjectManagementSystem.ts:
|
|
218
|
+
Defined in: [systems/ObjectManagementSystem.ts:219](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectManagementSystem.ts#L219)
|
|
219
219
|
|
|
220
220
|
Removes an entity from the ECS world and its associated `Object3D` from the
|
|
221
221
|
THREE.js scene graph.
|
|
@@ -257,7 +257,7 @@ setParent(
|
|
|
257
257
|
options?): boolean;
|
|
258
258
|
```
|
|
259
259
|
|
|
260
|
-
Defined in: [systems/ObjectManagementSystem.ts:
|
|
260
|
+
Defined in: [systems/ObjectManagementSystem.ts:253](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectManagementSystem.ts#L253)
|
|
261
261
|
|
|
262
262
|
#### Parameters
|
|
263
263
|
|
|
@@ -281,7 +281,7 @@ Defined in: [systems/ObjectManagementSystem.ts:246](https://github.com/Relu-Inte
|
|
|
281
281
|
reconcileSceneFromWorld(world): void;
|
|
282
282
|
```
|
|
283
283
|
|
|
284
|
-
Defined in: [systems/ObjectManagementSystem.ts:
|
|
284
|
+
Defined in: [systems/ObjectManagementSystem.ts:343](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectManagementSystem.ts#L343)
|
|
285
285
|
|
|
286
286
|
#### Parameters
|
|
287
287
|
|
|
@@ -301,7 +301,7 @@ Defined in: [systems/ObjectManagementSystem.ts:336](https://github.com/Relu-Inte
|
|
|
301
301
|
update(world): void;
|
|
302
302
|
```
|
|
303
303
|
|
|
304
|
-
Defined in: [systems/ObjectManagementSystem.ts:
|
|
304
|
+
Defined in: [systems/ObjectManagementSystem.ts:387](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectManagementSystem.ts#L387)
|
|
305
305
|
|
|
306
306
|
#### Parameters
|
|
307
307
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: ObjectVisibilitySystem
|
|
8
8
|
|
|
9
|
-
Defined in: [systems/ObjectVisibilitySystem.ts:5](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
9
|
+
Defined in: [systems/ObjectVisibilitySystem.ts:5](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectVisibilitySystem.ts#L5)
|
|
10
10
|
|
|
11
11
|
## Implements
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ new ObjectVisibilitySystem(): ObjectVisibilitySystem;
|
|
|
32
32
|
update(world): void;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Defined in: [systems/ObjectVisibilitySystem.ts:6](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
35
|
+
Defined in: [systems/ObjectVisibilitySystem.ts:6](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ObjectVisibilitySystem.ts#L6)
|
|
36
36
|
|
|
37
37
|
#### Parameters
|
|
38
38
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: PhysicsSyncSystem
|
|
8
8
|
|
|
9
|
-
Defined in: [systems/PhysicsSyncSystem.ts:
|
|
9
|
+
Defined in: [systems/PhysicsSyncSystem.ts:352](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/PhysicsSyncSystem.ts#L352)
|
|
10
10
|
|
|
11
11
|
## Implements
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ Defined in: [systems/PhysicsSyncSystem.ts:285](https://github.com/Relu-Interacti
|
|
|
20
20
|
new PhysicsSyncSystem(options?): PhysicsSyncSystem;
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Defined in: [systems/PhysicsSyncSystem.ts:
|
|
23
|
+
Defined in: [systems/PhysicsSyncSystem.ts:362](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/PhysicsSyncSystem.ts#L362)
|
|
24
24
|
|
|
25
25
|
#### Parameters
|
|
26
26
|
|
|
@@ -41,7 +41,7 @@ Defined in: [systems/PhysicsSyncSystem.ts:295](https://github.com/Relu-Interacti
|
|
|
41
41
|
update(world, deltaTime): void;
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Defined in: [systems/PhysicsSyncSystem.ts:
|
|
44
|
+
Defined in: [systems/PhysicsSyncSystem.ts:416](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/PhysicsSyncSystem.ts#L416)
|
|
45
45
|
|
|
46
46
|
#### Parameters
|
|
47
47
|
|
|
@@ -66,7 +66,7 @@ Defined in: [systems/PhysicsSyncSystem.ts:349](https://github.com/Relu-Interacti
|
|
|
66
66
|
dispose(world): void;
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
Defined in: [systems/PhysicsSyncSystem.ts:
|
|
69
|
+
Defined in: [systems/PhysicsSyncSystem.ts:642](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/PhysicsSyncSystem.ts#L642)
|
|
70
70
|
|
|
71
71
|
#### Parameters
|
|
72
72
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: PostprocessingSyncSystem
|
|
8
8
|
|
|
9
|
-
Defined in: [systems/PostprocessingSyncSystem.ts:20](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
9
|
+
Defined in: [systems/PostprocessingSyncSystem.ts:20](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/PostprocessingSyncSystem.ts#L20)
|
|
10
10
|
|
|
11
11
|
## Implements
|
|
12
12
|
|
|
@@ -23,7 +23,7 @@ new PostprocessingSyncSystem(
|
|
|
23
23
|
camera): PostprocessingSyncSystem;
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Defined in: [systems/PostprocessingSyncSystem.ts:28](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
26
|
+
Defined in: [systems/PostprocessingSyncSystem.ts:28](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/PostprocessingSyncSystem.ts#L28)
|
|
27
27
|
|
|
28
28
|
#### Parameters
|
|
29
29
|
|
|
@@ -45,7 +45,7 @@ Defined in: [systems/PostprocessingSyncSystem.ts:28](https://github.com/Relu-Int
|
|
|
45
45
|
update(world): void;
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
Defined in: [systems/PostprocessingSyncSystem.ts:170](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
48
|
+
Defined in: [systems/PostprocessingSyncSystem.ts:170](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/PostprocessingSyncSystem.ts#L170)
|
|
49
49
|
|
|
50
50
|
#### Parameters
|
|
51
51
|
|
|
@@ -69,7 +69,7 @@ Defined in: [systems/PostprocessingSyncSystem.ts:170](https://github.com/Relu-In
|
|
|
69
69
|
dispose(): void;
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
Defined in: [systems/PostprocessingSyncSystem.ts:197](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
72
|
+
Defined in: [systems/PostprocessingSyncSystem.ts:197](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/PostprocessingSyncSystem.ts#L197)
|
|
73
73
|
|
|
74
74
|
#### Returns
|
|
75
75
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: RenderSystem
|
|
8
8
|
|
|
9
|
-
Defined in: [systems/RenderSystem.ts:6](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
9
|
+
Defined in: [systems/RenderSystem.ts:6](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/RenderSystem.ts#L6)
|
|
10
10
|
|
|
11
11
|
## Implements
|
|
12
12
|
|
|
@@ -24,7 +24,7 @@ new RenderSystem(
|
|
|
24
24
|
afterRender?): RenderSystem;
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Defined in: [systems/RenderSystem.ts:12](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
27
|
+
Defined in: [systems/RenderSystem.ts:12](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/RenderSystem.ts#L12)
|
|
28
28
|
|
|
29
29
|
#### Parameters
|
|
30
30
|
|
|
@@ -47,7 +47,7 @@ Defined in: [systems/RenderSystem.ts:12](https://github.com/Relu-Interactives/re
|
|
|
47
47
|
update(_world): void;
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
Defined in: [systems/RenderSystem.ts:24](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
50
|
+
Defined in: [systems/RenderSystem.ts:24](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/RenderSystem.ts#L24)
|
|
51
51
|
|
|
52
52
|
#### Parameters
|
|
53
53
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: ScriptBehaviourSystem
|
|
8
8
|
|
|
9
|
-
Defined in: [systems/ScriptBehaviourSystem.ts:
|
|
9
|
+
Defined in: [systems/ScriptBehaviourSystem.ts:111](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ScriptBehaviourSystem.ts#L111)
|
|
10
10
|
|
|
11
11
|
## Implements
|
|
12
12
|
|
|
@@ -20,13 +20,13 @@ Defined in: [systems/ScriptBehaviourSystem.ts:265](https://github.com/Relu-Inter
|
|
|
20
20
|
new ScriptBehaviourSystem(moduleLoader?, selectionContext?): ScriptBehaviourSystem;
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Defined in: [systems/ScriptBehaviourSystem.ts:
|
|
23
|
+
Defined in: [systems/ScriptBehaviourSystem.ts:126](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ScriptBehaviourSystem.ts#L126)
|
|
24
24
|
|
|
25
25
|
#### Parameters
|
|
26
26
|
|
|
27
27
|
| Parameter | Type |
|
|
28
28
|
| ------ | ------ |
|
|
29
|
-
| `moduleLoader?` | `ModuleLoader` |
|
|
29
|
+
| `moduleLoader?` | [`ModuleLoader`](../type-aliases/ModuleLoader.md) |
|
|
30
30
|
| `selectionContext?` | [`SelectionContext`](../type-aliases/SelectionContext.md) |
|
|
31
31
|
|
|
32
32
|
#### Returns
|
|
@@ -41,7 +41,7 @@ Defined in: [systems/ScriptBehaviourSystem.ts:280](https://github.com/Relu-Inter
|
|
|
41
41
|
update(world, deltaTime): void;
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Defined in: [systems/ScriptBehaviourSystem.ts:
|
|
44
|
+
Defined in: [systems/ScriptBehaviourSystem.ts:224](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ScriptBehaviourSystem.ts#L224)
|
|
45
45
|
|
|
46
46
|
#### Parameters
|
|
47
47
|
|
|
@@ -66,7 +66,7 @@ Defined in: [systems/ScriptBehaviourSystem.ts:378](https://github.com/Relu-Inter
|
|
|
66
66
|
dispose(world): void;
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
Defined in: [systems/ScriptBehaviourSystem.ts:
|
|
69
|
+
Defined in: [systems/ScriptBehaviourSystem.ts:411](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ScriptBehaviourSystem.ts#L411)
|
|
70
70
|
|
|
71
71
|
#### Parameters
|
|
72
72
|
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / ScriptObject
|
|
6
|
+
|
|
7
|
+
# Class: ScriptObject
|
|
8
|
+
|
|
9
|
+
Defined in: [ScriptObject.ts:51](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/ScriptObject.ts#L51)
|
|
10
|
+
|
|
11
|
+
Base class for **script objects** — entities whose THREE.js visual is built
|
|
12
|
+
entirely by user code (procedural geometry, shaders, particle systems,
|
|
13
|
+
anything the editor can't author natively).
|
|
14
|
+
|
|
15
|
+
The critical difference from [Behaviour](../../Behaviour/classes/Behaviour.md): a `ScriptObject` runs in the
|
|
16
|
+
**editor AND at runtime** — `build()` and `update()` execute identically in
|
|
17
|
+
both. `ScriptObjectSystem` loads the module, instantiates the class, calls
|
|
18
|
+
`build()` to get the visual, attaches it under the entity's Object3D, and
|
|
19
|
+
ticks `update()` every frame. **Do NOT gate anything on
|
|
20
|
+
`world.isEditorMode()`** — running everywhere is the whole point. Use
|
|
21
|
+
[Behaviour](../../Behaviour/classes/Behaviour.md) for gameplay logic that must NOT run in the editor.
|
|
22
|
+
|
|
23
|
+
Subclasses are resolved by the inherited static marker
|
|
24
|
+
`__reluScriptObjectClass` (survives bundler identity splits). Do not override
|
|
25
|
+
the marker.
|
|
26
|
+
|
|
27
|
+
## Example
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { ScriptObject, type ColorInput } from "@relu-interactives/spatial-ecs";
|
|
31
|
+
import * as THREE from "three";
|
|
32
|
+
|
|
33
|
+
export default class GlowOrb extends ScriptObject {
|
|
34
|
+
declare data: { color: ColorInput };
|
|
35
|
+
private mat!: THREE.MeshStandardMaterial;
|
|
36
|
+
|
|
37
|
+
build(): THREE.Object3D {
|
|
38
|
+
this.data.color ??= { type: "color", value: "#66ccff" };
|
|
39
|
+
this.mat = new THREE.MeshStandardMaterial({
|
|
40
|
+
color: this.data.color.value,
|
|
41
|
+
emissive: this.data.color.value,
|
|
42
|
+
});
|
|
43
|
+
return new THREE.Mesh(new THREE.SphereGeometry(0.5, 32, 32), this.mat);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
update(dt: number): void {
|
|
47
|
+
this.mat.emissiveIntensity = 0.5 + 0.5 * Math.sin(performance.now() * 0.002);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
dispose(): void {
|
|
51
|
+
this.mat.dispose();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Constructors
|
|
57
|
+
|
|
58
|
+
### Constructor
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
new ScriptObject(
|
|
62
|
+
world,
|
|
63
|
+
entityId,
|
|
64
|
+
data?): ScriptObject;
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Defined in: [ScriptObject.ts:84](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/ScriptObject.ts#L84)
|
|
68
|
+
|
|
69
|
+
Engine-managed constructor. `ScriptObjectSystem` instantiates subclasses
|
|
70
|
+
with the owning world, the entity id, and the component's `data`. User code
|
|
71
|
+
should not call this directly.
|
|
72
|
+
|
|
73
|
+
#### Parameters
|
|
74
|
+
|
|
75
|
+
| Parameter | Type |
|
|
76
|
+
| ------ | ------ |
|
|
77
|
+
| `world` | [`World`](World.md) |
|
|
78
|
+
| `entityId` | `number` |
|
|
79
|
+
| `data?` | `Record`\<`string`, `unknown`\> |
|
|
80
|
+
|
|
81
|
+
#### Returns
|
|
82
|
+
|
|
83
|
+
`ScriptObject`
|
|
84
|
+
|
|
85
|
+
## Properties
|
|
86
|
+
|
|
87
|
+
| Property | Modifier | Type | Default value | Description | Defined in |
|
|
88
|
+
| ------ | ------ | ------ | ------ | ------ | ------ |
|
|
89
|
+
| <a id="__reluscriptobjectclass"></a> `__reluScriptObjectClass` | `readonly` | `true` | `undefined` | Static marker used by `ScriptObjectSystem` to detect `ScriptObject` subclasses even when a bundler ships a second copy of the package into the script blob (breaking `instanceof`). Do NOT override. | [ScriptObject.ts:57](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/ScriptObject.ts#L57) |
|
|
90
|
+
| <a id="data"></a> `data` | `public` | `Record`\<`string`, `unknown`\> | `{}` | The script's data payload (the `ScriptObjectComponent.data`). Declare a concrete shape on subclasses with `declare data: MyShape` for type safety. Use the same typed input envelopes as Behaviours (`ColorInput`, `SliderInput`, `EntityInput`, …) to get inspector fields. | [ScriptObject.ts:65](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/ScriptObject.ts#L65) |
|
|
91
|
+
| <a id="world"></a> `world` | `public` | [`World`](World.md) | `undefined` | The owning ECS world. | [ScriptObject.ts:68](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/ScriptObject.ts#L68) |
|
|
92
|
+
| <a id="entityid"></a> `entityId` | `public` | `number` | `undefined` | The entity this script object is bound to. | [ScriptObject.ts:71](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/ScriptObject.ts#L71) |
|
|
93
|
+
| <a id="root"></a> `root` | `public` | `Object3D`\<`Object3DEventMap`\> \| `null` | `null` | The Object3D returned by [ScriptObject.build](#build). Assigned by `ScriptObjectSystem` after `build()` runs; `null` until then. | [ScriptObject.ts:77](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/ScriptObject.ts#L77) |
|
|
94
|
+
|
|
95
|
+
## Methods
|
|
96
|
+
|
|
97
|
+
### build()
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
build(): Object3D;
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Defined in: [ScriptObject.ts:96](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/ScriptObject.ts#L96)
|
|
104
|
+
|
|
105
|
+
REQUIRED — build and return the visual root. Called once by
|
|
106
|
+
`ScriptObjectSystem` after construction. The returned object is attached
|
|
107
|
+
under the entity's Object3D (so it inherits the entity transform, selection
|
|
108
|
+
and visibility). Subclasses MUST override.
|
|
109
|
+
|
|
110
|
+
#### Returns
|
|
111
|
+
|
|
112
|
+
`Object3D`
|
|
113
|
+
|
|
114
|
+
***
|
|
115
|
+
|
|
116
|
+
### update()?
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
optional update(deltaTime): void;
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Defined in: [ScriptObject.ts:106](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/ScriptObject.ts#L106)
|
|
123
|
+
|
|
124
|
+
OPTIONAL — per-frame hook. Runs in the editor AND at runtime (e.g. advance
|
|
125
|
+
a shader time uniform, procedural animation). Keep per-frame work on local
|
|
126
|
+
THREE state / uniforms — do NOT write ECS components every frame (that
|
|
127
|
+
churns the editor's undo history).
|
|
128
|
+
|
|
129
|
+
#### Parameters
|
|
130
|
+
|
|
131
|
+
| Parameter | Type |
|
|
132
|
+
| ------ | ------ |
|
|
133
|
+
| `deltaTime` | `number` |
|
|
134
|
+
|
|
135
|
+
#### Returns
|
|
136
|
+
|
|
137
|
+
`void`
|
|
138
|
+
|
|
139
|
+
***
|
|
140
|
+
|
|
141
|
+
### dispose()?
|
|
142
|
+
|
|
143
|
+
```ts
|
|
144
|
+
optional dispose(): void;
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Defined in: [ScriptObject.ts:114](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/ScriptObject.ts#L114)
|
|
148
|
+
|
|
149
|
+
OPTIONAL — free any GPU resources this script created (geometries,
|
|
150
|
+
materials, textures, render targets). Called by `ScriptObjectSystem` when
|
|
151
|
+
the object is removed, disabled, or reloaded. THREE `dispose()` is
|
|
152
|
+
idempotent, so double-dispose is safe.
|
|
153
|
+
|
|
154
|
+
#### Returns
|
|
155
|
+
|
|
156
|
+
`void`
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
[**@relu-interactives/spatial-ecs**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@relu-interactives/spatial-ecs](../../index.md) / [index](../index.md) / ScriptObjectSystem
|
|
6
|
+
|
|
7
|
+
# Class: ScriptObjectSystem
|
|
8
|
+
|
|
9
|
+
Defined in: [systems/ScriptObjectSystem.ts:97](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ScriptObjectSystem.ts#L97)
|
|
10
|
+
|
|
11
|
+
Builds, ticks, and disposes [ScriptObject](ScriptObject.md) scripts. Unlike
|
|
12
|
+
`ScriptBehaviourSystem`, this runs in the editor AND at runtime — there is NO
|
|
13
|
+
`isEditorMode` gating anywhere here. A script's `build()` output is attached
|
|
14
|
+
under the entity's `Object3DRef.object` (so it inherits transform, selection
|
|
15
|
+
and visibility). `runtimeState` is written on transitions only (never every
|
|
16
|
+
frame).
|
|
17
|
+
|
|
18
|
+
Construct it and pass it to `World.setup({ systems })`.
|
|
19
|
+
|
|
20
|
+
## Implements
|
|
21
|
+
|
|
22
|
+
- [`EcsSystem`](../interfaces/EcsSystem.md)
|
|
23
|
+
|
|
24
|
+
## Constructors
|
|
25
|
+
|
|
26
|
+
### Constructor
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
new ScriptObjectSystem(moduleLoader?): ScriptObjectSystem;
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Defined in: [systems/ScriptObjectSystem.ts:104](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ScriptObjectSystem.ts#L104)
|
|
33
|
+
|
|
34
|
+
#### Parameters
|
|
35
|
+
|
|
36
|
+
| Parameter | Type |
|
|
37
|
+
| ------ | ------ |
|
|
38
|
+
| `moduleLoader?` | [`ModuleLoader`](../type-aliases/ModuleLoader.md) |
|
|
39
|
+
|
|
40
|
+
#### Returns
|
|
41
|
+
|
|
42
|
+
`ScriptObjectSystem`
|
|
43
|
+
|
|
44
|
+
## Methods
|
|
45
|
+
|
|
46
|
+
### update()
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
update(world, deltaTime): void;
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Defined in: [systems/ScriptObjectSystem.ts:108](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ScriptObjectSystem.ts#L108)
|
|
53
|
+
|
|
54
|
+
#### Parameters
|
|
55
|
+
|
|
56
|
+
| Parameter | Type |
|
|
57
|
+
| ------ | ------ |
|
|
58
|
+
| `world` | [`World`](World.md) |
|
|
59
|
+
| `deltaTime` | `number` |
|
|
60
|
+
|
|
61
|
+
#### Returns
|
|
62
|
+
|
|
63
|
+
`void`
|
|
64
|
+
|
|
65
|
+
#### Implementation of
|
|
66
|
+
|
|
67
|
+
[`EcsSystem`](../interfaces/EcsSystem.md).[`update`](../interfaces/EcsSystem.md#update)
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
### invalidateAll()
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
invalidateAll(): void;
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Defined in: [systems/ScriptObjectSystem.ts:407](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ScriptObjectSystem.ts#L407)
|
|
78
|
+
|
|
79
|
+
Dispose all live instances so the next update() reloads with fresh modules.
|
|
80
|
+
|
|
81
|
+
#### Returns
|
|
82
|
+
|
|
83
|
+
`void`
|
|
84
|
+
|
|
85
|
+
***
|
|
86
|
+
|
|
87
|
+
### invalidate()
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
invalidate(scriptUrl): void;
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Defined in: [systems/ScriptObjectSystem.ts:422](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ScriptObjectSystem.ts#L422)
|
|
94
|
+
|
|
95
|
+
Invalidate only the entities whose script matches `scriptUrl`.
|
|
96
|
+
|
|
97
|
+
#### Parameters
|
|
98
|
+
|
|
99
|
+
| Parameter | Type |
|
|
100
|
+
| ------ | ------ |
|
|
101
|
+
| `scriptUrl` | `string` |
|
|
102
|
+
|
|
103
|
+
#### Returns
|
|
104
|
+
|
|
105
|
+
`void`
|
|
106
|
+
|
|
107
|
+
***
|
|
108
|
+
|
|
109
|
+
### dispose()
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
dispose(world): void;
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Defined in: [systems/ScriptObjectSystem.ts:439](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/ScriptObjectSystem.ts#L439)
|
|
116
|
+
|
|
117
|
+
#### Parameters
|
|
118
|
+
|
|
119
|
+
| Parameter | Type |
|
|
120
|
+
| ------ | ------ |
|
|
121
|
+
| `world` | [`World`](World.md) |
|
|
122
|
+
|
|
123
|
+
#### Returns
|
|
124
|
+
|
|
125
|
+
`void`
|
|
126
|
+
|
|
127
|
+
#### Implementation of
|
|
128
|
+
|
|
129
|
+
[`EcsSystem`](../interfaces/EcsSystem.md).[`dispose`](../interfaces/EcsSystem.md#dispose)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: TransformSyncSystem
|
|
8
8
|
|
|
9
|
-
Defined in: [systems/TransformSyncSystem.ts:7](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
9
|
+
Defined in: [systems/TransformSyncSystem.ts:7](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/TransformSyncSystem.ts#L7)
|
|
10
10
|
|
|
11
11
|
## Implements
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ new TransformSyncSystem(): TransformSyncSystem;
|
|
|
32
32
|
update(world): void;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Defined in: [systems/TransformSyncSystem.ts:8](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/
|
|
35
|
+
Defined in: [systems/TransformSyncSystem.ts:8](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/systems/TransformSyncSystem.ts#L8)
|
|
36
36
|
|
|
37
37
|
#### Parameters
|
|
38
38
|
|