Skip to content

This is a ScalaJS project, but shows up as Javascript, because I'm committing the compiled output to simplify deployment in Netlify.

Notifications You must be signed in to change notification settings

swoogles/TrafficSimulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Embouteillage

The project is a traffic simulator that runs in your browser, powered by ScalaJS. It is now 100% client code, meaning it can be hosted simply as a static site. Features so far:

* Single-lane, 1-dimensional traffic.
* Intelligent Driving Model to determine vehicle behavior.
* Pause and reset Scene.
* Adjustable Parameters
    * Timing in between vehicles
    * Initial vehicle velocity

* Disrupt traffic via 2 means:
    * Bring an existing vehicle to a dead stop.
    * Plop a new vehicle down in the middle of the road. (Unreliable behavior if dropped on an existing vehicle.)

It uses powerful scala tools to construct a fully typed and reactive Web applications. Among them:

Build & Run

First, build the javascript:

sbt fastOptJS

Play with the most recent version of the project

Live Demo

Play with the Simulation Locally

firefox ./index.html

Testing Requirements

Install NodeJS (and PhantomJS?) to run tests in ScalaJS. Still missing something here though...

npm install jsdom

About

This is a ScalaJS project, but shows up as Javascript, because I'm committing the compiled output to simplify deployment in Netlify.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages