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;
customize the sky
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: 0 0 0// how fast the sky rotatesspeed: 01;
run the demo
git clone git://github.com/shama/voxel-sky && cd voxel-sky
With npm do:
npm install voxel-sky
Use browserify to
- 0.3.0 - Ability to spin the sky in any axis and defaulting to z (@rachel-carvalho).
- 0.2.0 - update for firstname.lastname@example.org. Use tic to keep in sync with game clock. Now works with fog.
- 0.1.2 - updates for email@example.com (thanks @nakedible!)
- 0.1.1 - simplify moon, no tilt, better color changes
- 0.1.0 - initial release
Copyright (c) 2013 Kyle Robinson Young
Licensed under the MIT license.