CameraDirector2D
Extends:
Control multiple 2D cameras with one director.
Example:
const component = new CameraDirector2D();
component.deserialize({ zoomOut: 1024, zoomMode: 'keep-aspect', cameras: [ './cameraA', './cameraB' ] });
Static Member Summary
Static Public Members | ||
public static get |
ZoomMode: * |
|
public static get |
propsTypes: * |
Static Method Summary
Static Public Methods | ||
public static |
Componeny factory. |
Constructor Summary
Public Constructor | ||
public |
Constructor. |
Member Summary
Public Members | ||
public get |
|
|
public set |
|
|
public get |
|
|
public set |
|
|
public get |
|
|
public set |
|
|
public get |
|
|
public set |
|
|
public get |
|
|
public set |
|
|
public get |
|
|
public set |
|
|
public get |
|
|
public set |
|
Method Summary
Public Methods | ||
public |
onAction(name: *, args: ...*): * |
|
public |
onPropertySerialize(name: *, value: *): * |
|
public |
onView(gl: WebGLRenderingContext, renderer: RenderSystem, deltaTime: number): boolean Called when camera need to view rendered scene. |
Inherited Summary
From class Component | ||
public static get |
propsTypes: * |
|
public static |
Component factory. |
|
public get |
|
|
public |
[name]: * |
|
public |
deserialize(json: *) Deserialize JSON properties into this component. |
|
public |
dispose() Destructor (dispose internal resources and detach from entity). |
|
public |
Called when action arrived. |
|
public |
onAlterActionArguments(name: string, args: *): array | undefined Called when asked to alter arrived action parameters. |
|
public |
onAttach() Called after attached to entity. |
|
public |
onDetach() 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 ZoomMode: * source
Static Public Methods
Public Constructors
Public Members
Public Methods
public onAction(name: *, args: ...*): * source
Called when action arrived.
Override:
Component#onActionParams:
Name | Type | Attribute | Description |
name | * | ||
args | ...* |
Return:
* |
public onPropertySerialize(name: *, value: *): * source
Called when property is serialized.
Override:
Component#onPropertySerializeParams:
Name | Type | Attribute | Description |
name | * | ||
value | * |
Return:
* |
public onView(gl: WebGLRenderingContext, renderer: RenderSystem, deltaTime: number): boolean source
Called when camera need to view rendered scene.
Params:
Name | Type | Attribute | Description |
gl | WebGLRenderingContext | WebGL context. |
|
renderer | RenderSystem | Calling renderer instance. |
|
deltaTime | number | Delta time. |