Skip to content

scottpdo/flocc

Repository files navigation

Flocc

NPM version

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.

Flocking Model

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>

Documentation

Visit the documentation site for complete documentation