Official Viewer Documentation here:

Introduction | Speckle Docs

The below documentation belongs to an old API which is now obsolete

Creating and Initializing the Viewer

The viewer library exposes the Viewer type and you can instantiate it like below:

const viewer = new Viewer(container: HTMLElement, params: ViewerParams)

params : ViewerParams

interface ViewerParams {
  showStats: boolean
  environmentSrc: Asset | string
	verbose: boolean
}
export enum AssetType {
  TEXTURE_8BPP = 'png', // For now
  TEXTURE_HDR = 'hdr',
  TEXTURE_EXR = 'exr'
}

export interface Asset {
  src: string
  type: AssetType
}