lightgen.js Generate directional lights based on environment maps This is a JavaScript implementation of Paul Debevec’s 2006 Siggraph paper A Median Cut Algorithm for Light Probe Sampling, along with a usage example in Three.js.