在布料模拟示例代码中,有一个名为ParametricBufferGeometry的函数需要3个参数。这个函数实际上是什么意思?
clothGeometry = new THREE.ParametricBufferGeometry(clothFunction, cloth.w, cloth.h);
在文档中,我找不到任何关于它的适当文档。它说:
ParametricBufferGeometry(func : Function, slices : Integer, stacks : Integer) func — 一个函数,该函数接受介于0和1之间的u和v值,并修改第三个Vector3参数 切片—用于参数化函数的切片计数 栈—用于参数化函数的堆栈计数
有人能解释一下它实际上是什么吗?
clothFunction
只是plane
的别名。因此,这个特定的参数曲线代表了一个平面几何。 - Mugen87ParametricBufferGeometry
已经被重命名或弃用了。当我访问https://threejs.org/docs/#api/en/geometries/ParametricGeometry时,会出现404错误。 - kimbaudiParametricGeometry
已从核心中移除,现在位于examples/jsm/geometries/ParametricGeometry.js
中。 - Mugen87