crowdedjs / examples

A threaded, browser-based crowd simulation engine.
https://crowdedjs.github.io/examples/
MIT License
2 stars 3 forks source link
crowd-simulation

CrowdedJS Examples

A threaded, browser-based crowd simulation engine.

Contents

The repo provides a concrete implementation of the various libraries in the CrowdedJS repo.

The main files in this project are index.html and index.js

The open source support files are found in /lib and and governed by their respective licenses.

The support files include:

Use

Include the support libraries

<script src="https://github.com/crowdedjs/examples/raw/master/lib/axios.js"></script>  
<script src="https://github.com/crowdedjs/examples/raw/master/lib/bundle.js"></script> 
<script src="https://github.com/crowdedjs/examples/raw/master/bundle.js"></script>     

Include the fps counter (optional)

javascript: (function () { var script = document.createElement('script'); script.onload = function () { var stats = new Stats(); document.body.appendChild(stats.dom); requestAnimationFrame(function loop() { stats.update(); requestAnimationFrame(loop) }); }; script.src = '//mrdoob.github.io/stats.js/build/stats.min.js'; document.head.appendChild(script); })()

Run a development server

This project uses vite as its bundler. To run the dev server, use the start command, npm start.

Linking Peer Dependencies

There will be times when you want to edit multiple repos simultanesouly. To do this, clone all the required repos. Then use npm link to create the desired links. With links, any changes you make to the link repo locally will be reflected in your app.

Selinium Debugger

To run the selenium test, you need download the appropriate driver for your OS. You can find the Chrome driver here: https://sites.google.com/a/chromium.org/chromedriver/