Bending text object in ThreeJS

后端 未结 1 1940
忘了有多久
忘了有多久 2021-01-25 07:10

There is this repo for this example, which is almost 2 years old, and therefore does not work with the recent releases of the threeJS.

I am having the following error a

相关标签:
1条回答
  • 2021-01-25 07:50

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

    and

    newVertices[i] = new THREE.Vector3(); newVertices[i].copy( geometry.vertices[i] ).applyMatrix3( InverseP );

    to Matrix4 in both cases - so they will read:

    var InverseP = new THREE.Matrix4().getInverse( P );

    and

    newVertices[i] = new THREE.Vector3(); newVertices[i].copy( geometry.vertices[i] ).applyMatrix4( InverseP );

    Just tried it with three.min.81.js and it works fine.

    0 讨论(0)
提交回复
热议问题