abstreet/web
Dustin Carlino be9ba5a80e Clean up the absurd number of Seattle maps. Ideally we'd have some way
to further organize them by purpose, but for the moment, two problems:

1) the city picker UI is getting way too crowded
2) on native, the initial download is up to 145MB

Removing:

- the 3 Aurora maps and Green Lake, added for the ARC workshop, but no
  longer the most active of collaborations
- Ballard is now subsumed by central Seattle -- the only advantage would
  be keeping its full scenario of walking and transit trips, but the
  simulation is horribly gridlocked there anyway
- the Rainier Valley map, originally meant for an SNG traffic light
  timing study
- the larger udistrict map
2021-10-11 14:37:59 -07:00
..
bin embed mode and reworked web build system (#592) 2021-04-01 19:31:02 -07:00
src Clean up the absurd number of Seattle maps. Ideally we'd have some way 2021-10-11 14:37:59 -07:00
.gitignore embed mode and reworked web build system (#592) 2021-04-01 19:31:02 -07:00
Makefile Deploy the RawMap editor to the web. I want to point to it from the 2021-09-06 15:46:33 -07:00
package-lock.json embed mode and reworked web build system (#592) 2021-04-01 19:31:02 -07:00
package.json embed mode and reworked web build system (#592) 2021-04-01 19:31:02 -07:00
README.md rebuild wasm when rust sources change 2021-07-17 11:24:46 -07:00

Web Stuff

This is a collection of API's and build tools for packaging our various Widgetry apps as web applications.

Goals

A web developer, who might not know anything about rust or wasm, should be able to use our packaged javascript libraries on their website with minimal customization or arcanery.

Users of their website should be able to interact with the widgetry app without it feeling weird or having to jump through hoops.

Limitations

JS feature: import.meta

To allow the application to live at any URL (rather than presupposing it lives at root, or whatever), we rely on import.meta which isn't supported on some browsers before 2018. See: https://caniuse.com/?search=import.meta

An alternative would be to require configuration, so the loader knows where to download it's "*_wasm.bg file".

Browser Feature: WebGL

We prefer WebGL2, but now gracefully fall back to WebGL1. This should cover all common browsers since late 2014. https://caniuse.com/?search=webgl

Examples

See src/web_root/*.js for code examples.

You can build and see the examples in your webbrowser with:

// install typescript build dependency
npm install
make dev
make server

The workflow for interactive development of just one app in debug mode:

make abstreet server