Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NgxViewerComponent

The Viewer component.

See the ngx3js docs page for details.

<ngx3js-viewer
[type]="'canvas'"
[canvasOptions]="canvasOptions"
[x]="viewPort.x" [y]="viewPort.y"
[width]="viewPort.width" [height]="viewPort.height"
></ngx3js-viewer>
<ngx3js-viewer
[type]="'canvas'"
[canvasOptions]="canvasOptions"
></ngx3js-viewer>
<ngx3js-viewer
[type]="'shadowmapviewer'"
[x]="10" [y]="-10"
[width]="'25%'" [height]="'25%'"
[light]="spotLight" [enabled]="controls.hudEnable"
></ngx3js-viewer>
<ngx3js-viewer
[type]="'shadowmapviewer'"
[x]="-10" [y]="-10" [width]="'15%'"
[height]="'width'" [light]="spotLight"
></ngx3js-viewer>
<ngx3js-viewer
[type]="'shadowmesh'"
[mesh]="cube"
[light]="sunLight" [plane]="plane"
></ngx3js-viewer>

Hierarchy

Implements

  • OnInit

Index

Constructors

constructor

Properties

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

blendWindow

blendWindow: number = 200

The blendWindow of viewer component

blurEdges

blurEdges: boolean = true

The blurEdges of viewer component

canvasOptions

canvasOptions: any = null

The canvasOptions of viewer component

debug

debug: boolean = false

Debug this Object

debugLightmap

debugLightmap: boolean = false

The debugLightmap of viewer component

enabled

enabled: boolean = true

Enabled or Not

height

height: string | number = '100%'

The size of height

  • type number fixed size
  • type string with include % relative size from renderer size for example in case renderer = 1024 '100%' = 1024, '50%' = 512, '50%-10' = 502, '50%+30' = 542

Protected id

id: string = ''

The Id of abstract subscribe component

light

The Light of Viewer

lightMapRes

lightMapRes: number = 1024

The lightMapRes of ProgressiveLightMap

mesh

The Mesh of Viewer

onDestory

onDestory: EventEmitter<NgxViewerComponent> = ...

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

onLoad

onLoad: EventEmitter<NgxViewerComponent> = ...

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

plane

The Plane of Viewer

Protected selfAny

selfAny: any = ...

Protected subscribeType

subscribeType: string = null

Subscribe type of abstract subscribe component

tween

tween: {} = null

Tween animation params

Type declaration

  • [key: string]: any

type

type: string = 'shadowmap'

The type of viewer

Three Type Value String(case insensitive)
ViewerCanvas canvas
ShadowMapViewer shadowmapviewer, shadowmap
ShadowMesh shadowmesh, shadow
ProgressiveLightMap progressivelightmap, progressivelight

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.

width

width: string | number = '100%'

The size of width

  • type number fixed size
  • type string with include % relative size from renderer size for example in case renderer = 1024 '100%' = 1024, '50%' = 512, '50%-10' = 502, '50%+30' = 542

windowExport

windowExport: string = null

Export this Object to window global variables

x

x: string | number = 0

The x of position

y

y: string | number = 0

The y of position

Accessors

needUpdate

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

    Parameters

    • value: boolean

    Returns void

Methods

addChanges

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

Protected applyChanges

  • applyChanges(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

getCamera

Protected getChanges

  • getChanges(): string[]

getId

  • getId(): string

getObject

  • getObject<T>(): T

getRenderer

getScene

getSubscribe

  • getSubscribe(): Observable<string[]>

Protected getTimeout

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

getUserData

  • getUserData(): {}

getViewer

  • getViewer(): any

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

render

resetTween

  • resetTween(): void

resizeViewer

  • resizeViewer(): void

runSubscribeNext

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

Protected setObject

  • setObject(obj: any): void

setParent

  • setParent(parent: any): boolean

setRenderer

setRendererSize

  • setRendererSize(width: number, height: number, pixelRatio: number): void

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

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