Commit Graph

258 Commits

Author SHA1 Message Date
Dustin Carlino
096acd1fea Properly interleave stdout and stderr when running the importer from the UI, for #602 and #82.
This makes the logs understandable and should fix the issue where the
last line of one_step_import's output is sometimes a warning instead of
the map name.
2021-04-13 10:07:56 -07:00
Dustin Carlino
462baddf17 Robustify running the importer from the UI, for #602 and #82:
- Echo process output to the main UI's stdout, for easier debugging
- Remove the timing breakdown from elevation import, since it breaks
  when the function bails out early
2021-04-13 09:45:48 -07:00
Dustin Carlino
a5f56e6011 new release 2021-04-11 10:14:27 -07:00
Dustin Carlino
417850cbed Import a part of Singapore 2021-04-11 08:44:49 -07:00
Dustin Carlino
6b30bffc43 Recreate the road in the quadtree when modifying width. #597 2021-04-10 11:56:05 -07:00
Dustin Carlino
4a0635fa5a Refactor: Just remember ID -> quadtree ID 2021-04-10 11:56:05 -07:00
Dustin Carlino
10255c2835 Recalculate intersection geometry when road width changes. #579
No effect on the road geometry yet, though...
2021-04-10 11:56:05 -07:00
Dustin Carlino
169d3765dd Fix a crash where you edit one lane normally, then add/delete lanes of the same road. #597 2021-04-09 14:39:30 -07:00
Dustin Carlino
e8b7019ef7 Use LaneSpec in map edits, letting width of each lane be modified too. #597 2021-04-09 14:35:49 -07:00
Dustin Carlino
14609ab157 Fix lane geometry after changing the number of lanes. #597 2021-04-09 14:35:49 -07:00
Dustin Carlino
584c1be9e0 A humble start to deleting lanes. #597 2021-04-09 14:35:49 -07:00
Dustin Carlino
c6906f6153 Change Vec<Lane> to BTreeMap<LaneID, Lane> to prepare for
adding/deleting lanes. #597

Not regenerating all maps yet. Haven't evaluated performance impact yet.
2021-04-09 14:35:49 -07:00
Dustin Carlino
2a89b68121 Create a temporary dev-only UI for modifying the number of lanes in a road. #597
It crashes when actually trying to change the number of lanes, as
expected.
2021-04-09 14:35:49 -07:00
Dustin Carlino
196af2a1f4 Refactor: store Direction for a Lane, simplifying Lane->DirectedRoadID. #555 2021-04-06 17:03:24 -07:00
Dustin Carlino
1e3708f9b4 Remove UberTurnGroup and the prototype of editing a cluster of traffic
signals using uber turn groups. #555

This was an old half-baked experiment for handling a cluster of traffic
signals.  Since then, merging intersections (by manually tagging them in
OSM for now, maybe automatically in the future) has proven better.

