mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-24 17:33:27 +01:00
adding XYZ axises
This commit is contained in:
parent
74d81aa8ac
commit
0b684d389f
1 changed files with 11 additions and 0 deletions
|
|
@ -87,6 +87,17 @@ TCAD.Viewer = function(bus) {
|
|||
}
|
||||
}
|
||||
|
||||
function addAxis(axis, color) {
|
||||
var lineMaterial = new THREE.LineBasicMaterial({color: color, linewidth: 1});
|
||||
var axisGeom = new THREE.Geometry();
|
||||
axisGeom.vertices.push(axis.multiply(-1000));
|
||||
axisGeom.vertices.push(axis.multiply(1000));
|
||||
scene.add(new THREE.Segment(axisGeom, lineMaterial));
|
||||
}
|
||||
addAxis(TCAD.math.AXIS.X, 0xFF0000);
|
||||
addAxis(TCAD.math.AXIS.Y, 0x00FF00);
|
||||
addAxis(TCAD.math.AXIS.Z, 0x0000FF);
|
||||
|
||||
function updateControlsAndHelpers() {
|
||||
trackballControls.update();
|
||||
updateTransformControls();
|
||||
|
|
|
|||
Loading…
Reference in a new issue