I display with the help of three.js 3d object from 3DSMax. I put the texture on the 3D object. This texture stretches across the entire surface of the 3d object. How to make so that the texture does not stretch, and was of a certain size, which I myself will indicate? Those. if the img.jpg texture file has a size of 250x250 pixels, then on the object this texture will occupy only 250x250 pixels, and not stretched to the entire surface of the object.
Here is the code:
loader = new THREE.OBJLoader(); loader.load('3d/women.obj', function (geometry) { if (mesh) scene.remove(mesh); var material = new THREE.MeshPhongMaterial({ color: 0xffffff }); var texture = THREE.ImageUtils.loadTexture("3d/texture.png"); material.map = texture; geometry.children[0].material = material; mesh = geometry; geometry.scale.set(15, 15, 15); geometry.position.y = -150; scene.add(geometry); }); But it stretches the texture.png image over the entire surface of the 3d object women.obj, and I need it not to stretch.



