Search code examples
three.jsscale

How does scale change the object in three js?


After testing I realized that when I use object.scale.set to justify an object size the pixel detail doesn't change. for example if i set a model scale to object.scale.set(0.00001,0.00001,0.00001,) , then add the object to the scene and zoom close to the object then i am able to see the all the detail even if the object is smaller than a pixel.

My question is: 1)How does the scale method retains the detail of the model? I can only think that it divides the pixel to more pixels to retain the detail. 2)Now if this is what happening does it have any influence on the memory?


Solution

  • The model itself has no pixels, it's just a description of 3D location points and connections between them to define polygons. So scaling it down doesn't remove detail. 3D polygonal objects in THREE.js are a bit like 2D vector art in this regard. Large or small, they still have the same amount of polygonal detail in their definition. Zooming the camera or scaling the object(s) changes how many pixels are drawn, but not the underlying object definition.