Skip to main content

Function: ScriptMixin()

ScriptMixin<TBase>(base): {(...args): MixedScript; prototype: MixedScript<any>; } & TBase

Defined in: src/core/Script.ts:95

The Script class facilities development by providing useful life cycle functions similar to MonoBehaviors in Unity.

Each Script object is an independent THREE.Object3D entity within the scene graph.

See /docs/manual/Scripts.md for the full documentation.

It manages user, objects, and interaction between user and objects. See /templates/00_basic/ for an example to start with.

Supported interaction functions to extend:

onSelectStart(event) onSelectEnd(event)

Type Parameters

TBase

TBase extends Constructor<Object3D<Object3DEventMap>>

Parameters

base

TBase

Returns

{(...args): MixedScript; prototype: MixedScript<any>; } & TBase