Last active
May 16, 2018 22:16
-
-
Save cazala/71c26a6a265c844aa9cc3a260bfe014a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sea | |
const { Sea } = require('shoaling') | |
const sea = new Sea(38, 1200, 300, 1200) // simulate 38 fish on a 'sea' of 1200x1200 (X and Z) and 300 deep (Y) | |
sea.start(64) // update every 64 milliseconds | |
setInterval(() => { | |
render(sea) | |
clients.forEach(client => client.forceUpdate()) | |
}, 100) // render scene every 100 ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment