更新时间:2023-12-04 14:49:28
THREE.js 中发生了变化,但调整 BendModifier.js 脚本非常容易.换行
There was a change in THREE.js but it is quite easy to adjust the BendModifier.js script. Just change the lines
var InverseP = new THREE.Matrix3().getInverse(P);
和
newVertices[i] = new THREE.Vector3();newVertices[i].copy(geometry.vertices[i]).applyMatrix3(InverseP);
在这两种情况下都转到 Matrix4 - 所以他们会读到:
to Matrix4 in both cases - so they will read:
var InverseP = new THREE.Matrix4().getInverse(P);
和
newVertices[i] = new THREE.Vector3();newVertices[i].copy(geometry.vertices[i]).applyMatrix4(InverseP);
刚刚用three.min.81.js试了一下,效果很好.
Just tried it with three.min.81.js and it works fine.