Apply a naive ambient occlusion to geometry faces.
Currently this just gradients horizontal faces dark to light, top faces light and bottom faces dark. Could definitely be better but hey it's fake.
var fakeao = game;// Apply fakeao to every chunkgame;// Or apply to a specify geometryfakeao;// Or specific facesfor var i = 0; i < geometryfaceslength; ++i;
Will apply gradient between light and dark onto the face. If
light is omitted
it will use the existing face color. If
dark is omitted then it will be
automatically calculated at 10% darker than
Apply to all the faces of a geometry.
Apply to all the faces of a geometry on a chunk.
With npm do:
npm install voxel-fakeao
Use browserify to
Copyright (c) 2013 Kyle Robinson Young
Licensed under the MIT license.