【问题标题】:Three.js divide planeGeometry to non-equal parts by heightSegments & widthSegmentsThree.js 通过 heightSegments 和 widthSegments 将 planeGeometry 划分为不相等的部分
【发布时间】:2016-02-25 23:09:07
【问题描述】:

有没有办法通过three.js 中的 heightSegments 和 widthSegments 将 planeGeometry 划分为不相等的部分?

解释:

new THREE.PlaneGeometry(100, 100, 2, 3);

这会将平面分成宽度相等的 2 部分和高度相等的 3 部分。

我想分成不等的部分。类似的东西:

new THREE.PlaneGeometry(objWidth, objHeight, 2.5, 1.5);

这不起作用。有什么建议么?

提前致谢。

【问题讨论】:

    标签: javascript three.js


    【解决方案1】:

    API documentation for THREE.PlaneGeometry 中,您可以看到第三个和第四个参数表示widthSegmentsheightSegments

    PlaneGeometry(width, height, widthSegments, heightSegments);
    

    段的数量是一个整数。我不太确定您要达到什么目标,但这些值应该是整数。

    所以不,这是不可能的。

    【讨论】:

    • 我试图实现的是将平面几何分布到不相等的部分。
    猜你喜欢
    • 2018-06-12
    • 1970-01-01
    • 2012-01-05
    • 1970-01-01
    • 2011-03-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多