M

Trafficjs Demo

Traffic JS is a train and buses renderer inspired by Wtraffic. It's built solely in Javascript and can be setup in as little time as possible. The original goal was to have cute lil train travel along the bottom of my mainpage, but it could be used in other ways.

You can find setup instructions on it's Github page. This is only the first release so not a lot of features are available at the moment, but there's already quite a lot of things you can do ! A json file specifies all the user's vehicle, while another defines scenes's parameters. the one above show the name of each passing vehicle, while the one below only shows trams.

Other scene parameter can be modified, like the speed multiplier, width and delai between two buses, which can be random. Each vehicle has a base speed, class, file path and name ! You can also specifie a scene to show a single unique vehicle.

Because every scene is a canvas with a unique id, it is possible to modify them with CSS. You can visit this page to find all the sprites i've already created ! feel free to send me a message if you have any feature you'd like to see implemented.