A sky for voxel.js. Includes a sun, moon and stars.
First off, it is recommended to disable lights in the game when using
var createEngine = ;var game =;
To simply set the sky to a certain time of day:
var createSky = game;var sky = ; // Set to noon
Or if you would like to run through a day/night cycle:
var createSky = game;var sky = ;game;
You can build your own sky using the included helpers:
var createSky = game;var sky =;game;
Check the source of the built-in sky for a more in depth example.
There are a variety of starting options for voxel-sky. Just make sure you always pass it a game:
var createSky =game: game// starting time of the daytime: 2400// size of the skysize: game * 2// initial color of the skycolor:// how fast the sky rotatesspeed: 01;
git clone git://github.com/shama/voxel-sky && cd voxel-sky
With npm do:
npm install voxel-sky
Use browserify to
Copyright (c) 2013 Kyle Robinson Young
Licensed under the MIT license.