Skip to content

shama/voxel-snow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

voxel-snow

Let it snow in voxel.js.

View this example

example

var snow = require('voxel-snow')({
  // pass it a copy of the game
  game: game,

  // how many particles of snow
  count: 1000,

  // size of snowfall
  size: 20,

  // speed it falls
  speed: 0.1,

  // speed it drifts
  drift: 1,

  // material of the particle
  material: new game.THREE.ParticleBasicMaterial({color: 0xffffff, size: 1})
});

game.on('tick', function() {
  // update the snow by calling tick
  snow.tick();
});

Later you can add more snow:

snow.add(count, size, material);

Or access the snow particles directly:

snow.particles.forEach(function(particle) {
  // particle === THREE.ParticleSystem
});

run the demo

  1. git clone git://github.com/shama/voxel-snow && cd voxel-snow
  2. npm install
  3. npm start

install

With npm do:

npm install voxel-snow

Use browserify to require('voxel-snow').

release history

  • 0.2.0 - updates for voxel-engine@0.17.0
  • 0.1.1 - updates for voxel-engine@0.6.0
  • 0.1.0 - initial release

license

Copyright (c) 2013 Kyle Robinson Young
Licensed under the MIT license.

About

🎲❄️ Let it voxel.js snow!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors