Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Viewer

Viewer class

class
param

dom id or element

Hierarchy

  • Viewer

Index

Constructors

constructor

  • new Viewer(idOrElement: string | HTMLElement): Viewer

Properties

Private ambientLight

ambientLight: AmbientLight

Private bRadius

bRadius: number

Private backgroundGroup

backgroundGroup: Group

boundingBox

boundingBox: Box3 = new Box3()

Private boundingBoxLength

boundingBoxLength: number = 0

Private boundingBoxMesh

boundingBoxMesh: LineSegments

Private boundingBoxSize

boundingBoxSize: Vector3 = new Vector3()

Private cDist

cDist: number

camera

camera: PerspectiveCamera | OrthographicCamera

Private compositeCamera

compositeCamera: OrthographicCamera

Private compositeMaterial

compositeMaterial: ShaderMaterial

Private compositeScene

compositeScene: Scene

Private compositeUniforms

compositeUniforms: object

Type declaration

  • scale: Uniform
  • tForeground: Uniform

container

container: HTMLElement

Private distVector

distVector: Vector3 = new Vector3()

height

height: number

Private helperGroup

helperGroup: Group

Private holdTarget

holdTarget: WebGLRenderTarget

Private isStill

isStill: boolean

Private lastRenderedPicking

lastRenderedPicking: boolean

Private modelGroup

modelGroup: Group

Private orthographicCamera

orthographicCamera: OrthographicCamera

Private parameters

parameters: ViewerParameters

perspectiveCamera

perspectiveCamera: PerspectiveCamera

Private pickingGroup

pickingGroup: Group

Private pickingTarget

pickingTarget: WebGLRenderTarget

Private renderPending

renderPending: boolean

renderer

renderer: WebGLRenderer

Private rendering

rendering: boolean

rotationGroup

rotationGroup: Group

sampleLevel

sampleLevel: number

Private sampleTarget

sampleTarget: WebGLRenderTarget

scene

scene: Scene

signals

signals: ViewerSignals

Private spotLight

spotLight: SpotLight

stats

stats: Stats

Private stereoCamera

stereoCamera: StereoCamera

Private supportsHalfFloat

supportsHalfFloat: boolean

translationGroup

translationGroup: Group

width

width: number

wrapper

wrapper: HTMLElement

Methods

Private __render

  • __render(picking?: boolean, camera: PerspectiveCamera | OrthographicCamera): void
  • Parameters

    • Default value picking: boolean = false
    • camera: PerspectiveCamera | OrthographicCamera

    Returns void

Private __renderModelGroup

  • __renderModelGroup(camera: PerspectiveCamera | OrthographicCamera, renderTarget?: WebGLRenderTarget): void
  • Parameters

    • camera: PerspectiveCamera | OrthographicCamera
    • Optional renderTarget: WebGLRenderTarget

    Returns void

Private __renderPickingGroup

  • __renderPickingGroup(camera: PerspectiveCamera | OrthographicCamera): void

Private __renderStereo

  • __renderStereo(picking?: boolean): void

Private __renderSuperSample

  • __renderSuperSample(camera: PerspectiveCamera | OrthographicCamera): void

Private __setVisibility

  • __setVisibility(model: boolean, picking: boolean, background: boolean, helper: boolean): void
  • Parameters

    • model: boolean
    • picking: boolean
    • background: boolean
    • helper: boolean

    Returns void

Private __updateCamera

  • __updateCamera(): void

Private __updateClipping

  • __updateClipping(): void

Private __updateLights

  • __updateLights(): void

Private _initCamera

  • _initCamera(): void

Private _initHelper

  • _initHelper(): void

Private _initParams

  • _initParams(): void

Private _initRenderer

  • _initRenderer(): undefined | false

Private _initScene

  • _initScene(): void

Private _initStats

  • _initStats(): void

Private _updateBoundingBox

  • _updateBoundingBox(geometry?: BufferGeometry, matrix?: Matrix4, instanceMatrix?: Matrix4): void
  • Parameters

    • Optional geometry: BufferGeometry
    • Optional matrix: Matrix4
    • Optional instanceMatrix: Matrix4

    Returns void

add

addBuffer

animate

  • animate(): void

clear

  • clear(): void

dispose

  • dispose(): void

getImage

  • getImage(picking: boolean): Promise<Object>

getPickingPixels

  • getPickingPixels(): Uint8Array | Float32Array

handleResize

  • handleResize(): void

makeImage

pick

  • pick(x: number, y: number): object
  • Parameters

    • x: number
    • y: number

    Returns object

    • instance: any
    • picker: any
    • pid: number

remove

  • remove(buffer: Buffer): void

render

  • render(picking?: boolean): void

requestRender

  • requestRender(): void

setBackground

  • setBackground(color?: Color | number | string): void

setCamera

  • setCamera(type: CameraType, fov?: undefined | number, eyeSep?: undefined | number): void

setClip

  • setClip(near: number, far: number, dist: number): void

setFog

  • setFog(color?: Color | number | string, near?: undefined | number, far?: undefined | number): void
  • Parameters

    • Optional color: Color | number | string
    • Optional near: undefined | number
    • Optional far: undefined | number

    Returns void

setLight

  • setLight(color: Color | number | string, intensity: number, ambientColor: Color | number | string, ambientIntensity: number): void
  • Parameters

    • color: Color | number | string
    • intensity: number
    • ambientColor: Color | number | string
    • ambientIntensity: number

    Returns void

setSampling

  • setSampling(level: number): void

setSize

  • setSize(width: number, height: number): void

updateBoundingBox

  • updateBoundingBox(): void

updateHelper

  • updateHelper(): void

updateInfo

  • updateInfo(reset?: undefined | true | false): void

updateZoom

  • updateZoom(): void

Object literals

Private info

info: object

memory

memory: object

geometries

geometries: number = 0

programs

programs: number = 0

textures

textures: number = 0

render

render: object

calls

calls: number = 0

faces

faces: number = 0

points

points: number = 0

vertices

vertices: number = 0

Generated using TypeDoc