@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.
Files changed (254) hide show
  1. package/dist/{chunk-J6736FFO.js → chunk-7BPHZWQ6.js} +45 -13
  2. package/dist/chunk-7BPHZWQ6.js.map +1 -0
  3. package/dist/{chunk-3P3ZBP7K.js → chunk-7JFSEV7A.js} +5 -4
  4. package/dist/chunk-7JFSEV7A.js.map +1 -0
  5. package/dist/{chunk-RJ4J5UEX.js → chunk-AT5SPSPM.js} +4 -4
  6. package/dist/{chunk-RJ4J5UEX.js.map → chunk-AT5SPSPM.js.map} +1 -1
  7. package/dist/{chunk-XFD74BQL.js → chunk-PZ4CAALA.js} +3 -3
  8. package/dist/{chunk-XFD74BQL.js.map → chunk-PZ4CAALA.js.map} +1 -1
  9. package/dist/components/index.cjs +43 -11
  10. package/dist/components/index.cjs.map +1 -1
  11. package/dist/components/index.js +1 -1
  12. package/dist/docs/api/Behaviour/classes/Behaviour.md +98 -51
  13. package/dist/docs/api/Component/classes/Component.md +4 -1
  14. package/dist/docs/api/components/classes/AnimationComponent.md +26 -26
  15. package/dist/docs/api/components/classes/AudioComponent.md +19 -19
  16. package/dist/docs/api/components/classes/CameraComponent.md +14 -14
  17. package/dist/docs/api/components/classes/EntityType.md +4 -4
  18. package/dist/docs/api/components/classes/Environment.md +3 -3
  19. package/dist/docs/api/components/classes/ImageComponent.md +7 -7
  20. package/dist/docs/api/components/classes/ImageTarget.md +7 -7
  21. package/dist/docs/api/components/classes/ImageTargetAnchor.md +4 -4
  22. package/dist/docs/api/components/classes/InstanceSlotComponent.md +4 -4
  23. package/dist/docs/api/components/classes/InstancedMeshComponent.md +10 -10
  24. package/dist/docs/api/components/classes/LightComponent.md +6 -6
  25. package/dist/docs/api/components/classes/MaterialComponent.md +57 -11
  26. package/dist/docs/api/components/classes/MeshComponent.md +3 -3
  27. package/dist/docs/api/components/classes/MeshGeometryComponent.md +9 -9
  28. package/dist/docs/api/components/classes/ModelComponent.md +4 -4
  29. package/dist/docs/api/components/classes/Name.md +3 -3
  30. package/dist/docs/api/components/classes/Object3DRef.md +4 -4
  31. package/dist/docs/api/components/classes/ParentId.md +3 -3
  32. package/dist/docs/api/components/classes/PhysicsComponent.md +12 -13
  33. package/dist/docs/api/components/classes/Postprocessing.md +3 -3
  34. package/dist/docs/api/components/classes/PrefabInstance.md +80 -0
  35. package/dist/docs/api/components/classes/PrefabNode.md +54 -0
  36. package/dist/docs/api/components/classes/ScriptComponent.md +5 -5
  37. package/dist/docs/api/components/classes/ScriptObjectComponent.md +55 -0
  38. package/dist/docs/api/components/classes/Selectable.md +3 -3
  39. package/dist/docs/api/components/classes/SelectionTransformState.md +5 -5
  40. package/dist/docs/api/components/classes/SpriteComponent.md +7 -7
  41. package/dist/docs/api/components/classes/TransformComponent.md +12 -12
  42. package/dist/docs/api/components/classes/VideoComponent.md +28 -28
  43. package/dist/docs/api/components/functions/defaultMaterialValue.md +17 -0
  44. package/dist/docs/api/components/functions/normalizePhysicsState.md +1 -1
  45. package/dist/docs/api/components/functions/setPhysicsLiveRef.md +34 -0
  46. package/dist/docs/api/components/index.md +8 -1
  47. package/dist/docs/api/components/type-aliases/AnimationComponentOptions.md +9 -9
  48. package/dist/docs/api/components/type-aliases/CameraComponentOptions.md +13 -13
  49. package/dist/docs/api/components/type-aliases/CameraProjection.md +1 -1
  50. package/dist/docs/api/components/type-aliases/CameraRuntimeType.md +1 -1
  51. package/dist/docs/api/components/type-aliases/ColliderShape.md +1 -1
  52. package/dist/docs/api/components/type-aliases/ColliderState.md +20 -20
  53. package/dist/docs/api/components/type-aliases/CubeMeshParameters.md +4 -4
  54. package/dist/docs/api/components/type-aliases/EditableMeshObjectKind.md +1 -1
  55. package/dist/docs/api/components/type-aliases/EnvironmentFogState.md +8 -8
  56. package/dist/docs/api/components/type-aliases/EnvironmentFogType.md +1 -1
  57. package/dist/docs/api/components/type-aliases/EnvironmentGradientEffect.md +1 -1
  58. package/dist/docs/api/components/type-aliases/EnvironmentSkyboxState.md +7 -7
  59. package/dist/docs/api/components/type-aliases/EnvironmentSkyboxType.md +1 -1
  60. package/dist/docs/api/components/type-aliases/EnvironmentState.md +5 -5
  61. package/dist/docs/api/components/type-aliases/ImageTargetAnchorOptions.md +3 -3
  62. package/dist/docs/api/components/type-aliases/ImageTargetReference.md +7 -7
  63. package/dist/docs/api/components/type-aliases/InstanceTransform.md +13 -13
  64. package/dist/docs/api/components/type-aliases/InstancedMeshKind.md +1 -1
  65. package/dist/docs/api/components/type-aliases/LightValueState.md +11 -11
  66. package/dist/docs/api/components/type-aliases/MaterialTypeValue.md +1 -1
  67. package/dist/docs/api/components/type-aliases/MaterialValueState.md +28 -28
  68. package/dist/docs/api/components/type-aliases/MeshGeometryParameters.md +1 -1
  69. package/dist/docs/api/components/type-aliases/MeshGeometryParametersByKind.md +7 -7
  70. package/dist/docs/api/components/type-aliases/PhysicsState.md +3 -3
  71. package/dist/docs/api/components/type-aliases/PlaneMeshParameters.md +3 -3
  72. package/dist/docs/api/components/type-aliases/PostprocessingState.md +62 -62
  73. package/dist/docs/api/components/type-aliases/RadiusHeightMeshParameters.md +3 -3
  74. package/dist/docs/api/components/type-aliases/RadiusMeshParameters.md +2 -2
  75. package/dist/docs/api/components/type-aliases/RigidbodyState.md +17 -17
  76. package/dist/docs/api/components/type-aliases/RigidbodyType.md +1 -1
  77. package/dist/docs/api/components/type-aliases/ScriptEntry.md +8 -10
  78. package/dist/docs/api/components/type-aliases/ScriptObjectComponentInput.md +20 -0
  79. package/dist/docs/api/components/type-aliases/ScriptObjectRuntimeState.md +13 -0
  80. package/dist/docs/api/components/type-aliases/TextureFilteringValue.md +1 -1
  81. package/dist/docs/api/components/type-aliases/TransformData.md +4 -4
  82. package/dist/docs/api/components/type-aliases/TransformModeValue.md +1 -1
  83. package/dist/docs/api/components/type-aliases/TransformSpaceValue.md +1 -1
  84. package/dist/docs/api/components/type-aliases/Vec3.md +4 -4
  85. package/dist/docs/api/components/variables/DEFAULT_COLLIDER_STATE.md +1 -1
  86. package/dist/docs/api/components/variables/DEFAULT_ENVIRONMENT_STATE.md +1 -1
  87. package/dist/docs/api/components/variables/DEFAULT_INSTANCED_MESH_PARAMETERS.md +1 -1
  88. package/dist/docs/api/components/variables/DEFAULT_INSTANCE_TRANSFORM.md +1 -1
  89. package/dist/docs/api/components/variables/DEFAULT_MESH_GEOMETRY_PARAMETERS.md +1 -1
  90. package/dist/docs/api/components/variables/DEFAULT_PHYSICS_STATE.md +1 -1
  91. package/dist/docs/api/components/variables/DEFAULT_POSTPROCESSING_STATE.md +1 -1
  92. package/dist/docs/api/components/variables/DEFAULT_RIGIDBODY_STATE.md +1 -1
  93. package/dist/docs/api/index/classes/AnimationStateMachine.md +16 -16
  94. package/dist/docs/api/index/classes/AnimationStateManager.md +13 -13
  95. package/dist/docs/api/index/classes/AnimationSystem.md +3 -3
  96. package/dist/docs/api/index/classes/AudioSystem.md +4 -4
  97. package/dist/docs/api/index/classes/CameraSyncSystem.md +2 -2
  98. package/dist/docs/api/index/classes/EnvironmentSyncSystem.md +4 -4
  99. package/dist/docs/api/index/classes/InputSystem.md +33 -33
  100. package/dist/docs/api/index/classes/InstancedMeshSystem.md +2 -2
  101. package/dist/docs/api/index/classes/LightSyncSystem.md +2 -2
  102. package/dist/docs/api/index/classes/MaterialSyncSystem.md +3 -3
  103. package/dist/docs/api/index/classes/MeshGeometrySystem.md +2 -2
  104. package/dist/docs/api/index/classes/ObjectManagementSystem.md +14 -14
  105. package/dist/docs/api/index/classes/ObjectVisibilitySystem.md +2 -2
  106. package/dist/docs/api/index/classes/PhysicsSyncSystem.md +4 -4
  107. package/dist/docs/api/index/classes/PostprocessingSyncSystem.md +4 -4
  108. package/dist/docs/api/index/classes/RenderSystem.md +3 -3
  109. package/dist/docs/api/index/classes/ScriptBehaviourSystem.md +5 -5
  110. package/dist/docs/api/index/classes/ScriptObject.md +156 -0
  111. package/dist/docs/api/index/classes/ScriptObjectSystem.md +129 -0
  112. package/dist/docs/api/index/classes/TransformSyncSystem.md +2 -2
  113. package/dist/docs/api/index/classes/VideoSystem.md +4 -4
  114. package/dist/docs/api/index/classes/World.md +183 -86
  115. package/dist/docs/api/index/functions/applyPrefabToSnapshotInstances.md +32 -0
  116. package/dist/docs/api/index/functions/buildComponentValueMaps.md +23 -0
  117. package/dist/docs/api/index/functions/buildNodeKeyMapsFromSnapshot.md +25 -0
  118. package/dist/docs/api/index/functions/buildNodeMapsFromSnapshot.md +23 -0
  119. package/dist/docs/api/index/functions/canonicalizeComponentValue.md +38 -0
  120. package/dist/docs/api/index/functions/clearModelCache.md +26 -0
  121. package/dist/docs/api/index/functions/clearPrefabCache.md +25 -0
  122. package/dist/docs/api/index/functions/collectDiffPaths.md +38 -0
  123. package/dist/docs/api/index/functions/collectDirectPrefabDependencies.md +27 -0
  124. package/dist/docs/api/index/functions/collectEntitySubtree.md +29 -0
  125. package/dist/docs/api/index/functions/collectSnapshotSubtreeIds.md +26 -0
  126. package/dist/docs/api/index/functions/computeInstanceOverrides.md +44 -0
  127. package/dist/docs/api/index/functions/createAnimationComponent.md +1 -1
  128. package/dist/docs/api/index/functions/createAudioComponent.md +1 -1
  129. package/dist/docs/api/index/functions/createCameraComponent.md +1 -1
  130. package/dist/docs/api/index/functions/createEntityTypeComponent.md +2 -2
  131. package/dist/docs/api/index/functions/createEnvironmentComponent.md +1 -1
  132. package/dist/docs/api/index/functions/createImageComponent.md +1 -1
  133. package/dist/docs/api/index/functions/createImageTargetAnchorComponent.md +1 -1
  134. package/dist/docs/api/index/functions/createImageTargetComponent.md +1 -1
  135. package/dist/docs/api/index/functions/createInstanceSlotComponent.md +1 -1
  136. package/dist/docs/api/index/functions/createInstancedMeshComponent.md +1 -1
  137. package/dist/docs/api/index/functions/createLightComponent.md +1 -1
  138. package/dist/docs/api/index/functions/createMaterialComponent.md +1 -1
  139. package/dist/docs/api/index/functions/createMeshComponent.md +1 -1
  140. package/dist/docs/api/index/functions/createMeshGeometryComponent.md +1 -1
  141. package/dist/docs/api/index/functions/createModelComponent.md +1 -1
  142. package/dist/docs/api/index/functions/createNameComponent.md +1 -1
  143. package/dist/docs/api/index/functions/createObject3DRefComponent.md +1 -1
  144. package/dist/docs/api/index/functions/createParentIdComponent.md +1 -1
  145. package/dist/docs/api/index/functions/createPhysicsComponent.md +2 -4
  146. package/dist/docs/api/index/functions/createPostprocessingComponent.md +1 -1
  147. package/dist/docs/api/index/functions/createScriptComponent.md +1 -1
  148. package/dist/docs/api/index/functions/createScriptObjectComponent.md +28 -0
  149. package/dist/docs/api/index/functions/createSelectableComponent.md +1 -1
  150. package/dist/docs/api/index/functions/createSelectionTransformStateComponent.md +1 -1
  151. package/dist/docs/api/index/functions/createSpriteComponent.md +1 -1
  152. package/dist/docs/api/index/functions/createTransformComponent.md +1 -1
  153. package/dist/docs/api/index/functions/createVideoComponent.md +1 -1
  154. package/dist/docs/api/index/functions/decanonicalizeComponentValue.md +28 -0
  155. package/dist/docs/api/index/functions/despawnPrefab.md +32 -0
  156. package/dist/docs/api/index/functions/encodeOverride.md +28 -0
  157. package/dist/docs/api/index/functions/findSnapshotRootEntityIds.md +25 -0
  158. package/dist/docs/api/index/functions/findTopLevelNestedRegions.md +28 -0
  159. package/dist/docs/api/index/functions/groupOverridePaths.md +25 -0
  160. package/dist/docs/api/index/functions/hydrateWorldFromSnapshot.md +1 -1
  161. package/dist/docs/api/index/functions/hydrateWorldFromSnapshotDetailed.md +4 -2
  162. package/dist/docs/api/index/functions/indexSnapshotByEntity.md +25 -0
  163. package/dist/docs/api/index/functions/instantiateSubtree.md +32 -0
  164. package/dist/docs/api/index/functions/loadPrefab.md +28 -0
  165. package/dist/docs/api/index/functions/loadSharedGltf.md +29 -0
  166. package/dist/docs/api/index/functions/mergeComponentValue.md +32 -0
  167. package/dist/docs/api/index/functions/parseOverride.md +34 -0
  168. package/dist/docs/api/index/functions/parsePrefabAsset.md +25 -0
  169. package/dist/docs/api/index/functions/prefabFileVersionFor.md +25 -0
  170. package/dist/docs/api/index/functions/registerDefaultComponentFactories.md +1 -1
  171. package/dist/docs/api/index/functions/registerDefaultFactories.md +1 -1
  172. package/dist/docs/api/index/functions/remapSnapshotEntityIds.md +46 -0
  173. package/dist/docs/api/index/functions/resolveDracoDecoderPath.md +17 -0
  174. package/dist/docs/api/index/functions/restoreComponentState.md +34 -0
  175. package/dist/docs/api/index/functions/restorePostCreateComponents.md +36 -0
  176. package/dist/docs/api/index/functions/serializeEntitySubtree.md +35 -0
  177. package/dist/docs/api/index/functions/setDracoDecoderPath.md +30 -0
  178. package/dist/docs/api/index/functions/setPrefabAssetUrlResolver.md +30 -0
  179. package/dist/docs/api/index/functions/spawnPrefab.md +36 -0
  180. package/dist/docs/api/index/index.md +65 -0
  181. package/dist/docs/api/index/interfaces/EcsSystem.md +3 -3
  182. package/dist/docs/api/index/interfaces/StateMachine.md +13 -13
  183. package/dist/docs/api/index/type-aliases/AnimationStateCallbacks.md +4 -4
  184. package/dist/docs/api/index/type-aliases/ApplyPrefabToSnapshotResult.md +23 -0
  185. package/dist/docs/api/index/type-aliases/ComponentFactory.md +1 -1
  186. package/dist/docs/api/index/type-aliases/ComponentValueMaps.md +69 -0
  187. package/dist/docs/api/index/type-aliases/EcsComponentFactoryKind.md +2 -1
  188. package/dist/docs/api/index/type-aliases/EcsWorldComponentSnapshot.md +3 -3
  189. package/dist/docs/api/index/type-aliases/EcsWorldStateSnapshotLike.md +4 -4
  190. package/dist/docs/api/index/type-aliases/ExternalRefWarning.md +27 -0
  191. package/dist/docs/api/index/type-aliases/HydrateOptions.md +27 -0
  192. package/dist/docs/api/index/type-aliases/HydrateWorldFromSnapshotResult.md +7 -5
  193. package/dist/docs/api/index/type-aliases/InstantiateSubtreeResult.md +23 -0
  194. package/dist/docs/api/index/type-aliases/KeyboardKey.md +1 -1
  195. package/dist/docs/api/index/type-aliases/ModuleLoader.md +25 -0
  196. package/dist/docs/api/index/type-aliases/MouseButton.md +1 -1
  197. package/dist/docs/api/index/type-aliases/NestedRegion.md +27 -0
  198. package/dist/docs/api/index/type-aliases/NodeKeyMaps.md +30 -0
  199. package/dist/docs/api/index/type-aliases/NodeMaps.md +25 -0
  200. package/dist/docs/api/index/type-aliases/PrefabAsset.md +32 -0
  201. package/dist/docs/api/index/type-aliases/RemapSnapshotOptions.md +21 -0
  202. package/dist/docs/api/index/type-aliases/SelectionContext.md +4 -4
  203. package/dist/docs/api/index/type-aliases/SerializeEntitySubtreeResult.md +25 -0
  204. package/dist/docs/api/index/type-aliases/SpawnPrefabOptions.md +27 -0
  205. package/dist/docs/api/index/type-aliases/SpawnPrefabSource.md +19 -0
  206. package/dist/docs/api/index/type-aliases/SubtreeSnapshot.md +43 -0
  207. package/dist/docs/api/index/variables/ADDED_NODE_MARKER_COMPONENT.md +19 -0
  208. package/dist/docs/api/index/variables/HYDRATABLE_ENTITY_KINDS.md +1 -1
  209. package/dist/docs/api/index/variables/KeyboardKeys.md +89 -89
  210. package/dist/docs/api/index/variables/NODE_KEY_SEPARATOR.md +13 -0
  211. package/dist/docs/api/index/variables/OVERRIDE_DIFF_EXCLUDED_COMPONENTS.md +15 -0
  212. package/dist/docs/api/index/variables/OVERRIDE_ROOT_EXCLUDED_COMPONENTS.md +16 -0
  213. package/dist/docs/api/index/variables/PREFAB_FILE_VERSION.md +13 -0
  214. package/dist/docs/api/index/variables/PREFAB_FILE_VERSION_NESTED.md +15 -0
  215. package/dist/docs/api/index/variables/SCRIPT_OBJECT_ROOT_FLAG.md +15 -0
  216. package/dist/docs/api/index/variables/SHARED_MODEL_RESOURCE_FLAG.md +17 -0
  217. package/dist/docs/api/typedoc-sidebar.json +1 -1
  218. package/dist/docs/api/types/type-aliases/AssetInput.md +3 -3
  219. package/dist/docs/api/types/type-aliases/CheckboxInput.md +3 -3
  220. package/dist/docs/api/types/type-aliases/ColorInput.md +1 -1
  221. package/dist/docs/api/types/type-aliases/ComponentInput.md +4 -4
  222. package/dist/docs/api/types/type-aliases/ComponentKind.md +2 -1
  223. package/dist/docs/api/types/type-aliases/DropdownInput.md +3 -3
  224. package/dist/docs/api/types/type-aliases/DropdownOption.md +3 -3
  225. package/dist/docs/api/types/type-aliases/EcsEntityEditorKind.md +1 -1
  226. package/dist/docs/api/types/type-aliases/EcsEntityKind.md +3 -2
  227. package/dist/docs/api/types/type-aliases/EntityId.md +1 -1
  228. package/dist/docs/api/types/type-aliases/EntityInput.md +3 -3
  229. package/dist/docs/api/types/type-aliases/FloatInput.md +1 -1
  230. package/dist/docs/api/types/type-aliases/IntersectionResult.md +3 -3
  231. package/dist/docs/api/types/type-aliases/ParentLookup.md +3 -3
  232. package/dist/docs/api/types/type-aliases/SelectionListener.md +1 -1
  233. package/dist/docs/api/types/type-aliases/SliderInput.md +5 -5
  234. package/dist/docs/api/types/type-aliases/TextInput.md +1 -1
  235. package/dist/docs/api/types/type-aliases/ToggleInput.md +1 -1
  236. package/dist/docs/api/types/type-aliases/Vec3.md +1 -1
  237. package/dist/docs/api/types/type-aliases/Vector2Input.md +3 -3
  238. package/dist/docs/api/types/type-aliases/Vector3Input.md +4 -4
  239. package/dist/docs/api/types/type-aliases/WorldEntityView.md +1 -1
  240. package/dist/docs/guide/components/_sidebar.json +4 -0
  241. package/dist/docs/guide/components/material.md +1 -0
  242. package/dist/docs/guide/components/script-object.md +32 -0
  243. package/dist/factories/index.cjs +43 -11
  244. package/dist/factories/index.cjs.map +1 -1
  245. package/dist/factories/index.js +3 -3
  246. package/dist/index.cjs +44 -11
  247. package/dist/index.cjs.map +1 -1
  248. package/dist/index.js +8 -8
  249. package/dist/systems/index.cjs +44 -11
  250. package/dist/systems/index.cjs.map +1 -1
  251. package/dist/systems/index.js +3 -3
  252. package/package.json +4 -4
  253. package/dist/chunk-3P3ZBP7K.js.map +0 -1
  254. package/dist/chunk-J6736FFO.js.map +0 -1
