Is there a way to map a texture to only part of an image instead of the entire image when working with terrain textures that are all of equal sizes in Three.js? I am aware of work-arounds, but wondering if there is a built-in method for achieving this.
var image = new Image();
image.onload = function () {
texture.needsUpdate = true;
};
image.src = path;
var texture = new THREE.Texture(image, new THREE.UVMapping(), THREE.ClampToEdgeWrapping, THREE.ClampToEdgeWrapping, THREE.NearestFilter, THREE.LinearMipMapLinearFilter);
return new THREE.MeshBasicMaterial({
map: texture
});