Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NgxSceneComponent

The Scene component.

See the ngx3js docs page for details. See the ngx scene page for a live demo.

<ngx3js-scene [background]="'0xf0f0f0'"></ngx3js-scene>

Hierarchy

Implements

  • OnInit

Index

Constructors

constructor

Properties

Protected OBJECT3D_ATTR

OBJECT3D_ATTR: string[] = ...

Object3 d attr of abstract object3d component

Protected OBJECT_ATTR

OBJECT_ATTR: string[] = ...

Object attr of abstract subscribe component

Protected _changeList

_changeList: string[] = null

Change list of abstract subscribe component

Protected _needUpdate

_needUpdate: boolean = true

Need update of abstract subscribe component

background

background: any = null

If not null, sets the background used when rendering the scene, and is always rendered first. Can be set to a Color which sets the clear color, a Texture covering the canvas, a cubemap as a CubeTexture or an equirectangular as a Texture . Default is null.

Protected cachedGeometryList

cachedGeometryList: NgxAbstractGeometryComponent[] = []

Protected cachedLookatList

cachedLookatList: NgxLookatComponent[] = []

Protected cachedMaterialList

cachedMaterialList: NgxAbstractMaterialComponent[] = []

Protected cachedPositionList

cachedPositionList: NgxPositionComponent[] = []

Protected cachedRotationList

cachedRotationList: NgxRotationComponent[] = []

Protected cachedScaleList

cachedScaleList: NgxScaleComponent[] = []

castShadow

castShadow: boolean = null

Whether the object gets rendered into shadow map. Default is false.

Protected controllerList

controllerList: QueryList<NgxAbstractControllerComponent>

Content children of abstract object3d component

debug

debug: boolean = false

Debug this Object

enabled

enabled: boolean = true

Enabled or Not

environment

environment: any = null

If not null, this texture is set as the environment map for all physical materials in the scene. However, it's not possible to overwrite an existing texture assigned to MeshStandardMaterial.envMap. Default is null.

frustumCulled

frustumCulled: boolean = null

When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object. If set to false the object gets rendered every frame even if it is not in the frustum of the camera. Default is true.

geometry

geometry: any = null

The geometry of mesh

Protected geometryList

geometryList: QueryList<NgxAbstractGeometryComponent>

Content children of mesh component

Protected id

id: string = ''

The Id of abstract subscribe component

material

The material of mesh

materialIsArray

materialIsArray: boolean = null

The material of mesh is array

Protected materialList

materialList: QueryList<NgxAbstractMaterialComponent>

Content children of abstract object3d component

matrixAutoUpdate

matrixAutoUpdate: boolean = null

When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property. Default is Object3D.DefaultMatrixAutoUpdate (true).

name

name: string = ''

