flocc
v0.5.21
Published
Agent-based modeling in JavaScript in the browser or server.
Downloads
579
Maintainers
Readme
Flocc
Agent-based modeling in JavaScript. Run it in the browser to build interactive simulations that can live on public websites, or on the server or your machine for more computationally intensive modeling.
Usage
The recommended method is to install and import flocc
as a module.
// Using ES6 `import` syntax:
import flocc from 'flocc';
// Or ES5 `require`
const flocc = require('flocc');
You can also import just the classes you need:
import { Agent, Environment } from 'flocc';
If you're running flocc
in browser, and don't want to bother with imports and build process, you can download the top-level flocc.js
file and include it on your page:
<script src="/flocc.js"></script>
<script>
const agent = new flocc.Agent();
</script>