Object responsible for handling 3D representations of indoor environments. This environments exists separately from
the rest of the scene.
Members
roomDescription :boolean
environment description
Type:
- boolean
roomMaterialDescription :object|null
wall and floor material description
Type:
- object | null
roomVisible :boolean
current environment visibility
Type:
- boolean
wallObjectModels :boolean
wall object models
Type:
- boolean
Methods
(async) addRoomToScene(newRoomDescription) → {Promise}
Instantiates the indoor environment according to the passed description. If a falsy value is passed the current
environment is removed from the scene.
Parameters:
Name | Type | Description |
---|---|---|
newRoomDescription |
object | null | environment |
Returns:
resolved when instantiated
- Type
- Promise
(async) applyFloorMaterial(materialId)
Apply a material to the floor for the current room.
Parameters:
Name | Type | Description |
---|---|---|
materialId |
string | the material id. |
fetchResources() → {Promise}
Prepares the necessary resources for wall and floor representation
Returns:
resolved when done
- Type
- Promise
(async) getFloorPerimeter() → {Promise.<Number>}
Get the floor perimeter in mm.
Returns:
Length in mm.
- Type
- Promise.<Number>
(async) getFloorSurface() → {Promise.<Number>}
Get the floor surface in mm².
Returns:
Area in mm².
- Type
- Promise.<Number>
init() → {RoomManager}
initializes the RoomManager and pre-loads his assets
Returns:
roomManager
- Type
- RoomManager
removeRoomFromScene() → {Promise}
Removes the indoor environment from the scene.
Returns:
resolved when done
- Type
- Promise
(async) setRoomVisible(newVisible) → {Promise}
Toggles indoor environment visibility.
Parameters:
Name | Type | Description |
---|---|---|
newVisible |
boolean |
Returns:
resolved when done
- Type
- Promise