voxel-sky
A sky for voxel.js. Includes a sun, moon and stars.
example
First off, it is recommended to disable lights in the game when using
voxel-sky
:
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.
options
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 day time: 2400 // size of the sky size: game * 2 // initial color of the sky color: 0 0 0 // how fast the sky rotates speed: 01;
run the demo
git clone git://github.com/shama/voxel-sky && cd voxel-sky
npm install
npm start
install
With npm do:
npm install voxel-sky
Use browserify to require('voxel-sky')
.
release history
- 0.3.0 - Ability to spin the sky in any axis and defaulting to z (@rachel-carvalho).
- 0.2.0 - update for voxel-engine@0.17.0. Use tic to keep in sync with game clock. Now works with fog.
- 0.1.2 - updates for voxel-engine@0.6.0 (thanks @nakedible!)
- 0.1.1 - simplify moon, no tilt, better color changes
- 0.1.0 - initial release
license
Copyright (c) 2013 Kyle Robinson Young
Licensed under the MIT license.