threex.basiclighting is a threex game extension for three.js. It provides a three point lighting. It is the lighting used in movies: A key light on the front-left, a back light in the back and a fill light on the front right, nothing fancy. It is perfect if you dunno much about lighting and you want to add lights in your games. Nothing big or special in this extension. This is mainly for educational purposes or for starting your project fast.
- examples/basic.html [view source] : It shows a basic example of extension.
- examples/demo.html [view source] : It shows a demo of it.
You can install it manually. Just do
<script src='threex.basiclighting.js'></script>
You can install with bower.
bower install threex.basiclighting
then you add that in your html
<script src="bower_components/threex.basiclighting/threex.basiclighting.js"></script>
create a three point lighting
var lighting = new THREEx.ThreePointsLighting()
scene.add(lighting)
create a sun set lighting
var lighting = new THREEx.SunSetLighting()
scene.add(lighting)
- do a day light, night light
- a smooth transition between the two would be even better