我有一个three.js网格,可在其中绘制几何图形。现在,我想向图中添加轴,以毫米为单位显示几何尺寸。 有没有办法包含d3.js中制成的轴?
此网格包含一组THREE.BoxGeometry,它们与向量v1和v2一起定位。
这是我的现场代码
cellarray.forEach(function(d){
let v1 = new THREE.Vector3(x_bottom, y_bottom, z_bottom);
let v2 = new THREE.Vector3(x_top, y_top, z_top);
let colorNormal = new THREE.Color(colorScale(d.value));
material = new THREE.MeshLambertMaterial({
color: colorNormal.clone()
});
var mesh = new THREE.Mesh(geometry, material);
mesh.position.copy(v2);
mesh.lookAt( v1);
scene.add(mesh);
})