@@ -18,7 +18,7 @@ type ComponentInput<T> = {
18
18
  };
19
19
  ```
20
20
 
21
- Defined in: [types.ts:109](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L109)
21
+ Defined in: [types.ts:111](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L111)
22
22
 
23
23
  Inspector field that lets the user drag an entity and optionally pick a
24
24
  component from it.
@@ -47,6 +47,6 @@ transform: { type: "component", componentKind: "Transform", value: null } as Com
47
47
 
48
48
  | Property | Type | Description | Defined in |
49
49
  | ------ | ------ | ------ | ------ |
50
- | <a id="type"></a> `type` | `"component"` | - | [types.ts:110](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L110) |
51
- | <a id="componentkind"></a> `componentKind?` | [`ComponentKind`](ComponentKind.md) | Optional component-kind constraint. When provided, the inspector skips the dropdown and resolves directly to this kind. | [types.ts:113](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L113) |
52
- | <a id="value"></a> `value` | \| \{ `entityId`: [`EntityId`](EntityId.md); `componentKind`: [`ComponentKind`](ComponentKind.md); \} \| `null` | - | [types.ts:114](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L114) |
50
+ | <a id="type"></a> `type` | `"component"` | - | [types.ts:112](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L112) |
51
+ | <a id="componentkind"></a> `componentKind?` | [`ComponentKind`](ComponentKind.md) | Optional component-kind constraint. When provided, the inspector skips the dropdown and resolves directly to this kind. | [types.ts:115](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L115) |
52
+ | <a id="value"></a> `value` | \| \{ `entityId`: [`EntityId`](EntityId.md); `componentKind`: [`ComponentKind`](ComponentKind.md); \} \| `null` | - | [types.ts:116](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L116) |
@@ -29,6 +29,7 @@ type ComponentKind =
29
29
  | "Physics"
30
30
  | "Postprocessing"
31
31
  | "Script"
32
+ | "ScriptObject"
32
33
  | "Selectable"
33
34
  | "SelectionTransformState"
34
35
  | "Sprite"
@@ -36,4 +37,4 @@ type ComponentKind =
36
37
  | "Video";
37
38
  ```
