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:49

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:23

# Accessors

# callbacks

get callbacks(): RoomleMaterialViewerUiCallback

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

Returns: RoomleMaterialViewerUiCallback

set callbacks(callback: RoomleMaterialViewerUiCallback): void

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

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:231

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:207

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:91

Returns: Promise‹void›


# getCameraOffset

getCameraOffset(): CanvasOffset

Implementation of GlobalAPI

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

Returns: CanvasOffset


# getMaterialShading

getMaterialShading(): RapiMaterialShading

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

Returns: RapiMaterialShading


# getScene

getScene(): Scene

Implementation of GlobalAPI

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

Returns: Scene


# getUnitFormatter

getUnitFormatter(): UnitFormatter

Implementation of GlobalAPI

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

returns unit formatter for formatting input und output values in scene

Returns: UnitFormatter


# init

init(element: HTMLElement): Promise‹void›

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

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:118

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:125

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:114

Parameters:

Name Type
materialShading RapiMaterialShading

Returns: Promise‹void›


# loadQualitySetting

loadQualitySetting(qualitySetting: QualitySetting): void

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

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:141

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:179

Returns: void


# removeTexture

removeTexture(rapiTexture: RapiTexture): void

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

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:174

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:55

Parameters:

Name Type
offset CanvasOffset

Returns: void


# setGeometry

setGeometry(type: GEOMETRY): void

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

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:153

Parameters:

Name Type
initData InitDataDefinition

Returns: void


# showGUI

showGUI(): void

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

Returns: void


# updateScene

updateScene(): void

Implementation of GlobalAPI

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

Returns: void


# updateSize

updateSize(): void

Implementation of GlobalAPI

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

Returns: void