この機能は動作します:
var invertTextureOnCylinderGeometry = function(obj) {
var faceVertexes = obj.geometry.faceVertexUvs[0];
var faceVertexesLength = faceVertexes.length;
var divisionT = 1/(faceVertexesLength * 0.25);
faceVertexes.map(function(face, index) {
if (index < 0.5*faceVertexesLength) {
var thisIndexDivision = [
Math.floor(index/2) * divisionT,
Math.ceil((index+divisionT)/2) * divisionT
];
if (index % 2) {
face[0].set(1, thisIndexDivision[0]);
face[1].set(1, thisIndexDivision[1]);
face[2].set(0, thisIndexDivision[1]);
} else {
face[0].set(0, thisIndexDivision[0]);
face[1].set(1, thisIndexDivision[0]);
face[2].set(0, thisIndexDivision[1]);
}
}
});
obj.geometry.uvsNeedUpdate = true;
};
あなたは何を意味するのですか?あなたはもっと具体的になりますか? – Wilt
それは私たちが以下に示すものだった。ありがとう:) –
@JarosławOsmólskiこれはあなたが "方向を逆にする"という意味ですか? 'texture.wrapS = texture.wrapT = THREE.RepeatWrapping; texture.repeat.set( - 1,1); ' – WestLangley