The name of the object (doesn't need to be unique). Default is an empty string.

Protected object3d

object3d: I3JS.Object3D<Event> = null

The Object3d of abstract object3d component

Protected object3dList

object3dList: QueryList<NgxAbstractObject3dComponent>

Content children of abstract object3d component

onDestory

onDestory: EventEmitter<NgxSceneComponent> = ...

Will be called when before destory. The argument will be the loaded self

onLoad

onLoad: EventEmitter<NgxSceneComponent> = ...

Will be called when load completes. The argument will be the loaded self

overrideParams

overrideParams: {} = null

The override params

Type declaration

  • [key: string]: any

Protected parent

parent: any = null

The Parent of abstract subscribe component

Protected parentObject3d

parentObject3d: I3JS.Object3D<Event> = null

Parent object3d of abstract object3d component

receiveShadow

receiveShadow: boolean = null

Whether the material receives shadows. Default is false.

Protected selfAny

selfAny: any = ...

storageName

storageName: string = null

The storageName of scene component

Protected subscribeType

subscribeType: string = null

Subscribe type of abstract subscribe component

tween

tween: {} = null

Tween animation params

Type declaration

  • [key: string]: any

userData

userData: any = null

An object that can be used to store custom data about the Object3D. It should not hold references to functions as these will not be cloned.

visible

visible: boolean = true

Object gets rendered if true. Default is true.

windowExport

windowExport: string = null

Export this Object to window global variables

Accessors

needUpdate

  • set needUpdate(value: boolean): void
  • Sets need update

    Parameters

    • value: boolean

    Returns void

Methods

addChanges

  • addChanges(key: string | string[] | SimpleChanges): void

addChildObject3d

addDebugLine

  • addDebugLine(objs: I3JS.Object3D<Event>[], lines: string[], prefix: string): string[]

addParentObject3d

addPosition

addRotation

Protected applyChanges

  • applyChanges(changes: string[]): void

applyChanges3d

  • applyChanges3d(changes: string[]): void

Protected callOnLoad

  • callOnLoad(): void

Protected checkChanges

  • checkChanges(changes: SimpleChanges): SimpleChanges

Protected clearChanges

  • clearChanges(): void

Protected consoleLog

  • consoleLog(key: string, object: any, level?: string): void

Protected consoleLogTime

  • consoleLogTime(key: string, object: any, repeat?: number): void

Protected destroyLocalComponent

  • destroyLocalComponent(key: string): void

dispose

  • dispose(): void

Protected getChanges

  • getChanges(): string[]

getGeometry

getId

  • getId(): string

getJson

  • getJson(): any

Protected getMaterialOne

Protected getMaterials

Protected getMaterialsMulti

Protected getName

  • getName(def?: string): string

getObject

  • getObject<T>(): T

getObject3d

  • getObject3d<T>(): T

getObjectById

getObjectByName

getObjectByProperty

getObjectTop

getPosition

getRenderer

getRotation

getScale

getScene

getSceneDumpy

getSubscribe

  • getSubscribe(): Observable<string[]>

getTagAttributeObject3d

getThreeRenderer

Protected getTimeout

  • getTimeout(timeDelay?: number): Promise<void>

getUserData

  • getUserData(): {}

Protected getVisible

  • getVisible(def?: boolean): boolean

Protected initLocalComponent

  • initLocalComponent<T>(key: string, component: T): T

Protected isIdEuals

  • isIdEuals(id: string): boolean

ngAfterContentInit

  • ngAfterContentInit(): void

ngOnChanges

  • ngOnChanges(changes: SimpleChanges): void
  • A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated. default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.

    Parameters

    • changes: SimpleChanges

      The changed properties.

    Returns void

ngOnDestroy

  • ngOnDestroy(): void

ngOnInit

  • ngOnInit(): void
  • A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

    Returns void

removeObject3d

resetTween

  • resetTween(): void

runSubscribeNext

  • runSubscribeNext(key: string | string[]): void

setClear

  • setClear(): void

setLookat

Protected setObject

  • setObject(obj: any): void

Protected setObject3d

setParent

setParentObject3d

setPosition

setRenderer

setRotation

setSavelocalStorage

  • setSavelocalStorage(storageName: string): void

setScale

setScaleScalar

setSubscribeNext

  • setSubscribeNext(key: string | string[]): void

setSubscribeType

  • setSubscribeType(subscribeType: string): void

setTween

  • setTween(tweenData: {}): void

setTweenTarget

  • setTweenTarget(tweenTarget: any): void

setUserData

  • setUserData(key: string, value: any): void

setVisible

  • setVisible(visible: boolean, _?: boolean): void

showDebug

Protected subscribeListQuery

  • subscribeListQuery(queryList: QueryList<any>, subscribeKey: string, changeKey: string): void

Protected subscribeListQueryChange

  • subscribeListQueryChange(queryList: QueryList<any>, subscribeKey: string, changeKey: string): void

Protected subscribeRefer

  • subscribeRefer(key: string, subscription: Subscription): void

Protected subscribeReferList

  • subscribeReferList(key: string, subscription: Subscription): void

Protected unSubscribeRefer

  • unSubscribeRefer(key: string): void

Protected unSubscribeReferList

  • unSubscribeReferList(key: string): void

Protected unSubscription

  • unSubscription(subscriptions: Subscription[]): Subscription[]

update

updateInputParams

  • updateInputParams(params: {}, firstChange?: boolean, changes?: SimpleChanges, type?: string): void

Generated using TypeDoc