Home Reference Source
public class | source

Script

Extends:

Component → Script

Static Member Summary

Static Public Members
public static get
public static get

propsTypes: {"listenTo": *}

Static Method Summary

Static Public Methods
public static

factory(): *

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get
public set

Method Summary

Public Methods
public
public

onAction(name: *, args: ...*): *

public
public

onContactBegin(body: *, contact: *)

public

onContactEnd(body: *, contact: *)

public
public

onGamepadConnected(gamepad: *)

public

onGamepadDisconnected(gamepad: *)

public

onGamepadProcess(gamepad: *)

public

onKeyDown(code: *)

public

onKeyUp(code: *)

public

onMouseDown(unitVec: *, screenVec: *, button: *)

public

onMouseMove(unitVec: *, screenVec: *)

public

onMouseUp(unitVec: *, screenVec: *, button: *)

public

onPreview(gl: *, renderer: *, deltaTime: *)

public

onPropertySerialize(name: *, value: *): *

public

onPropertySetup(name: *, value: *)

public

onRender(gl: *, renderer: *, deltaTime: *, layer: *)

public

onRenderLayer(gl: *, renderer: *, deltaTime: *, layer: *)

public

onTouchDown(unitVec: *, screenVec: *, identifier: *)

public

onTouchMove(unitVec: *, screenVec: *, identifier: *)

public

onTouchUp(unitVec: *, screenVec: *, identifier: *)

public

onUpdate(deltaTime: *)

Inherited Summary

From class Component
public static get
public static

Component factory.

public get
public

[name]: *

public

deserialize(json: *)

Deserialize JSON properties into this component.

public

Destructor (dispose internal resources and detach from entity).

public

onAction(name: string, args: *)

Called when action arrived.

public

onAlterActionArguments(name: string, args: *): array | undefined

Called when asked to alter arrived action parameters.

public

Called after attached to entity.

public

Called before detached from entity.

public

onPropertySerialize(name: string, value: *): *

Called when property is serialized.

public

onPropertySetup(name: string, value: *)

Called when given property is deserialized.

public

serialize(): *

Serialize component into JSON data.

Static Public Members

public static get EventFlags: * source

public static get propsTypes: {"listenTo": *} source

Override:

Component#propsTypes

Static Public Methods

public static factory(): * source

Component factory.

Override:

Component#factory

Return:

*

Public Constructors

public constructor() source

Constructor.

Override:

Component#constructor

Public Members

public get listenTo: * source

public set listenTo source

Public Methods

public dispose() source

Destructor (dispose internal resources and detach from entity).

Override:

Component#dispose

public onAction(name: *, args: ...*): * source

Called when action arrived.

Override:

Component#onAction

Params:

NameTypeAttributeDescription
name *
args ...*

Return:

*

public onAttach() source

Called after attached to entity.

Override:

Component#onAttach

public onContactBegin(body: *, contact: *) source

Params:

NameTypeAttributeDescription
body *
contact *

public onContactEnd(body: *, contact: *) source

Params:

NameTypeAttributeDescription
body *
contact *

public onDetach() source

Called before detached from entity.

Override:

Component#onDetach

public onGamepadConnected(gamepad: *) source

Params:

NameTypeAttributeDescription
gamepad *

public onGamepadDisconnected(gamepad: *) source

Params:

NameTypeAttributeDescription
gamepad *

public onGamepadProcess(gamepad: *) source

Params:

NameTypeAttributeDescription
gamepad *

public onKeyDown(code: *) source

Params:

NameTypeAttributeDescription
code *

public onKeyUp(code: *) source

Params:

NameTypeAttributeDescription
code *

public onMouseDown(unitVec: *, screenVec: *, button: *) source

Params:

NameTypeAttributeDescription
unitVec *
screenVec *
button *

public onMouseMove(unitVec: *, screenVec: *) source

Params:

NameTypeAttributeDescription
unitVec *
screenVec *

public onMouseUp(unitVec: *, screenVec: *, button: *) source

Params:

NameTypeAttributeDescription
unitVec *
screenVec *
button *

public onPreview(gl: *, renderer: *, deltaTime: *) source

Params:

NameTypeAttributeDescription
gl *
renderer *
deltaTime *

public onPropertySerialize(name: *, value: *): * source

Called when property is serialized.

Override:

Component#onPropertySerialize

Params:

NameTypeAttributeDescription
name *
value *

Return:

*

public onPropertySetup(name: *, value: *) source

Called when given property is deserialized.

Override:

Component#onPropertySetup

Params:

NameTypeAttributeDescription
name *
value *

public onRender(gl: *, renderer: *, deltaTime: *, layer: *) source

Params:

NameTypeAttributeDescription
gl *
renderer *
deltaTime *
layer *

public onRenderLayer(gl: *, renderer: *, deltaTime: *, layer: *) source

Params:

NameTypeAttributeDescription
gl *
renderer *
deltaTime *
layer *

public onTouchDown(unitVec: *, screenVec: *, identifier: *) source

Params:

NameTypeAttributeDescription
unitVec *
screenVec *
identifier *

public onTouchMove(unitVec: *, screenVec: *, identifier: *) source

Params:

NameTypeAttributeDescription
unitVec *
screenVec *
identifier *

public onTouchUp(unitVec: *, screenVec: *, identifier: *) source

Params:

NameTypeAttributeDescription
unitVec *
screenVec *
identifier *

public onUpdate(deltaTime: *) source

Params:

NameTypeAttributeDescription
deltaTime *