xeolabs / scenejs

An extensible WebGL-based 3D engine. This is an archived project.
https://xeolabs.github.io/scenejs/
Other
649 stars 165 forks source link

Fix handling for missed object picks #418

Closed tsherif closed 8 years ago

tsherif commented 8 years ago

Fixes two bugs in object picking:

  1. Background color wasn't properly being set to transparent black for picking, meaning it was impossible to tell when a pick was missed.
  2. Pick object indexing was starting at 0, meaning a pick color of transparent black would be ambiguous: could be the first object or the background.