RoomleGlbViewer.default
Last updated
Last updated
.default
<>
• new default(creator
)
creator
string
• _creator_: string
• get
callbacks(): Object
Object
â–¸ clearScene(): void
Remove the current glb from the scene if it exists
void
â–¸ exportCanvasScreenshot(quality?
): Promise
<string
>
quality?
number
Promise
<string
>
Gets the available screen space for our item default: 'left: 0, top: 1, right: 1, bottom: 0'
â–¸ getCurrentId(): string
Returns the current item id or url of the loaded object
string
â–¸ 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!
Scene
returns manager class to interface with indexedDB storage
returns unit formatter for formatting input und output values in scene
â–¸ init(element
, initData?
): Promise
<void
>
element
HTMLElement
initData?
Promise
<void
>
â–¸ loadGLB(url
, scaling?
, callback?
): Promise
<void
>
Loads the GLB from the given URL Param
url
string
undefined
scaling
number
1
defaults to 1
callback?
(percent
: number
) => void
undefined
loading percent between 0 and 1
Promise
<void
>
â–¸ loadSceneSetting(sceneSettings
): Promise
<void
>
sceneSettings
Promise
<void
>
â–¸ loadStaticItem(staticItemId
, callback?
): Promise
<void
>
Loads the glb asset from the static item
staticItemId
string
callback?
(percent
: number
) => void
loading percent between 0 and 1
Promise
<void
>
â–¸ moveCamera(cameraParameter
): Promise
<void
>
cameraParameter
Promise
<void
>
â–¸ pauseTest(): void
void
â–¸ processRenderList(jsonString
, width?
, height?
): void
jsonString
string
undefined
width
number
320
height
number
320
void
â–¸ resumeTest(element
): void
element
HTMLElement
void
â–¸ setCameraOffset(offset
): void
Sets the available screen space for our item Example 1: right 0.9 means 10% padding on the right side Example 2: bottom 0.2 means 20% padding on the bottom side default: 'left: 0, top: 1, right: 1, bottom: 0'
offset
void
â–¸ setEnvironmentMap(params
): void
params
Object
params.intensity?
number
params.maxLightSources?
number
params.rotation?
number
params.url?
string
void
â–¸ setOverrides(initData
): void
initData
void
â–¸ showGUI(): void
void
â–¸ updateScene(): void
Updates the scene (recalculating bounds) and restart rendering
void
â–¸ updateSize(): void
void
.
.
â–¸ getCameraOffset():
.
.
â–¸ getStorage():
.
â–¸ getUnitFormatter():
.
Loads a SceneSettings object, currently it can can contain a light setting definition (see ) and an environment definition (see ).
â–¸ preparePerspectiveImage(): Promise
<>
Promise
<>
.
.
| Partial
< & >
.
.