38
39
 
39
- Defined in: [types.ts:67](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L67)
40
+ Defined in: [types.ts:68](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L68)
@@ -13,11 +13,11 @@ type DropdownInput = {
13
13
  };
14
14
  ```
15
15
 
16
- Defined in: [types.ts:62](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L62)
16
+ Defined in: [types.ts:63](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L63)
17
17
 
18
18
  ## Properties
19
19
 
20
20
  | Property | Type | Defined in |
21
21
  | ------ | ------ | ------ |
22
- | <a id="options"></a> `options` | [`DropdownOption`](DropdownOption.md)[] | [types.ts:62](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L62) |
23
- | <a id="value"></a> `value` | `string` \| `any` | [types.ts:62](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L62) |
22
+ | <a id="options"></a> `options` | [`DropdownOption`](DropdownOption.md)[] | [types.ts:63](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L63) |
23
+ | <a id="value"></a> `value` | `string` \| `any` | [types.ts:63](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L63) |
@@ -13,11 +13,11 @@ type DropdownOption = {
13
13
  };
14
14
  ```
15
15
 
16
- Defined in: [types.ts:61](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L61)
16
+ Defined in: [types.ts:62](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L62)
17
17
 
18
18
  ## Properties
19
19
 
20
20
  | Property | Type | Defined in |