Removing this old code in preparation for pathfinding v2.
2021-04-05 10:05:27 -07:00
Dustin Carlino
ae66457a5e new release 2021-04-04 16:59:01 -07:00
Dustin Carlino
437d3eb064 Throttle rendering when running the one_step_importer from the UI. We spend more time drawing the progress than downloading, otherwise. #523 2021-04-04 09:39:03 -07:00
Dustin Carlino
df7d1080d9 Update trip start/end icons 2021-04-03 11:26:01 -07:00
Michael Kirk
4f81f186af
embed mode and reworked web build system (#592)
* root element id from Settings, respect element size

* Plumb assets root via settings

* adapt crates to new wasm api

* more FileLoader cleanup

* use tsc bin from node_modules

* avoid spurious unlink errors

GNU Make considers the src/*/wasm_pkg targets as intermediate build
files and attempted to `rm` them. We can stop that my marking them as
`.PRECIOUS`

https://www.gnu.org/software/make/manual/html_node/Special-Targets.html

* `open` doesn't work on Linux

We could do something with xdg-open, but meh, not worth having platform
dependent logic for this.

* fix typo, clarify instructions

* make server compatible with older python install on linux

* revert change - we dont want to include music on web

the leading "-" means exclude a subdir of an included dir.

* better wrap of comments

* fix misfire in copy/pasted comment

* update docs
2021-04-01 19:31:02 -07:00
Dustin Carlino
7f4f83d4e0 Refactor all of the places drawing start/goal markers on the map, and actually line up the tip of the icon with the position. 2021-03-31 14:23:16 -07:00
Dustin Carlino
371d459c8b new release 2021-03-27 16:09:36 -07:00
Dustin Carlino
fac9f8159d
Change the color scheme of the steep streets layer. #82 (#588) 2021-03-25 16:44:32 -07:00
Dustin Carlino
c1ac3cf39d Make Polygon::from_geojson preserve rings. This fixes the WIP elevation contours. #82 2021-03-25 15:15:53 -07:00
Dustin Carlino
ce473928fa Use u64 to describe number of bytes in the Manifest, now that we have a massive GeoTIFF in there that breaks wasm's 2^32 usize limit. #586 2021-03-24 21:23:38 -07:00
Michael Kirk
e672256828
Import screen UI fixups (#584)
* Import screen UI fixups

- even out the spacing a bit
- use underline style for "Alternate Instructions" web link
- left/right switch is more intuitive than right/left
- disambiguate label from toggle id
2021-03-23 15:11:14 -07:00
Dustin Carlino
162f09a887 Import Tripoli for WeCode Libya, also adding an Arabic font 2021-03-23 06:51:47 -07:00
Dustin Carlino
c68d0fdc6b new release 2021-03-21 11:47:54 -07:00
Dustin Carlino
0572a5118b Add a map covering the north end of Cambridge. Also grab fresh OSM for the Great Kneighton map, at least fixing the crazy geometry at Portugal Place. cyipt/actdev#151 [rebuild] [release] 2021-03-21 11:24:33 -07:00
Michael Kirk
af079c24e6 rename txt.add -> txt.add_line 2021-03-19 17:48:30 -07:00
Dustin Carlino
58ee3175ac Add a new Seattle map focused on the Arboretum, for #574, along with
prebaked data for the baseline (because it doesn't gridlock, without any
interventions needed!) and a proposal for opening up Broadmoor.
2021-03-19 17:24:11 -07:00
Michael Kirk
affd582093 more concise Text / tooltip() 2021-03-19 16:48:54 -07:00
Dustin Carlino
d7b7c2d7cd Import a slice of London along the A5, including scenario data. It
gridlocks, of course.  #577
2021-03-19 15:51:43 -07:00
Dustin Carlino
edfb745bb2 Change the default color scheme to day mode. Behaviorally, this rolls out the change for the OSM viewer, 15m app, parking mapper, and map_editor. 2021-03-19 15:26:35 -07:00
Michael Kirk
bf52a84956 Fix crash when viewing settings in osm_viewer
Longer term I think we should default to day_theme for all widgetry apps.
That will be easier if we can get rid of pregame theme all together, but
that requires re-styling the pre-game screens (which we want to do, but
that will take time).
2021-03-19 11:03:40 -07:00
Michael Kirk
546599e4f9 Replace ButtonImage with Image 2021-03-17 19:06:43 -07:00
Dustin Carlino
24a60b0b29 Import Tempe, AZ for collaboration with ASU 2021-03-17 10:55:04 -07:00
Michael Kirk
264f1f939f minimap controls: agent toggles and meters into one row
Some ancillary changes:

Made the GeomBatchStack public and extracted the ImageSource
functionality from ButtonBuilder to Image.
2021-03-16 18:28:50 -07:00
Dustin Carlino
2e7d6eeb34 Fix the progress bar in the UI; now the line-rewriting more or less
works! #523
2021-03-16 18:08:58 -07:00
Dustin Carlino
77709a24d6 Refactor a method to asynchronously download a file on native, with a simple progress bar. #523
Use it in the updater and all the importer tools. Only place it's not
used yet is parking_mapper and the in-game updater.  [rebuild]

Also make the RunCommand state understand the control code for erasing
the current line. It... sort of works.
2021-03-15 19:51:45 -07:00
Dustin Carlino
359960c1db Prepare the new map importer to work in the release. [rebuild] 2021-03-15 14:16:18 -07:00
Dustin Carlino
c0e49f815f Make the UI load the newly imported map, scraping its name from the other tool. #523
For this to work, RunCommand has to be much more careful about getting
all output when the command is done.
2021-03-15 13:54:14 -07:00
Dustin Carlino
f87c1c3b1b Manage the temporary files in the importer better, and don't re-download
pbf. #523

But now we don't know which map to switch to in the UI!
2021-03-15 11:43:06 -07:00
Dustin Carlino
04e0e2aa02 Cache the geofabrik index file in data/input/shared. #523 2021-03-15 10:58:11 -07:00
Dustin Carlino
a8b72691dc new release 2021-03-14 20:39:56 -07:00
Dustin Carlino
edf3914e4d Disable the new map importer for this week's release; it's not ready yet. [rebuild] [release] 2021-03-14 17:43:18 -07:00
Dustin Carlino
be4935a316 If the map was imported successfully, switch to it. #525 2021-03-13 15:43:10 -08:00
Dustin Carlino
014d3184cc Use the subprocess crate to nonblockingly read output from a command. #523 2021-03-13 14:49:01 -08:00
Dustin Carlino
1477262f69 Just split out RunCommand. #523 2021-03-13 14:04:21 -08:00
Dustin Carlino
42a3852784 Actually, we can show command output just fine. The problem was trying
to render text with embedded newlines. #523
2021-03-13 13:49:33 -08:00
Dustin Carlino
944b2c337a Get the importer UI working finally! #523
Improved the target dir finding, and hacking around some of the command
output not rendering.
2021-03-13 13:41:34 -08:00