How to convert uv coordinates to 3d object?


#1

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)
[

  1. 0:0.7950400114059448
  2. 1:0.48372000455856323
  3. 2:0.7970499992370605
    ]

#2

Not sure I understand the question correctly.

Very simple examples of how to assign uv coordinates:
http://threejs.hofk.de/BufferGeometry/02_buffer.html
http://threejs.hofk.de/BufferGeometry/01_buffer.html

(see also Collection of examples from discourse.threejs.org)