21
21
  | ------ | ------ | ------ |
22
- | <a id="label"></a> `label` | `string` | [types.ts:61](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L61) |
23
- | <a id="value"></a> `value` | `string` \| `any` | [types.ts:61](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L61) |
22
+ | <a id="label"></a> `label` | `string` | [types.ts:62](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L62) |
23
+ | <a id="value"></a> `value` | `string` \| `any` | [types.ts:62](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L62) |
@@ -10,6 +10,6 @@
10
10
  type EcsEntityEditorKind = EcsEntityKind | "editorUtility";
11
11
  ```
12
12
 
13
- Defined in: [types.ts:42](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L42)
13
+ Defined in: [types.ts:43](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L43)
14
14
 
15
15
  [EcsEntityKind](EcsEntityKind.md) extended with editor-only utility entities (gizmos, helpers).
@@ -27,10 +27,11 @@ type EcsEntityKind =
27
27
  | "spotLight"
28
28
  | "areaLight"
29
29
  | "instancedMesh"
30
- | "instanceSlot";
30
+ | "instanceSlot"
31
+ | "scriptObject";
31
32
  ```
32
33
 
33
- Defined in: [types.ts:19](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L19)
34
+ Defined in: [types.ts:19](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L19)
34
35
 
35
36
  Built-in entity kinds recognized by the ECS factory registry. Each kind
