Constructor
new LegoMockupVisualizer(domElement)
Sets up a Three.js scene to visualize the lego mock up.
Parameters:
Name | Type | Description |
---|---|---|
domElement | HTMLElement | HTML element that will be used as the container for the Three.js scene. |
- Source
Classes
Members
camera :PerspectiveCamera
Type:
- PerspectiveCamera
- Source
cameraCadastre :OrthographicCamera
Type:
- OrthographicCamera
- Source
domElement :HTMLDivElement
Type:
- HTMLDivElement
- Source
mockUpLego :Group.<Object3DEventMap>
Type:
- Group.<Object3DEventMap>
- Source
otbitControls :OrbitControls
Type:
- OrbitControls
- Source
scene :Scene
Type:
- Scene
- Source
sceneCadastre :Scene
Type:
- Scene
- Source
Methods
addLegoPlateSimulation(heightMap)
Adds Lego blocks to threejs scene based on a given heightmap.
Parameters:
Name | Type | Description |
---|---|---|
heightMap | Array.<Array.<number>> | 2D array representing the height values of the terrain. |
- Source
createTHREEScene()
Creates a three.js scene with a camera, renderer, lights, and orbit controls.
- Source
dispose()
Clears the inner HTML of a DOM element and disposes of an orbit object.
- Source
generateCadastre(heightMap)
Generate cadastre image from lego mockup
Parameters:
Name | Type | Description |
---|---|---|
heightMap | Array.<Array.<number>> | 2D array representing the height values of the terrain. |
- Source