It seems to me the easiest way to create your own cube with 1 units of measure (1x1x1). Then set the dimensions by scaling it:
mesh.scale.x = width;
mesh.scale.y = height;
mesh.scale.z = depth;
Not sure if grid supports scale, if not, you can wrap it in Object3D
var obj = new THREE.Object3D();
obj.add(mesh);
obj.scale.x = width;
obj.scale.y = height;
obj.scale.z = depth;
Nothing prevents you from directly changing vertices. I think you need to specify geometry.dynamic=true;, and then geometry.verticesNeedUpdate=true;in this case.
source
share