36
37
  maps to an object factory in `core/factories/objects/*` that creates the
@@ -10,7 +10,7 @@
10
10
  type EntityId = number;
11
11
  ```
12
12
 
13
- Defined in: [types.ts:12](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L12)
13
+ Defined in: [types.ts:12](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L12)
14
14
 
15
15
  Numeric identifier for an entity. Entities are pure ids — all data lives in
16
16
  components attached to the entity.
@@ -13,11 +13,11 @@ type EntityInput = {
13
13
  };
14
14
  ```
15
15
 
16
- Defined in: [types.ts:66](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L66)
16
+ Defined in: [types.ts:67](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L67)
17
17
 
18
18
  ## Properties
19
19
 
20
20
  | Property | Type | Defined in |
21
21
  | ------ | ------ | ------ |
22
- | <a id="type"></a> `type` | `"entity"` | [types.ts:66](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L66) |
23
- | <a id="value"></a> `value` | [`EntityId`](EntityId.md) \| `null` | [types.ts:66](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L66) |
22
+ | <a id="type"></a> `type` | `"entity"` | [types.ts:67](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L67) |
23
+ | <a id="value"></a> `value` | [`EntityId`](EntityId.md) \| `null` | [types.ts:67](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L67) |
@@ -10,4 +10,4 @@
10
10
  type FloatInput = number;
