Graphics 如何在three.js中获取柱面映射?

Graphics 如何在three.js中获取柱面映射?,graphics,three.js,mapping,textures,mesh,Graphics,Three.js,Mapping,Textures,Mesh,我必须在某个对象(非基本对象)上对图像进行柱面映射,如果我使用类似 var texture = loader.load('image.jpg'); texture.encoding = THREE.sRGBEncoding; texture.flipY = false; // In gltf loader mesh.material.map = texture; 我正在获取图像的UV贴图,但我需要在对象/网格上对图像进行圆柱形贴图 我认为可以通过将U和V改为 U = Math.atan2(x

我必须在某个对象(非基本对象)上对图像进行柱面映射,如果我使用类似

var texture = loader.load('image.jpg');
texture.encoding = THREE.sRGBEncoding;
texture.flipY = false;

// In gltf loader
mesh.material.map = texture;
我正在获取图像的UV贴图,但我需要在对象/网格上对图像进行圆柱形贴图

我认为可以通过将U和V改为

U = Math.atan2(x, z) / Math.PI * 0.5 + 0.5
V = y
但是我该怎么做呢


还有其他方法吗?

不是three.js的答案,而是相关的: