maxogden/voxel-engine — pull request #37 by shama (2013-02-07 18:44:17+00:00)
Title: Run materials.tick for animated materials

`voxel-texture@0.3.1` now offers animated materials by passing `animate` an array of loaded materials to cycle and a delay:

```js
var animated = game.materials.animate(['grass', 'obsidian', 'brick'], 1000);

var mesh = new game.THREE.Mesh(
new game.THREE.CubeGeometry(game.cubeSize, game.cubeSize, game.cubeSize),
new game.THREE.MeshFaceMaterial([
animated, animated, animated, animated, animated, animated
])
);
```

`game.materials.tick()` runs the actual animations if there are any. Better example here: https://github.com/shama/voxel-texture/blob/master/example/world.js#L111