11
11
  ```
12
12
 
13
- Defined in: [types.ts:51](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L51)
13
+ Defined in: [types.ts:52](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L52)
@@ -13,7 +13,7 @@ type IntersectionResult = {
13
13
  };
14
14
  ```
15
15
 
16
- Defined in: [types.ts:155](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L155)
16
+ Defined in: [types.ts:157](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L157)
17
17
 
18
18
  Single hit returned by `World.raycast` / `World.raycastFrom`. Pairs the
19
19
  standard `THREE.Intersection` (`threeResult`) with the owning entity id
@@ -25,5 +25,5 @@ editor helper).
25
25
 
26
26
  | Property | Type | Description | Defined in |
27
27
  | ------ | ------ | ------ | ------ |
28
- | <a id="entityid"></a> `entityId` | [`EntityId`](EntityId.md) \| `null` | The entity that owns the hit object, or `null` if untracked. | [types.ts:157](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L157) |
29
- | <a id="threeresult"></a> `threeResult` | `THREE.Intersection` | The underlying three.js intersection record. | [types.ts:159](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L159) |
28
+ | <a id="entityid"></a> `entityId` | [`EntityId`](EntityId.md) \| `null` | The entity that owns the hit object, or `null` if untracked. | [types.ts:159](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L159) |
29
+ | <a id="threeresult"></a> `threeResult` | `THREE.Intersection` | The underlying three.js intersection record. | [types.ts:161](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L161) |
@@ -13,7 +13,7 @@ type ParentLookup = {
13
13
  };
14
14
  ```
15
15
 
16
- Defined in: [types.ts:132](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L132)
16
+ Defined in: [types.ts:134](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L134)
17
17
 
18
18
  Result of a parent lookup. `parent` is `null` for entities at the root or
19
19
  for entities without a [ParentId](../../components/classes/ParentId.md) component.
@@ -22,5 +22,5 @@ for entities without a [ParentId](../../components/classes/ParentId.md) componen
22
22
 
23
23
  | Property | Type | Description | Defined in |
24
24
  | ------ | ------ | ------ | ------ |
25
- | <a id="parentidcomponent"></a> `parentIdComponent` | [`ParentId`](../../components/classes/ParentId.md) \| `null` | The entity's `ParentId` component, or `null` if it has none. | [types.ts:134](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L134) |
26
- | <a id="parent"></a> `parent` | [`WorldEntityView`](WorldEntityView.md) \| `null` | The resolved parent entity view, or `null` if the entity is at the root. | [types.ts:136](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L136) |
25
+ | <a id="parentidcomponent"></a> `parentIdComponent` | [`ParentId`](../../components/classes/ParentId.md) \| `null` | The entity's `ParentId` component, or `null` if it has none. | [types.ts:136](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L136) |
26
+ | <a id="parent"></a> `parent` | [`WorldEntityView`](WorldEntityView.md) \| `null` | The resolved parent entity view, or `null` if the entity is at the root. | [types.ts:138](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L138) |
@@ -10,7 +10,7 @@
10
10
  type SelectionListener = (entityId) => void;
11
11
  ```
12
12
 
13
- Defined in: [types.ts:45](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L45)
13
+ Defined in: [types.ts:46](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L46)
14
14
 
15
15
  Callback invoked when the selected entity changes. `null` indicates a deselection.
