API ReferenceGlobalsRoomleMaterialViewer

# Class: RoomleMaterialViewer

# Hierarchy

  • RoomleMaterialViewer

# Implements

# Index

# Constructors

# Properties

# Accessors

# Methods

# Constructors

# constructor

+ new RoomleMaterialViewer(creator: string): RoomleMaterialViewer

Defined in packages/material-viewer/src/roomle-material-viewer.ts:45

Parameters:

Name Type
creator string

Returns: RoomleMaterialViewer

# Properties

# creator

creator: string

_Implementation of Context.creator_

Defined in packages/material-viewer/src/roomle-material-viewer.ts:22

# Accessors

# callbacks

get callbacks(): RoomleMaterialViewerUiCallback

Defined in packages/material-viewer/src/roomle-material-viewer.ts:102

Returns: RoomleMaterialViewerUiCallback

set callbacks(callback: RoomleMaterialViewerUiCallback): void

Defined in packages/material-viewer/src/roomle-material-viewer.ts:106

Parameters:

Name Type
callback RoomleMaterialViewerUiCallback

Returns: void

# Methods

# addTexture

addTexture(rapiTexture: RapiTexture, base64Image?: string): Promise‹void›

Defined in packages/material-viewer/src/roomle-material-viewer.ts:227

Set a texture on the demo material, if no base64Image is set, the image field of rapiTexture is used

Parameters:

Name Type Description
rapiTexture RapiTexture -
base64Image? string for example "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPj/HwADBwIAMCbHYQAAAABJRU5ErkJggg=="

Returns: Promise‹void›


# changeFloorMaterialById

changeFloorMaterialById(materialId: string): Promise‹void›

Defined in packages/material-viewer/src/roomle-material-viewer.ts:203

Sets the material of the floor to the given material id. If the current environment is not floor environment it will be changed

Example material ids are: roomle_floor:DresdenEiche roomle_floor:Ibiza roomle_floor:Palma roomle_floor:Elba roomle_floor:Manacor roomle_floor:KernEiche roomle_floor:KieferScandic roomle_floor:EicheHabsburg roomle_floor:FuldaKiefer roomle_floor:Ashton roomle_floor:EicheLondon

Parameters:

Name Type
materialId string

Returns: Promise‹void›

promise that resolves when material has been changed


# enableHD

enableHD(): Promise‹void›

Defined in packages/material-viewer/src/roomle-material-viewer.ts:87

Returns: Promise‹void›


# getCameraOffset

getCameraOffset(): CanvasOffset

Implementation of GlobalAPI

Defined in packages/material-viewer/src/roomle-material-viewer.ts:55

Returns: CanvasOffset


# getMaterialShading

getMaterialShading(): RapiMaterialShading

Defined in packages/material-viewer/src/roomle-material-viewer.ts:128

Returns: RapiMaterialShading


# getScene

getScene(): Scene

Implementation of GlobalAPI

Defined in packages/material-viewer/src/roomle-material-viewer.ts:244

Returns: Scene


# init

init(element: HTMLElement): Promise‹void›

Defined in packages/material-viewer/src/roomle-material-viewer.ts:59

Parameters:

Name Type
element HTMLElement

Returns: Promise‹void›


# loadMaterial

loadMaterial(material: RapiMaterial, options: object): Promise‹void›

Defined in packages/material-viewer/src/roomle-material-viewer.ts:114

Parameters:

material: RapiMaterial

Default value options: object= {}

Name Type
flushCache? boolean

Returns: Promise‹void›


# loadMaterialId

loadMaterialId(materialId: RapiId, options: object): Promise‹void›

Defined in packages/material-viewer/src/roomle-material-viewer.ts:121

Parameters:

materialId: RapiId

Default value options: object= {}

Name Type
flushCache? boolean

Returns: Promise‹void›


# loadMaterialShading

loadMaterialShading(materialShading: RapiMaterialShading): Promise‹void›

Defined in packages/material-viewer/src/roomle-material-viewer.ts:110

Parameters:

Name Type
materialShading RapiMaterialShading

Returns: Promise‹void›


# loadQualitySetting

loadQualitySetting(qualitySetting: QualitySetting): void

Defined in packages/material-viewer/src/roomle-material-viewer.ts:145

Loads a QualitySetting object (see QualitySetting).

Parameters:

Name Type Description
qualitySetting QualitySetting

Returns: void


# loadSceneSetting

loadSceneSetting(sceneSettings: SceneSettings): Promise‹void›

Defined in packages/material-viewer/src/roomle-material-viewer.ts:137

Loads a SceneSettings object, currently it can can contain a light setting definition (see loadDynamicLightSetting) and an environment definition (see EnvironmentSetting).

Parameters:

Name Type Description
sceneSettings SceneSettings

Returns: Promise‹void›


# pauseTest

pauseTest(): void

Defined in packages/material-viewer/src/roomle-material-viewer.ts:175

Returns: void


# removeTexture

removeTexture(rapiTexture: RapiTexture): void

Defined in packages/material-viewer/src/roomle-material-viewer.ts:235

Remove texture from the demo material

Parameters:

Name Type Description
rapiTexture RapiTexture

Returns: void


# resumeTest

resumeTest(element: HTMLElement): void

Defined in packages/material-viewer/src/roomle-material-viewer.ts:170

Parameters:

Name Type
element HTMLElement

Returns: void


# setCameraOffset

setCameraOffset(offset: CanvasOffset): void

Implementation of GlobalAPI

Defined in packages/material-viewer/src/roomle-material-viewer.ts:51

Parameters:

Name Type
offset CanvasOffset

Returns: void


# setGeometry

setGeometry(type: GEOMETRY): void

Defined in packages/material-viewer/src/roomle-material-viewer.ts:218

Set the geometry of the demo material mesh

Possible parameter: 'cube', 'sphere', 'plane_vertical', 'plane_horizontal'

Parameters:

Name Type Description
type GEOMETRY

Returns: void


# setOverrides

setOverrides(initData: InitDataDefinition): void

Defined in packages/material-viewer/src/roomle-material-viewer.ts:149

Parameters:

Name Type
initData InitDataDefinition

Returns: void


# showGUI

showGUI(): void

Defined in packages/material-viewer/src/roomle-material-viewer.ts:179

Returns: void


# updateScene

updateScene(): void

Implementation of GlobalAPI

Defined in packages/material-viewer/src/roomle-material-viewer.ts:248

Returns: void


# updateSize

updateSize(): void

Implementation of GlobalAPI

Defined in packages/material-viewer/src/roomle-material-viewer.ts:156

Returns: void