Function: ScriptMixin()
ScriptMixin<
TBase
>(base
): {(...args
):(Anonymous class)
;prototype
:(Anonymous class)
<any
>; } &TBase
Defined in: src/core/Script.ts:49
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/0_basic/
for an example to start with.
If the class does not extends View, it can still bind the above three function, where the engine ignores whether reticle exists.
Supported (native WebXR) functions to extend:
onSelectStart(event) onSelectEnd(event)
Type Parameters
TBase
TBase
extends Constructor
<Object3D
<Object3DEventMap
>>
Parameters
base
TBase
Returns
{(...args
): (Anonymous class)
; prototype
: (Anonymous class)
<any
>; } & TBase