首页 > 解决方案 > 从 CatmullRomCurve3 和 ExtrudeBufferGeometry 更新路径

问题描述

我正在研究如何更新保存在 ExtrudeBufferGeometry 中的 CatmullRomCurve3

此代码笔中显示的代码

我通过以下方式创建该行:

  var path = new THREE.CatmullRomCurve3(points);
  path.type = 'catmullrom';
  var geometry = new THREE.ExtrudeBufferGeometry(shape, {
    extrudePath: path,
    curveSegments: 12,
    steps: path.points.length,
    bevelEnabled: false,
  });

使用 BufferGeometry 我通常使用我添加的属性位置更新位置(显示在 l.119 上)

我在代码本身中放置了两组行,一组显示如何使用 BufferGeometry 和 Line(蓝线)执行此操作,第二组是 CatmullRomCurve3 和 Extrusion(白线)。

任何提示/提示/建议都会很棒!谢谢

标签: three.jsgeometryglslcatmull-rom-curve

解决方案


推荐阅读