RoomleGlbViewer.default

glb-viewer-core/src/roomle-glb-viewer.default

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new default(creator)

Parameters

Name
Type

creator

string

Properties

_creator_

_creator_: string

Implementation of

Context.creator

Accessors

callbacks

get callbacks(): Object

Returns

Object

Implementation of

ExternalEmbeddable.callbacks

Methods

clearScene

clearScene(): void

Remove the current glb from the scene if it exists

Returns

void


exportCanvasScreenshot

exportCanvasScreenshot(quality?): Promise<string>

Parameters

Name
Type

quality?

number

Returns

Promise<string>


getCameraOffset

getCameraOffset(): CanvasOffset

Gets the available screen space for our item default: 'left: 0, top: 1, right: 1, bottom: 0'

Returns

CanvasOffset

Implementation of

GlobalAPI.getCameraOffset


getCurrentId

getCurrentId(): string

Returns the current item id or url of the loaded object

Returns

string


getScene

getScene(): Scene

Returns the three.js scene (https://threejs.org/docs/#api/en/scenes/Scene) WARNING: This is the actual scene (reference) and not a copy!

Returns

Scene

Implementation of

GlobalAPI.getScene


getStorage

getStorage(): default

returns manager class to interface with indexedDB storage

Returns

default

Implementation of

GlobalAPI.getStorage


getUnitFormatter

getUnitFormatter(): default

returns unit formatter for formatting input und output values in scene

Returns

default

Implementation of

GlobalAPI.getUnitFormatter


init

init(element, initData?): Promise<void>

Parameters

Name
Type

element

HTMLElement

initData?

Returns

Promise<void>


loadGLB

loadGLB(url, scaling?, callback?): Promise<void>

Loads the GLB from the given URL Param

Parameters

Name
Type
Default value
Description

url

string

undefined

scaling

number

1

defaults to 1

callback?

(percent: number) => void

undefined

loading percent between 0 and 1

Returns

Promise<void>


loadSceneSetting

loadSceneSetting(sceneSettings): Promise<void>

Loads a SceneSettings object, currently it can can contain a light setting definition (see @roomle/web-sdk/configurator-core/src/roomle-configurator#RoomleConfigurator.loadDynamicLightSetting) and an environment definition (see @roomle/web-sdk/configurator-core/src/environment/dynamic-environment-setting-loaderEnvironmentSetting).

Parameters

Name
Type

sceneSettings