Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Viewer

Viewer class

param

dom id or element

Hierarchy

  • Viewer

Index

Constructors

constructor

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

Properties

Private _catanaRendering

_catanaRendering: CatanaRendering

Private _catanaSelection

_catanaSelection: CatanaSelection

Private _gridHelper

_gridHelper: InfiniteGridHelper

Private _originMarker

_originMarker: AxesHelper

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

catanaAxesHelper

catanaAxesHelper: CatanaAxesHelper

Private compositeCamera

compositeCamera: OrthographicCamera

Private compositeMaterial

compositeMaterial: ShaderMaterial

Private compositeScene

compositeScene: Scene

Private compositeUniforms

compositeUniforms: { scale: Uniform; tForeground: Uniform }

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 nonpickingGroup

nonpickingGroup: 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

Accessors

cameraDistance

  • get cameraDistance(): number
  • set cameraDistance(d: number): void

cameraTransformed

  • get cameraTransformed(): PerspectiveCamera | OrthographicCamera

catanaRendering

gridHelperVisible

  • get gridHelperVisible(): boolean
  • set gridHelperVisible(isVisible: boolean): void

originMarkerVisible

  • get originMarkerVisible(): boolean
  • set originMarkerVisible(isVisible: boolean): void

Methods

Private __render

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

Private __renderModelGroup

  • __renderModelGroup(camera: PerspectiveCamera | OrthographicCamera, cameraTransformed?: PerspectiveCamera | OrthographicCamera, renderTarget?: WebGLRenderTarget | null, superSampleIndex?: number): void
  • Parameters

    • camera: PerspectiveCamera | OrthographicCamera
    • Optional cameraTransformed: PerspectiveCamera | OrthographicCamera
    • Optional renderTarget: WebGLRenderTarget | null
    • Default value superSampleIndex: number = -1

    Returns void

Private __renderPickingGroup

  • __renderPickingGroup(camera: PerspectiveCamera | OrthographicCamera): void

Private __renderStereo

  • __renderStereo(picking?: boolean): void

Private __renderSuperSample

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

Private __setVisibility

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

Private __updateCamera

  • __updateCamera(): void

Private __updateClipping

  • __updateClipping(): void
  • Intepret clipMode, clipScale and set the camera and fog clipping. Also ensures bRadius and cDist are valid

    Returns 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

absoluteToRelative

  • absoluteToRelative(d: number): number
  • Convert an absolute clip value to a relative one using bRadius.

    0.0 -> 50.0 bRadius -> 0.0

    Parameters

    • d: number

    Returns number

add

addBuffer

addDebugObjects

  • addDebugObjects(...obj: Object3D[]): void

animate

  • animate(): void

clear

  • clear(): void

dispose

  • dispose(): void

Private getCameraTransformed

  • getCameraTransformed(camera?: PerspectiveCamera | OrthographicCamera): PerspectiveCamera | OrthographicCamera

getImage

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

getPickingPixels

  • getPickingPixels(): Uint8Array | Float32Array

handleResize

  • handleResize(): void

hasSelection

  • hasSelection(): boolean

makeImage

pick

  • pick(x: number, y: number): { instance: any; oid: number; picker: any; pid: number }
  • Parameters

    • x: number
    • y: number

    Returns { instance: any; oid: number; picker: any; pid: number }

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

relativeToAbsolute

  • relativeToAbsolute(d: number): number
  • Convert a relative clip value to an absolute one using bRadius

    0.0 -> bRadius 50.0 -> 0.0

    Parameters

    • d: number

    Returns number

remove

  • remove(buffer: Buffer): void

removeDebugObjects

  • removeDebugObjects(...obj: Object3D[]): void

render

  • render(picking?: boolean): void

requestRender

  • requestRender(): void

selectFiltered

selectFilteredCol

setBackground

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

setCamera

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

setClip

  • setClip(near?: undefined | number, far?: undefined | number, dist?: undefined | number, clipMode?: undefined | string, clipScale?: undefined | string): void
  • Parameters

    • Optional near: undefined | number
    • Optional far: undefined | number
    • Optional dist: undefined | number
    • Optional clipMode: undefined | string
    • Optional clipScale: undefined | string

    Returns void

setCursor

  • setCursor(cursor: null | "pointer" | "grab" | "grabbing" | "crosshair"): 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

smartSelect

unselect

  • unselect(): void

updateBoundingBox

  • updateBoundingBox(): void

updateHelper

  • updateHelper(): void

updateInfo

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

updateZoom

  • updateZoom(): void

Static prepareBuffer

  • prepareBuffer(buffer: Buffer, instance?: BufferInstance): { mesh: any; pickingMesh?: any; wireframeMesh: any }

Static setUserData

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