@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / ScriptObjectSystem
Class: ScriptObjectSystem ​
Defined in: systems/ScriptObjectSystem.ts:97
Builds, ticks, and disposes ScriptObject scripts. Unlike ScriptBehaviourSystem, this runs in the editor AND at runtime — there is NO isEditorMode gating anywhere here. A script's build() output is attached under the entity's Object3DRef.object (so it inherits transform, selection and visibility). runtimeState is written on transitions only (never every frame).
Construct it and pass it to World.setup({ systems }).
Implements ​
Constructors ​
Constructor ​
new ScriptObjectSystem(moduleLoader?): ScriptObjectSystem;Defined in: systems/ScriptObjectSystem.ts:104
Parameters ​
| Parameter | Type |
|---|---|
moduleLoader? | ModuleLoader |
Returns ​
ScriptObjectSystem
Methods ​
update() ​
update(world, deltaTime): void;Defined in: systems/ScriptObjectSystem.ts:108
Parameters ​
| Parameter | Type |
|---|---|
world | World |
deltaTime | number |
Returns ​
void
Implementation of ​
invalidateAll() ​
invalidateAll(): void;Defined in: systems/ScriptObjectSystem.ts:407
Dispose all live instances so the next update() reloads with fresh modules.
Returns ​
void
invalidate() ​
invalidate(scriptUrl): void;Defined in: systems/ScriptObjectSystem.ts:422
Invalidate only the entities whose script matches scriptUrl.
Parameters ​
| Parameter | Type |
|---|---|
scriptUrl | string |
Returns ​
void
dispose() ​
dispose(world): void;Defined in: systems/ScriptObjectSystem.ts:439
Parameters ​
| Parameter | Type |
|---|---|
world | World |
Returns ​
void

