voxel-tile
WORK IN PROGRESS
Load google map or open street map tiles into voxel.js.
example
var tile = game: game // Path to tile images tilepath: 'textures/heightmap/tiles/' // [optional] Load a separate tile for coloring // (otherwise it will just use the colors from the heightmap) colortilepath: 'textures/colormap/tiles/' // [optional] Size of chunks size: 32 // [optional] Size of tiles tilesize: 256 // [optional] URL format to tiles tileformat: '%z/%x/%y.png' // [optional] Maximum zoom level zoomax: 6 // [optional] Minimum zoom level zoomin: 3 // [optional] Voxel mesher to mesh with mesher: voxelmeshersgreedy // [optional] Boolean whether the tiles should infinitely repeat repeat: true // [optional] Boolean whether to render the world flat flat: false // [optional] Function to determine height based on color { return Math } // On missing chunk, load up tile for chunk positiongamevoxels // Set zoom level based on the current player height distancegame
install
With npm do:
npm install voxel-tile
Use browserify to require('voxel-tile')
.
release history
- 0.1.0 - initial release
license
Copyright (c) 2013 Kyle Robinson Young
Licensed under the MIT license.