Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Properties

container?: HTMLElement
handleDragEnd?: (() => void)

Type declaration

    • (): void
    • Returns void

onHotpointClicked?: ((hotpoint: Hotpoint) => void)

Type declaration

viewpointAssetsMap: Map<string, ViewpointAssets> = ...

Methods

  • activatePanoramaById(viewpointId: string, panoramaId: string, setCameraToInitialDirection?: boolean, animate?: boolean, onSuccess?: ((viewpoint: VRViewpoint) => void), onError?: ((event: ErrorEvent) => void)): void
  • Activates a panorama by viewpointId and panoramaId

    Parameters

    • viewpointId: string
    • panoramaId: string
    • setCameraToInitialDirection: boolean = true
    • Optional animate: boolean
    • Optional onSuccess: ((viewpoint: VRViewpoint) => void)
    • Optional onError: ((event: ErrorEvent) => void)
        • (event: ErrorEvent): void
        • Parameters

          • event: ErrorEvent

          Returns void

    Returns void

  • activeViewpointById(viewpointId: string, animate?: boolean, onSuccess?: ((viewpoint: VRViewpoint) => void), onError?: ((event: ErrorEvent) => void)): void
  • deprecated

    use activatePanoramaById() instead

    Parameters

    • viewpointId: string
    • Optional animate: boolean
    • Optional onSuccess: ((viewpoint: VRViewpoint) => void)
    • Optional onError: ((event: ErrorEvent) => void)
        • (event: ErrorEvent): void
        • Parameters

          • event: ErrorEvent

          Returns void

    Returns void

  • addHotpoints(hotpoints: Hotpoint[]): void
  • Adds hotpoint to active viewpoint

    Parameters

    Returns void

  • description

    Add model data to viewer.

    Parameters

    Returns void

  • addPanorama(viewpointId: string, panorama: Panorama): void
  • Adds a panorama to a viewpoint

    Parameters

    Returns void

  • addPlugin(plugin: Plugin<{}>): void
  • Installs a Plugin.

    Parameters

    Returns void

  • clearAllCachedPanoramas(): void
  • Returns void

  • clearPlugins(): void
  • Clears all plugins. A plugin is not created by viewer, thus, won't be destroyed by viewer.

    Returns void

  • deactivateMeasurement(): void
  • destroy(): void
  • enableAutoRotate(enable: boolean): void
  • Enables/Disables orbit controls to automatically rotate.

    Parameters

    • enable: boolean

    Returns void

  • findPanorama(viewpointId: string, panoramaId: string): undefined | Panorama
  • Checks if a panorama exists in a viewpoint

    Parameters

    • viewpointId: string
    • panoramaId: string

    Returns undefined | Panorama

  • findPlugin(id: string): undefined | Plugin<{}>
  • Finds a Plugin.

    Parameters

    • id: string

    Returns undefined | Plugin<{}>

  • flyTo(position: Vector3, lookAt: Vector3): void
  • Parameters

    • position: Vector3
    • lookAt: Vector3

    Returns void

  • getCameraFov(): undefined | number
  • Gets camera's fov value.

    Returns undefined | number

  • getCameraPositionAndDirection(): undefined | { direction: Vector3; position: Vector3 }
  • Gets camera position and direction.

    Returns undefined | { direction: Vector3; position: Vector3 }

  • getHitResult(event: MouseEvent): { location: null | Vector3 }
  • Gets mouse hit result

    Parameters

    • event: MouseEvent

    Returns { location: null | Vector3 }

  • lookToPosition(position: [number, number, number]): void
  • Makes camera look to specific position

    Parameters

    • position: [number, number, number]

      target position to look to

    Returns void

  • removeCachedPanoramas(excludePanoramas?: Record<string, string[]>): void
  • Parameters

    • excludePanoramas: Record<string, string[]> = {}

    Returns void

  • removeHotpoints(hotpointIds: string[]): void
  • Removes hotpoint of active viewpoint

    Parameters

    • hotpointIds: string[]

    Returns void

  • removePlugin(plugin: Plugin<{}>): void
  • Uninstalls a Plugin, clearing content from it first.

    Parameters

    Returns void

  • setAutoRotateSpeed(speed?: number): void
  • Sets orbit controls' rotate speed. It requires (3600 / speed / fps) seconds for a around When speed is 1, 60fps, it requires 60s; When speed is 2, 60fps, it requires 30s;

    Parameters

    • speed: number = 1

    Returns void

  • setCameraFov(fov?: number): void
  • Sets camera fov. Usually 45 - 90.

    Parameters

    • fov: number = 75

    Returns void

  • setCameraPositionAndDirection(position: number[] | Vector3, direction?: number[] | Vector3, animate?: boolean): void
  • Sets camera position and direction.

    Parameters

    • position: number[] | Vector3
    • Optional direction: number[] | Vector3
    • Optional animate: boolean

    Returns void

  • setHotpointsVisibility(visible: boolean, viewpointId?: string, hotpointIds?: string[]): void
  • Sets hotpoints visibility for one or all viewpoints

    Parameters

    • visible: boolean

      true or false

    • viewpointId: string = ""

      target viewpointId. Will apply to all if no viewpointId is specified

    • hotpointIds: string[] = []

      target hotpointIds. Will apply to all if no hotpointIds is specified

    Returns void

  • setMeasurementVisibility(id: string, visible: boolean): boolean
  • setMinAndMaxFov(minFov: number, maxFov: number): void
  • Parameters

    • minFov: number
    • maxFov: number

    Returns void

  • Sets a group of viewpoints

    Parameters

    Returns void

Generated using TypeDoc