Constructor
new Legonizer(view, optionsopt)
Init properties and sets up the DOM elements and scene for a planar view.
Name | Type | Attributes | Description |
---|---|---|---|
view | PlanarView | Represents the 3D view or scene. Objects will be displayed and manipulated. | |
options | Object | <optional> | Optionals parameter. Represents the user interface element. If no |
- Source
Classes
Members
boxSelector :Mesh.<BoxGeometry, MeshLambertMaterial, Object3DEventMap>
- Mesh.<BoxGeometry, MeshLambertMaterial, Object3DEventMap>
- Source
buttonSelectionAreaElement :HTMLButtonElement
- HTMLButtonElement
- Source
countLegoVec2Input :Vector2Input
- Vector2Input
- Source
domElement :HTMLElement
- HTMLElement
- Source
domMockUpVisualizer :HTMLElement
- HTMLElement
- Source
legoMockupVisualizer :LegoMockupVisualizer
- Source
legoPrevisualisation :Mesh.<BoxGeometry, MeshLambertMaterial, Object3DEventMap>
- Mesh.<BoxGeometry, MeshLambertMaterial, Object3DEventMap>
- Source
parentDomElement :HTMLElement
- HTMLElement
- Source
positionVec3Input :Vector3Input
- Vector3Input
- Source
ratio :number
- number
- Source
ratioParameterLabelInput :Object
- Object
- Source
rotationVec3Input :Vector3Input
- Vector3Input
- Source
scaleVec3Input :Vector3Input
- Vector3Input
- Source
transformCtrls :TransformControls
- TransformControls
- Source
view :PlanarView
- PlanarView
- Source
Methods
createBoxSelector() → {Mesh}
Creates a box selector mesh to be used for selecting tiles.
- Source
The box selector mesh.
- Type:
- Mesh
createCoordinatesDomEl() → {HTMLDivElement}
Creates the DOMElement related to the coordinates.
- Source
DOM element that contains a set of input fields for position, rotation, and scale, as well as a button for selecting an area.
- Type:
- HTMLDivElement
createLegoPrevisualisation() → {Mesh}
Creates a Lego previsualization mesh to be used for visualizing the selected area.
- Source
The Lego previsualization mesh.
- Type:
- Mesh
createScaleDomEl() → {HTMLDivElement}
Creates the DOMElement related to the scale.
- Source
DOM element of Scale Section. Children:
- ratio: This input number controls the accuracy of the heightmap.
- countLego: This vec2Input parameter specifies the number of plates to be used in the mockup.
- Type:
- HTMLDivElement
generateMockup()
Generates a mockup of the selected area using the specified number of Lego plates.
- Source
initDomElement() → {HTMLDivElement}
Creates, set domElement
and returns a DOM element.
- Source
legonizerDomElement
the newly <div>
element.
- Type:
- HTMLDivElement
initScene()
Init the scene by creating a box selector, a Lego previsualization, and adding transform controls to the scene.
- Source
selectArea()
Toggle the selection area for a Lego model. When is enabled, you can drag the mouse to define a rectangular area in the 3D view.
- Source