Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / ScriptErrorPhase

Type Alias: ScriptErrorPhase ​

ts
type ScriptErrorPhase = 
  | "load"
  | "init"
  | "build"
  | "update"
  | string & {
};

Defined in: scriptErrors.ts:11

Where in a script's life an error happened.

  • "load": fetching/importing the module, or the named class is missing.
  • "init": the constructor or a Behaviour's init() threw.
  • "build": a ScriptObject's build() threw or did not return an Object3D.
  • "update": a per-frame update() / onUpdate() threw.
  • Any other string is the name of the Behaviour hook that threw, e.g. "onSelect", "onUiPress", "onGrab", "onXRSessionStart".