Home Reference Source
public class | source

M_Scene

Extends:

GLBoostObjectL_ElementM_ElementM_Group → M_Scene

This M_Scene class is the top level element of scene graph hierarchy. To render scene, pass this scene element to Renderer.draw method.

Constructor Summary

Public Constructor
public

constructor(canvas: HTMLCanvas | string)

constructor

Member Summary

Public Members
public get

cameras: *: Array<PerspectiveCamera>

Get child cameras which belong to this scene.

public get

elements: *: Array<Element>

Get child elements which belong to this scene.

public get

Get child lights which belong to this scene.

public get
public get
public get

Get child meshes which belong to this scene.

Private Members
private
private
private
private
private
private

_gl: WebGLRenderingContext

private
private
private
private

Method Summary

Public Methods
public
public

getChildren(): Array<Element>

Get child elements which belong to this scene.

public

getMainCamera(renderPass: any): *

public

prepareToRender(expression: any)

Prepare for Rendering.

public
Private Methods
private
private

_reset()

Inherited Summary

From class GLBoostObject
public static
private static
private static
public get
public get
public get

Return the simple class-specific number.

public get
public get
public get
public get
public get
public get
public set
private
private
private
private
private
private
private
private
private
private
public
public
public
public

Return instance name.

public
private

_copy(instance: *)

private
From class L_Element
public get
public get

matrix: *

public set
public get
public get
public set
public get

rotate: *

public set
public get
public set
public get

scale: *

public set
public get
public get
public set
public get
public

[key]: *

public
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
public
public

getMatrixAt(lineName: string, inputValue: Vector3): *

public

getMatrixAtOrStatic(lineName: string, inputValue: number): *

public
public

getQuaternionAt(lineName: string, inputValue: number): *

public

getQuaternionAtOrStatic(lineName: string, inputValue: number | nullliteral): *

public
public

getRotateAt(lineName: string, inputValue: number): *

public

getRotateAtOrStatic(lineName: string, inputValue: number): *

public
public

getScaleAt(lineName: string, inputValue: number): *

public

getScaleAtOrStatic(lineName: string, inputValue: number): *

public
public
public

getTranslateAt(lineName: string, inputValue: number): Vector3

public

getTranslateAtOrStatic(lineName: string, inputValue: number): *

public
public
public

headToDirection(fromVec: Vector3, toVec: Vector3)

public

isTrsMatrixNeeded(lineName: string, inputValue: number): *

public
public
public

setAnimationAtLine(lineName: string, attributeName: string, inputArray: Array<any>, outputArray: Array<any>, interpolationMethod: string)

public

Set animation input value (for instance frame value), This value affect all child elements in this scene graph (recursively).

public
public
private
private
private
private
private
private

_copy(instance: L_Element)

private

_getAnimatedTransformValue(value: *, animation: *, type: *): *

private
private
From class M_Element
public set
public get
public get
public set
public get

gizmos: *

public get
public get
public get
public get
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
public get
public set
public get
public get

opacity: *

public set
public get
public get

parent: *

public get
public set
public get
public get
public get
public
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private

_masterElement: M_Element | nullliteral

private
private
private
private
private
private

_parent: M_Group | nullliteral

private
private
private
public

addGizmo(gizmo: M_Gizmo)

public
public
public
public
public
public
public
private
private
private

_copy(instance: M_Element)

private

_getCurrentAnimationInputValue(inputName: string): number | nullliteral

private

_multiplyMyAndParentRotateMatrices(currentElem: M_Element | nullliteral, withMySelf: boolean): *

private

_multiplyMyAndParentTransformMatrices(withMySelf: *, input: *): *

private
private
private
private
private
From class M_Group
public get

AABB: *

public get
public set
private
private
private
private

_glBoostSystem: glBoostSystem

private
private
public

addChild(element: Element, isDuplicateOk: boolean)

Add the element to this group as a child.

public

clone(clonedOriginalRootElement: any, clonedRootElement: any, onCompleteFuncs: any): *

public

executeSpecifiedFunctionRecursively(func: Function, thisObj: any, args: Array<any>, childIndexToInsertToArgs: *)

public

getAnyJointAsChild(): M_Joint | nullliteral

public
public

getEndAnimationInputValue(inputLineName: string, element: M_Group): *

public

getStartAnimationInputValue(inputLineName: string, element: M_Group): *

public

rayCast(arg1: number, arg2: number, camera: any, viewport: any): undefined[]

public
public

remove all elements from this group.

public

remove the element from this group.

public

searchElement(query: string, queryMeta: QueryMeta, element: M_Group): *

public

searchElementByNameAndType(query: string, type: GLBoostObject, queryMeta: QueryMeta, element: M_Group): *

public

searchElementsByNameAndType(query: string, type: GLBoostObject, queryMeta: QueryMeta, element: M_Group): *

public

searchElementsByType(type: any, element: M_Element): *

public

searchGLBoostObjectByNameAndType(query: string, type: GLBoostObject, queryMeta: QueryMeta, element: M_Group | M_Element | M_Mesh): *

public

searchGLBoostObjectsByNameAndType(query: any, type: GLBoostObject, queryMeta: QueryMeta, element: M_Group): *

public

setSpecifiedPropertyRecursively(propertyName: string, value: any)

public

updateAABB(): *

private

_copy(instance: *)

private
private
private
private

_validateByQuery(object: GLBoostObject, query: string, queryMeta: QueryMeta): *

Public Constructors

public constructor(canvas: HTMLCanvas | string) source

constructor

Override:

M_Group#constructor

Params:

NameTypeAttributeDescription
canvas HTMLCanvas | string

canvas or canvas' id string.

Public Members

public get cameras: *: Array<PerspectiveCamera> source

Get child cameras which belong to this scene.

Return:

*

child cameras of this scene.

public get elements: *: Array<Element> source

Get child elements which belong to this scene.

Return:

*

child elements of this scene.

public get lights: *: Array<M_AbstractLight> source

Get child lights which belong to this scene.

Return:

*

child lights of this scene.

public get lightsExceptAmbient: * source

public get lightsExceptAmbient: * source

public get meshes: *: Array<M_Mesh> source

Get child meshes which belong to this scene.

Return:

*

child meshes of this scene.

Private Members

private _accumulatedAmbientIntensity: Vector4 source

private _ambientLights: M_AmbientLight source

private _cameras: Array<M_AbstractCamera> source

private _currentAnimationInputValues: Object source

Override:

M_Element#_currentAnimationInputValues

private _elements: Array<M_Group> source

Override:

M_Group#_elements

private _gl: WebGLRenderingContext source

private _glContext: GLContext source

Override:

GLBoostObject#_glContext

private _lights: M_AbstractLight source

private _lightsExceptAmbient: M_AbstractLight source

private _meshes: Array<M_Mesh> source

Public Methods

public getAmountOfAmbientLightsIntensity(): * source

Return:

*

public getChildren(): Array<Element> source

Get child elements which belong to this scene.

Override:

M_Group#getChildren

Return:

Array<Element>

child elements of this scene.

public getMainCamera(renderPass: any): * source

Params:

NameTypeAttributeDescription
renderPass any

Return:

*

public prepareToRender(expression: any) source

Prepare for Rendering. You have to call this method before Renderer.draw method.

Override:

M_Element#prepareToRender

Params:

NameTypeAttributeDescription
expression any

public updateAmountOfAmbientLightsIntensity() source

Private Methods

private _getCurrentAnimationInputValue(inputName: string): * source

Override:

M_Element#_getCurrentAnimationInputValue

Params:

NameTypeAttributeDescription
inputName string

Return:

*

private _reset() source