new Coordinates(config, theme)
Coordinates helper, it creates the axes, ground and grids
shown in the world
Parameters:
Name | Type | Description |
---|---|---|
config |
Object | |
theme |
Object |
- Source:
Members
-
axes :Object
-
Axes object, the mesh representing the axes is under this object under `mesh`
Type:
- Object
- Source:
-
gridX :Object
-
GridXZ object, the mesh representing the axes is under this object under `mesh`
Type:
- Object
- Source:
-
gridY :Object
-
GridYZ object, the mesh representing the axes is under this object under `mesh`
Type:
- Object
- Source:
-
gridZ :Object
-
GridXY object, the mesh representing the axes is under this object under `mesh`
Type:
- Object
- Source:
-
ground :Object
-
Ground object, the mesh representing the axes is under this object under `mesh`
Type:
- Object
- Source:
-
mesh :THREE.Object3D
-
Group where all the objects (axes, ground, grids) are put
Type:
- THREE.Object3D
- Source:
Methods
-
drawAllAxes(params) → {THREE.Object3D}
-
Creates an Object3D which contains all axes
Parameters:
Name Type Description params
Object Properties
Name Type Description axisRadius=0.04
object cylinder radius axisLength=11
object cylinder length axisTess=46
object cylinder tesselation - Source:
Returns:
- Type
- THREE.Object3D
-
drawAxes(params) → {THREE.Mesh}
-
Draws an axis
Parameters:
Name Type Description params
object Properties
Name Type Description axisRadius=0.04
object axisLength=11
object axisTess=46
object axisOrientation=x
object - Source:
Returns:
- Type
- THREE.Mesh
-
drawGrid(params) → {THREE.Mesh}
-
Draws a grid
Parameters:
Name Type Description params
object Properties
Name Type Description size=100
object scale=0.1
object color=#505050
object orientation=0.1
object - Source:
Returns:
- Type
- THREE.Mesh
-
drawGround(params) → {THREE.Mesh}
-
Draws the ground
Parameters:
Name Type Description params
object Properties
Name Type Description size=100
object scale=0x000000
object offset=-0.2
object - Source:
Returns:
- Type
- THREE.Mesh
-
init(options) → {this}
-
Adds the axes, ground, grid meshes to `this.mesh`
Parameters:
Name Type Description options
object - Source:
Returns:
- Type
- this
-
initDatGui(gui) → {this}
-
Creates a dat.gui folder which has controls for the ground, axes and grids
Parameters:
Name Type Description gui
dat.gui - Source:
Returns:
- Type
- this