Home Reference Source
import Skeleton from 'oxygen-core/components/Skeleton.js'
public class | source

Skeleton

Extends:

ComponentScript → Skeleton

Static Member Summary

Static Public Members
public static get

propsTypes: {...undefined: Object, "asset": string, "skin": string, "animation": string, "loop": string, "speed": string, "time": string, "paused": string}

Static Method Summary

Static Public Methods
public static

factory(): *

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get
public set
public get

asset: *

public set
public get

events: *

public get

loop: *

public set
public get

paused: *

public set
public get

skin: *

public set
public get

speed: *

public set
public get

time: *

public set

Method Summary

Public Methods
public

applyAnimationFrame(id: *, time: *, loop: boolean)

public
public
public
public

onUpdate(deltaTime: *)

public

playAnimation(id: *, looped: boolean)

public

rebind()

public

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.

From class Script
public static get
public static get

propsTypes: {"listenTo": *}

public static

factory(): *

public get
public set
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: *)

Static Public Members

public static get propsTypes: {...undefined: Object, "asset": string, "skin": string, "animation": string, "loop": string, "speed": string, "time": string, "paused": string} source

Override:

Script#propsTypes

Static Public Methods

public static factory(): * source

Component factory.

Override:

Script#factory

Return:

*

Public Constructors

public constructor() source

Constructor.

Override:

Script#constructor

Public Members

public get animation: * source

public set animation source

public get asset: * source

public set asset source

public get events: * source

public get loop: * source

public set loop source

public get paused: * source

public set paused source

public get skin: * source

public set skin source

public get speed: * source

public set speed source

public get time: * source

public set time source

Public Methods

public applyAnimationFrame(id: *, time: *, loop: boolean) source

Params:

NameTypeAttributeDescription
id *
time *
loop boolean
  • optional
  • default: false

public applySkin(id: string) source

Params:

NameTypeAttributeDescription
id string
  • optional
  • default: default

public dispose() source

Destructor (dispose internal resources and detach from entity).

Override:

Script#dispose

public onAttach() source

Called after attached to entity.

Override:

Script#onAttach

public onUpdate(deltaTime: *) source

Override:

Script#onUpdate

Params:

NameTypeAttributeDescription
deltaTime *

public playAnimation(id: *, looped: boolean) source

Params:

NameTypeAttributeDescription
id *
looped boolean
  • optional
  • default: false

public rebind() source

public stopAnimation() source