I have a question regarding texture3D. I am new to the 3D world. I was looking at volume rendering and came across this example three.js/webgl2_materials_texture3d.html at d39d82999f0ac5cdd1b4eb9f4aba3f9626f32ab6 · mrdoob/three.js · GitHub
My question is about these three lines.
// line 119 - 122
// THREE.Mesh
const geometry = new THREE.BoxGeometry( volume.xLength, volume.yLength, volume.zLength );
geometry.translate( volume.xLength / 2 - 0.5, volume.yLength / 2 - 0.5, volume.zLength / 2 - 0.5 );
const mesh = new THREE.Mesh( geometry, material );
Why we need geometry.translate
?
Suppose I change this example to use THREE.MeshBasicMaterial without the volume rendering just a static color, then I don’t need any translation.
Can someone please explain why the geometry.translate
?