【问题标题】:Three.js: Raycast intersection on Line with BufferGeometryThree.js:Raycast 与 BufferGeometry 的交点
【发布时间】:2013-08-18 17:52:29
【问题描述】:

由于 R59 可以在线进行光线投射,而且效果很好。我在鼠标悬停时显示工具提示。

由于数据不断增长,我遇到了性能问题,所以我决定从THREE.Geometry 切换到THREE.BufferGeometry。一切正常,而不是光线投射....鼠标悬停时我没有收到任何错误或其他东西,真的什么都没有发生!

难道不能在由THREE.BufferGeometry 建立的线上相交光线投射吗?

【问题讨论】:

    标签: javascript three.js raycasting buffer-geometry


    【解决方案1】:

    是的,Raycaster 支持 LineBufferGeometry

    注意docs 中描述的threshold 参数。

    https://threejs.org/examples/webgl_interactive_lines.html

    three.js r.130

    【讨论】:

    • 这就是我应该听到的...... :(你知道是否有人在做这个吗?或者我应该在 github 上提出建议吗?
    • 在 r60 上更新后出现错误:Uncaught TypeError: Cannot read property 'length' of undefined threeR60.js:7047 intersectObject threeR60.js:7047 intersectDescendants threeR60.js:7086 THREE.Raycaster.intersectObject 也许有人应该解决这个问题
    • 如果您可以展示一个错误,您可以通过报告它来提供帮助。请参阅three.js guidelines 了解如何报告错误。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-01-20
    • 2018-10-09
    • 2014-06-29
    • 1970-01-01
    • 2013-05-23
    • 2013-12-16
    • 2020-10-15
    相关资源
    最近更新 更多