Camera2D
Camera used to view 2D scene.
Example:
const component = new Camera2D();
component.deserialize({ zoomOut: 1024, zoomMode: 'keep-aspect' });
Static Member Summary
| Static Public Members | ||
| public static get |
ZoomMode: * |
|
| public static get |
propsTypes: * |
|
Constructor Summary
| Public Constructor | ||
| public |
Constructor. |
|
Member Summary
| Public Members | ||
| public get |
|
|
| public get |
|
|
| 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 |
buildCameraMatrix(target: *, width: *, height: *) |
|
| public |
onPropertySerialize(name: *, value: *): * |
|
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. |
|
| From class Camera | ||
| public static get |
propsTypes: * |
|
| public static |
Component factory. |
|
| public get |
|
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public get |
inverseProjectionMatrix: mat4 |
|
| public get |
inverseViewMatrix: mat4 |
|
| public get |
|
|
| public get |
|
|
| public set |
|
|
| public get |
projectionMatrix: mat4 |
|
| public get |
|
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public get |
renderTargetMulti: *[] |
|
| public set |
renderTargetMulti: *[] |
|
| public get |
|
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public get |
viewMatrix: mat4 |
|
| public get |
viewProjectionMatrix: mat4 |
|
| public abstract |
buildCameraMatrix(target: mat4, width: number, height: number) Building camera matrix. |
|
| public |
convertUnitPointToGlobalPoint(target: vec2, unitVec: vec2) Convert screen space unit ([-1; 1]) vec2 point to global vec2 point. |
|
| public |
dispose() |
|
| public |
onAction(name: *, args: ...*): * |
|
| public |
onAttach() |
|
| public |
onDetach() |
|
| public |
Called on view resize. |
|
| public |
onView(gl: WebGLRenderingContext, renderer: RenderSystem, deltaTime: number): boolean Called when camera need to view rendered scene. |
|
| public |
registerPostprocess(postprocess: PostprocessPass, floatPointData: boolean) Register postprocess. |
|
| public |
Unregister postprocess. |
|
Static Public Members
public static get ZoomMode: * source
Static Public Methods
Public Constructors
Public Members
Public Methods
public buildCameraMatrix(target: *, width: *, height: *) source
Building camera matrix.
Override:
Camera#buildCameraMatrixParams:
| Name | Type | Attribute | Description |
| target | * | ||
| width | * | ||
| height | * |
public onPropertySerialize(name: *, value: *): * source
Called when property is serialized.
Override:
Component#onPropertySerializeParams:
| Name | Type | Attribute | Description |
| name | * | ||
| value | * |
Return:
| * |
