I will try to be more explicit as i did not find an answer lately
How the size(not scale) of (gltf.scene) can be expressed in dat.GUI? I get the actual measurements set from blender in meters. In three, i can manipulate the scale but that would mean that scale.x = 2 is 1.8 meters if the original 1 scale is equal to 0.9 meters for ex.
I am looking for a way to manipulate the size direclty .
Thank you
The size can just be taken to be the scale multiplied by the size, for scale=1.
You could use a bounding box when you don’t know or want to hardcode the initial size:
var boundingbox = new THREE.Box3().setFromObject(obj);
Furthermore you will need a custom Dat.gui property, something like:
var conf = { x: S.x * obj.scale.x, y: S.y *obj.scale.z, z: S.z *obj.scale.z) };
folder.add(conf, ‘x’).onChange(function (sv) {obj.scale.x = sv/S.x; });
…
Where S is your size for scale=1.
1 Like