Run these two code results are the same, why?

下面的两段代码为什么运行结果一样
The same of result,why?
/*
geometry.vertices[0].uv = new THREE.Vector2(0,0);
geometry.vertices[1].uv = new THREE.Vector2(1,0);
geometry.vertices[2].uv = new THREE.Vector2(1,1);
geometry.vertices[3].uv = new THREE.Vector2(0,1);
*/
geometry.vertices[0].uv = new THREE.Vector2(0,0);
geometry.vertices[1].uv = new THREE.Vector2(0.5,0);
geometry.vertices[2].uv = new THREE.Vector2(0.5,0.5);
geometry.vertices[3].uv = new THREE.Vector2(0,0.5);
DEMO
DOWN

First of all, Hi!
Could you pay more attention to what the other people say to you?

Moreover, I can’t access your source code from work as most of exotic ports are blocked in my network. So try to use jsfiddle or codepen.

P.S. Looks like you’re the one and only specialist in Chinese on the forum so far.

Can you please change this to English. It will be really helpful for other to find this question if they too have the similar issue.

“下面的两段代码为什么运行结果一样” change to English is “Run these two code results are the same,why?”

sorry I can’t speak English

The Urls you provided doesn’t seems to be working.
image

up load on codepen.io, url is https://codepen.io/xmlhttp/project/full/DGJMed

@xmlhttp Please stop creating topics in Chinese. Use a translator tool if you can’t speak English. Otherwise your posts will be deleted.

1 Like

geometry.vertices doesn’t have UV property. So no matter what value you set. It will always show the same default result.

Use geometry.faceVertexUvs instead.

OK thank you