Three.js: raycaster's doc needs update

Created on 15 Mar 2018  路  5Comments  路  Source: mrdoob/three.js

Description of the problem

Raycaster

indices seems no longer exists. face and faceIndex will always be set.

When intersecting a Mesh with a BufferGeometry, the faceIndex will be undefined, and indices will be set; when intersecting a Mesh with a Geometry, indices will be undefined.
Three.js version
  • [x] Dev
  • [x] r91
Browser
  • [x] All of them
OS
  • [x] All of them
Hardware Requirements (graphics card, VR Device, ...)
Bug

Most helpful comment

@Mugen87 Sorry I'm not familiar with git and don't know how to do a PR, I'll learn it soon and try next time.Oh, We have jet lag for nearly 12 hours.

All 5 comments

That's correct. Would you like to do a PR with the change? 馃槉

Also notice that for non-indexed BufferGeometry an additional property index is set. This should also be added in the docs.

https://github.com/mrdoob/three.js/blob/566f53d5db20a7088b5462c5f3755930914b7abf/src/objects/Mesh.js#L298-L303

@mrdoob @WestLangley The property index seems redundant since the value a is also assigned to faceIndex in checkBufferGeometryIntersection(). Should we consider to remove .index?

You can remove it and see if users complain.

@Mugen87 Sorry I'm not familiar with git and don't know how to do a PR, I'll learn it soon and try next time.Oh, We have jet lag for nearly 12 hours.

@vinstics Thanks for reporting the issue!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seep picture seep  路  3Comments

boyravikumar picture boyravikumar  路  3Comments

clawconduce picture clawconduce  路  3Comments

yqrashawn picture yqrashawn  路  3Comments

jlaquinte picture jlaquinte  路  3Comments