freshfork / p5.EasyCam

A p5.js library for easy 3D camera control.
https://freshfork.github.io/p5.EasyCam
MIT License
136 stars 33 forks source link

HUD Lights #1

Closed jwdunn1 closed 4 years ago

jwdunn1 commented 4 years ago

If lights are on, then screen-aligned objects rendered in HUD mode can be affected by the orientation of the camera. For example, given a scene with lights() and a box, if the camera is rotated around the scene, a filled rectangle rendered in the HUD context will vary in brightness. The lights should probably be turned off automatically for the HUD rendering, perhaps using noLights() (when that is implemented) or by setting this._renderer._enableLighting = false;

jwdunn1 commented 4 years ago

Work around example...

  easycam.beginHUD();
    this._renderer._enableLighting = false; // fix for issue #1
    ...
  easycam.endHUD();
jwdunn1 commented 4 years ago

noLights() is now implemented. I recommend calling noLights() immediately following beginHUD().

  easycam.beginHUD();
    noLights();
    ...
  easycam.endHUD();