Repository

Basic3DContext

Extends:

ComponentContext → Basic3DContext

A class to instanciate a Mobilizing Context with prebuild elements. These can be access like this in the user script : this.context.camera. It contains these components : Time, Touch, Mouse, Pointer and these 3D scene elements : RendererThree, Camera, Light.

Static Method Summary

Static Public Methods
public static

Static method to allow aggregation of BasicContext elements to a standard Context, just by calling this in the setup().

Member Summary

Public Members
public
public
public
public
public
public
public

Method Summary

Public Methods
public

Inherited Summary

From class Component
public
public
public

events: *

public

id: *

public

name: *

private

_nexts: *[]

private
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

From class Context
public
public

events: *

public

loader: *

public
public

Add a Component to this context

public

chainedCall(component: Component, method: String, arg: Any)

public

preLoad all components

public

Can be used to prepare something (ie : params comming from network server!) after construction but before preLoad

public

Setup for this Context instance (setup all components that are already instantied)

public

Update

Static Public Methods

public static makeBasicContext(ctx: Context) source

Static method to allow aggregation of BasicContext elements to a standard Context, just by calling this in the setup().

Params:

NameTypeAttributeDescription
ctxContext

the context to use for members addition

Public Members

public camera: Camera source

public light: Light source

public mouse: Mouse source

public pointer: Pointer source

public renderer: RendererThree source

public time: Time source

public touch: Touch source

Public Methods

public setup() source

Setup for this Context instance (setup all components that are already instantied)

Override:

Context#setup