How set the limitation of the scale change?

Dear all,

For the size change, there is no limitation by default. How do I set the limitation?


As the image above, when I touchmove the scale buttons, I can over size~~~~

If you are using TransformControls, they unfortunately don’t have option to limit size built-in.

What you can do is check the size limitations yourself before rendering a frame:

function onAnimationStep() {
  if (controls.object) {
    controls.object.scale.clampScalar(0, LIMIT_SIZE);

  renderer.render(scene, camera);

That is what I thought~~~Just want to make sure if you do have the option~