hello, everyone, I’m trying to create a way to show the uv maps, I have planned to create a 3d object using the coordinates of the map, the problem is that I saw that the uv coordinates are strange and I can not decipher how to turn them into a 3d object.
var geometry = new THREE.BufferGeometry();
var material = new THREE.MeshBasicMaterial( { color: 0xff0000} );
for (var i = 0; i < object.children.length; i++) {
var element = object.children[i]
console.log(element)
var vertices = new Float32Array(element.geometry.attributes.uv.array)
geometry.addAttribute( 'position', new THREE.BufferAttribute( vertices, 3 ) );
}
return new THREE.Mesh( geometry, material );
// the uv coordinates
array:Float32Array(18744)
[
- 0:0.7950400114059448
- 1:0.48372000455856323
- 2:0.7970499992370605
]