16
16
 
@@ -15,13 +15,13 @@ type SliderInput = {
15
15
  };
16
16
  ```
17
17
 
18
- Defined in: [types.ts:55](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L55)
18
+ Defined in: [types.ts:56](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L56)
19
19
 
20
20
  ## Properties
21
21
 
22
22
  | Property | Type | Defined in |
23
23
  | ------ | ------ | ------ |
24
- | <a id="min"></a> `min` | `number` | [types.ts:56](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L56) |
25
- | <a id="max"></a> `max` | `number` | [types.ts:57](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L57) |
26
- | <a id="step"></a> `step` | `number` | [types.ts:58](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L58) |
27
- | <a id="value"></a> `value` | `number` | [types.ts:59](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L59) |
24
+ | <a id="min"></a> `min` | `number` | [types.ts:57](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L57) |
25
+ | <a id="max"></a> `max` | `number` | [types.ts:58](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L58) |
26
+ | <a id="step"></a> `step` | `number` | [types.ts:59](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L59) |
27
+ | <a id="value"></a> `value` | `number` | [types.ts:60](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L60) |
@@ -10,4 +10,4 @@
10
10
  type TextInput = string;
11
11
  ```
12
12
 
13
- Defined in: [types.ts:50](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L50)
13
+ Defined in: [types.ts:51](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L51)
@@ -10,4 +10,4 @@
10
10
  type ToggleInput = boolean;
11
11
  ```
12
12
 
13
- Defined in: [types.ts:64](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L64)
13
+ Defined in: [types.ts:65](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L65)
@@ -16,7 +16,7 @@ type Vec3 =
16
16
  };
17
17
  ```
18
18
 
19
- Defined in: [types.ts:144](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L144)
19
+ Defined in: [types.ts:146](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L146)
20
20
 
21
21
  Loose 3D vector accepted by raycast and other spatial helpers. Either a
22
22
  live `THREE.Vector3` or a plain `{ x, y, z }` object — both are normalized
@@ -13,11 +13,11 @@ type Vector2Input = {
13
13
  };
14
14
  ```
15
15
 
16
- Defined in: [types.ts:53](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L53)
16
+ Defined in: [types.ts:54](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L54)
17
17
 
18
18
  ## Properties
19
19
 
20
20
  | Property | Type | Defined in |
21
21
  | ------ | ------ | ------ |
22
- | <a id="x"></a> `x` | `number` | [types.ts:53](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L53) |
23
- | <a id="y"></a> `y` | `number` | [types.ts:53](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L53) |
22
+ | <a id="x"></a> `x` | `number` | [types.ts:54](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L54) |
23
+ | <a id="y"></a> `y` | `number` | [types.ts:54](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L54) |
@@ -14,12 +14,12 @@ type Vector3Input = {
14
14
  };
15
15
  ```
16
16
 
17
- Defined in: [types.ts:54](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L54)
17
+ Defined in: [types.ts:55](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L55)
18
18
 
19
19
  ## Properties
20
20
 
21
21
  | Property | Type | Defined in |
22
22
  | ------ | ------ | ------ |
23
- | <a id="x"></a> `x` | `number` | [types.ts:54](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L54) |
24
- | <a id="y"></a> `y` | `number` | [types.ts:54](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L54) |
25
- | <a id="z"></a> `z` | `number` | [types.ts:54](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L54) |
23
+ | <a id="x"></a> `x` | `number` | [types.ts:55](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L55) |
24
+ | <a id="y"></a> `y` | `number` | [types.ts:55](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L55) |
25
+ | <a id="z"></a> `z` | `number` | [types.ts:55](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L55) |
@@ -10,7 +10,7 @@
10
10
  type WorldEntityView = NonNullable<ReturnType<World["getEntityById"]>>;
11
11
  ```
12
12
 
13
- Defined in: [types.ts:126](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/f4080487315dc2ea88332b3160fc071e7828b385/core/types.ts#L126)
13
+ Defined in: [types.ts:128](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/020795472520adb990c488982ca8572cbf8580db/core/types.ts#L128)
14
14
 
15
15
  Lightweight, read-only view of an entity returned by `World.getEntityById`.
16
16
  Contains the entity id and its current component list at the moment of the
@@ -63,6 +63,10 @@
63
63
  "text": "Script",
64
64
  "link": "/guide/components/script"
65
65
  },
66
+ {
67
+ "text": "Script Object",
68
+ "link": "/guide/components/script-object"
69
+ },
66
70
  {
67
71
  "text": "Sprite",
68
72
  "link": "/guide/components/sprite"
@@ -19,6 +19,7 @@ The editor can link a material slot to a **material asset** (a `.material` file
19
19
  | `materials` | `THREE.Material[]` | Live three.js materials currently bound to the entity's mesh (one per submesh). |
20
20
  | `material` | `THREE.Material \| null` | Convenience reference to `materials[0]`. `null` when no material is assigned. |
21
21
  | `values` | `MaterialValueState[]` | Serialized authoring state (one entry per material in `materials`). Saved with the project. |
22
+ | `assetRefs` | `(string \| null)[]` | Editor-managed material-asset linkage, one entry per slot (parallel to `values`). A `localasset://` URL of a `.material` asset file, or `null`/absent for a local (unlinked) material. The editor materializes the asset's values into `values` and keeps them in sync when the asset is edited — rendering and the runtime read only `values` and ignore this field. Saved with the project; survives material rebinds. |
22
23
 
