Repository
public class |source

Component

Indirect Subclass:

Basic3DContext

The generic componment class. Used for all Mobilizing components such as input helpers, renderers, etc.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public

events: *

public

id: *

public

name: *

Private Members
private

_nexts: *[]

private

Method Summary

Public Methods
public
public

chain(component: Component)

Adds a component to this chained component array

public

Returns the array of attached children components

public

off()

Deactivate the component

public

on()

Activate the component A call to this method calls the setup method if it has not been run yet

public

Run code after the update of all components is run This empty method is usually overriden to perform post-update actions for the component It is called periodically by an internal Mobilizing mechanism

public

preLoad the component This empty method is usually overriden to perform preLoad actions for the component.

public

Run code before the update of all components is run This empty method is usually overriden to perform pre-update actions for the component It is called once per component by an internal Mobilizing mechanism

public

prepare the component This empty method is usually overriden to perform preparation actions for the component, from external process as a server.

public

Set's up the component This empty method is usually overriden to perform setup actions for the component This is where all the initialization (such as adding event listeners)should be done It is called automatically by an internal Mobilizing mechanism and should thus not be called directly

public

Update the component This empty method is usually overriden to perform update actions for the component It is called periodically by an internal Mobilizing mechanism

Public Constructors

public constructor(params: Object) source

Params:

NameTypeAttributeDescription
paramsObject

Parameters object, given by the constructor.

params.contextContext

The Mobilizing Context

params.nameString

The component's name

params.idString
  • optional
  • default: uuid()

The component's ID

Public Members

public active: boolean source

public context: * source

public events: * source

public id: * source

public name: * source

Private Members

private _nexts: *[] source

private _setupDone: boolean source

Public Methods

public byPass() source

public chain(component: Component) source

Adds a component to this chained component array

Params:

NameTypeAttributeDescription
componentComponent

the component to chain

public getChainedComponents(): Array source

Returns the array of attached children components

Return:

Array

children arrays

public off() source

Deactivate the component

public on() source

Activate the component A call to this method calls the setup method if it has not been run yet

public postUpdate() source

Run code after the update of all components is run This empty method is usually overriden to perform post-update actions for the component It is called periodically by an internal Mobilizing mechanism

public preLoad() source

preLoad the component This empty method is usually overriden to perform preLoad actions for the component. The preLoad is designed to be called before any other method, even setup, except prepare. In the case of user scripts, it is used to preload all needed datas before the setup (pictures, font, etc.) It is called automatically by an internal Mobilizing mechanism and should thus not be called directly

public preUpdate() source

Run code before the update of all components is run This empty method is usually overriden to perform pre-update actions for the component It is called once per component by an internal Mobilizing mechanism

public prepare() source

prepare the component This empty method is usually overriden to perform preparation actions for the component, from external process as a server. The prepare function is designed to be called before any other method, even preLoad. It is called automatically by an internal Mobilizing mechanism and should thus not be called directly

public setup() source

Set's up the component This empty method is usually overriden to perform setup actions for the component This is where all the initialization (such as adding event listeners)should be done It is called automatically by an internal Mobilizing mechanism and should thus not be called directly

public update() source

Update the component This empty method is usually overriden to perform update actions for the component It is called periodically by an internal Mobilizing mechanism