three.js - 从 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(白线)。
任何提示/提示/建议都会很棒!谢谢
解决方案
推荐阅读
- python-3.x - 如何使程序输出两个字符串都以 Python 结尾的字符串?
- discord.js - SyntaxError:新脚本 (vm.js:88:7) 等处的输入意外结束
- javascript - 为什么浏览器拒绝加载我的 .js 文件并抱怨 MIME 类型?
- java - 如何避免两次调用 hasNextLine()?
- r - 如何显示 geom_smooth 绘制的正弦方程?
- c# - 将控件转换为 Bunifu 复选框
- angular - 如何使用角度函数打开引导模式
- javascript - 如何从后端获取数据,在浏览器端使用它?
- three.js - Fabric JS 2D线条转换成3Dviews
- javascript - 如何在使用 JavaScript 播放歌曲时加载下一首音频歌曲?