23
24
  ## API reference
24
25
 
@@ -0,0 +1,32 @@
1
+ # Script Object
2
+
3
+ Component for a **script object** — a single `ScriptObject` whose THREE.js visual is built by user code and runs in the editor AND at runtime. Unlike `ScriptComponent` this holds ONE script (not an entries array). The live instance ref is non-enumerable so it never leaks into save data or undo history.
4
+
5
+ ## Editor inspector
6
+
7
+ ::: tip Screenshot
8
+ Add a screenshot of the **Script Object** component in the editor inspector here.
9
+ Suggested asset path: `/public/images/inspector/script-object.png`
10
+ :::
11
+
12
+ ```md
13
+ ![Script Object inspector](/images/inspector/script-object.png)
14
+ ```
15
+
16
+ ## Properties
17
+
18
+ | Property | Type | Description |
19
+ | --- | --- | --- |
20
+ | `scriptUrl` | `string \| null` | — |
21
+ | `className` | `string \| null` | — |
22
+ | `enabled` | `boolean` | — |
23
+ | `data` | `Record<string, unknown>` | — |
24
+ | `runtimeState` | `ScriptObjectRuntimeState` | — |
25
+ | `runtimeMessage` | `string` | — |
26
+ | `instance` | `unknown \| null` | Live ScriptObject instance. Non-enumerable — never enters snapshots/history. |
27
+
28
+ ## API reference
29
+
30
+ - Class: [`ScriptObjectComponent`](../../api/components/classes/ScriptObjectComponent.md)
31
+ - Source: [`core/components/ScriptObjectComponent.ts`](https://github.com/Relu-Interactives/relu-spatial-ecs-engine/blob/main/core/components/ScriptObjectComponent.ts)
32
+
@@ -1353,6 +1353,22 @@ function getMaterialType(material) {
1353
1353
  return "standard";
1354
1354
  }
1355
1355
  __name(getMaterialType, "getMaterialType");
1356
+ function textureImageSrc(texture) {
1357
+ const src = texture?.image?.src;
1358
+ return typeof src === "string" ? src : void 0;
1359
+ }
1360
+ __name(textureImageSrc, "textureImageSrc");
1361
+ function textureSourceUrl(texture) {
1362
+ if (!texture?.image) {
1363
+ return void 0;
1364
+ }
1365
+ const currentSrc = texture.source?.data?.currentSrc;
1366
+ if (typeof currentSrc === "string" && currentSrc) {
1367
+ return currentSrc;
1368
+ }
1369
+ return textureImageSrc(texture);
1370
+ }
1371
+ __name(textureSourceUrl, "textureSourceUrl");
1356
1372
  function createMaterialValue(material) {
1357
1373
  const materialRecord = material;
1358
1374
  const normalScale = materialRecord.normalScale;
@@ -1372,17 +1388,33 @@ function createMaterialValue(material) {
1372
1388
  depthWrite: materialRecord.depthWrite !== false,
1373
1389
  wireframe: Boolean(materialRecord.wireframe),
1374
1390
  transparent: Boolean(materialRecord.transparent),
1375
- textureMap: map?.image ? map.source?.data?.currentSrc || map.image?.src : void 0,
1376
- alphaTextureMap: materialRecord.alphaMap?.image?.src,
1377
- normalMap: materialRecord.normalMap?.image?.src,
1378
- roughnessMap: materialRecord.roughnessMap?.image?.src,
1379
- metalnessMap: materialRecord.metalnessMap?.image?.src,
1380
- aoMap: materialRecord.aoMap?.image?.src,
1381
- emissiveMap: materialRecord.emissiveMap?.image?.src,
1382
- bumpMap: materialRecord.bumpMap?.image?.src,
1383
- displacementMap: materialRecord.displacementMap?.image?.src,
1384
- lightMap: materialRecord.lightMap?.image?.src,
1385
- envMap: materialRecord.envMap?.image?.src,
1391
+ textureMap: textureSourceUrl(map),
1392
+ alphaTextureMap: textureImageSrc(
1393
+ materialRecord.alphaMap
1394
+ ),
1395
+ normalMap: textureImageSrc(
1396
+ materialRecord.normalMap
1397
+ ),
1398
+ roughnessMap: textureImageSrc(
1399
+ materialRecord.roughnessMap
1400
+ ),
1401
+ metalnessMap: textureImageSrc(
1402
+ materialRecord.metalnessMap
1403
+ ),
1404
+ aoMap: textureImageSrc(materialRecord.aoMap),
1405
+ emissiveMap: textureImageSrc(
1406
+ materialRecord.emissiveMap
1407
+ ),
1408
+ bumpMap: textureImageSrc(
1409
+ materialRecord.bumpMap
1410
+ ),
1411
+ displacementMap: textureImageSrc(
1412
+ materialRecord.displacementMap
1413
+ ),
1414
+ lightMap: textureImageSrc(
1415
+ materialRecord.lightMap
1416
+ ),
1417
+ envMap: textureImageSrc(materialRecord.envMap),
1386
1418
  textureFiltering: map?.magFilter === THREE29__namespace.NearestFilter ? "sharp" : "smooth",
1387
1419
  useMipmaps: map?.generateMipmaps !== false
1388
1420
  };