Commit Graph

4830 Commits

Author SHA1 Message Date
Dustin Carlino
58849d3d15 Small refactor: in most places, we can actually use String as the error type; Box<dyn Error> is only useful when errors of different types are propagated.
Nowhere in abst do we care about handling different errors differently
2020-08-13 07:12:06 -07:00
Dustin Carlino
eca71d27c9 tiny cleanup: use ScreenPt for canvas cursor 2020-08-12 17:53:17 -07:00
Dustin Carlino
ae18b09b3b refactor separators 2020-08-12 16:46:11 -07:00
Dustin Carlino
9af8aafb44 now that we're drawing lots in the multi-sig editor, cache it 2020-08-12 15:50:23 -07:00
Dustin Carlino
e4a2f35bb0 glue more basic functionality to the multi-sig ed 2020-08-12 15:50:23 -07:00
Dustin Carlino
490471848a copy over lots of the misc functionality to the new multi-signal editor 2020-08-12 15:50:23 -07:00
Dustin Carlino
ca501b7b80 initially synchronize all signals in a group 2020-08-12 15:50:23 -07:00
Dustin Carlino
5803e5721e add turn icons to the new multi-signal editor 2020-08-12 15:50:23 -07:00
Dustin Carlino
c08e244d23 tiny start to a new multi-intersection traffic signal editor. just get
the left panel to display some kind of merged view
2020-08-12 15:50:23 -07:00
Michael Kirk
62828e1ffa revert wasm shader changes. unfixes DPI2 devices, but fixes DPI1 devices 2020-08-12 15:44:48 -07:00
Michael Kirk
abe1f051eb code review: make more things private, remove unused method 2020-08-12 15:44:48 -07:00
Michael Kirk
4d3194c362 Revert "DO NOT MERGE: web logging"
This reverts commit fecfad72806b095e8477d983dc69f1275422a90f.
2020-08-12 15:44:48 -07:00
Michael Kirk
5c8ccef970 DO NOT MERGE: web logging 2020-08-12 15:44:48 -07:00
Michael Kirk
05f1a0332b glow backend compiles, but untested
These are my best guess at the changes to get glow working with the DPI changes.

Currently on master, on macos at least, building the glow backend
launches a blank screen. That's not resolved by this PR, so all these
changes are untested.
2020-08-12 15:44:48 -07:00
Michael Kirk
58d360668e add glow feature 2020-08-12 15:44:48 -07:00
Michael Kirk
32a92c0d76 wasm backend 2020-08-12 15:44:48 -07:00
Michael Kirk
f7f4fd889e consolidate screenspace and mapspace methods since they now behave the
same.

rg -l screenspace_svg | xargs sed -i .bak 's/screenspace_svg/load_svg/'
rg -l mapspace_svg | xargs sed -i .bak 's/mapspace_svg/load_svg/'
2020-08-12 15:44:48 -07:00
Michael Kirk
f42b7c003c layout uses logical pixels, not physical
Previously it was not clear (to me at least) when a value used
in layout was in units of logical pixels vs physical pixels.

This lead to some ambiguity about where to scale values, and lead to
some values being scaled more than once or sometimes not at all, leading
to inconsistent layouts across DPI's.

The intent of this change is to solve this ambiguity by having the ui
clients work *exlusively* with logical pixels.

To achieve this, we consolidate all scaling to the graphics backend.
We translate all PhysicalPositions from the windowing libraries to
LogicalPixles.

Our own types: ScreenPt, ScreenDim, etc. are all in logical units.

In some places, I replaced passing raw floats with a corresponding
Screen* type to clarify that the units are in logical pixels.
2020-08-12 15:44:48 -07:00
Dustin Carlino
9ce7ab1c88 defer drawing intersections, same as lanes. faster startup time and melts my GPU less trying to load london and tokyo 2020-08-12 11:17:06 -07:00
Dustin Carlino
3b49353df2 gracefully degrade if we cant make TurnGroups for a traffic signal. this
gets SF, Tokyo, and London to import!!!
2020-08-12 11:05:19 -07:00
Dustin Carlino
7a0dbb28b1 handle some rendering failures, getting new orleans to load 2020-08-12 09:47:35 -07:00
Dustin Carlino
62bb82886d blaze through all the crazy errors in intersection_polygon, just
recording errors and falling back to circular geometry and not trimming
roads

also filter out highway areas like
https://www.openstreetmap.org/way/132705692, woops!

Manchester and NOLA now import...
2020-08-12 09:36:46 -07:00
Dustin Carlino
eb74e05407 missed a few right_shift calls in importer. and speed up traffic signal
matching while I'm there
2020-08-12 08:34:35 -07:00
Dustin Carlino
a27b029ff6 plumb errors for shifting polylines through more APIs. mostly no-op for
now, just switched everything to must_* variants, but this paves the way
for handling failures.

... except for rendering pedestrian crowds -- I _think_ I saw a crash
from that, and it's easy to have a fallback there
2020-08-12 08:18:10 -07:00
Dustin Carlino
8568690a7a stop the dropdown from jumping around when opening it while sim is running
(the bug: open population layer while sim is running, click the color
scheme dropdown)
2020-08-12 07:19:00 -07:00
Dustin Carlino
df3cd30081 click to cancel out of dropdowns 2020-08-12 07:08:09 -07:00
Dustin Carlino
bc4c1eaea6 make Filler responsive to window resizing 2020-08-11 17:28:27 -07:00
Dustin Carlino
8ce2568280
turn the headless runner into a demo of a JSON API, for #245 (#268)
turn the headless runner into a demo of a JSON API, for #245
2020-08-11 16:44:19 -07:00
Dustin Carlino
a370b6aac6 move the traffic signal details into a tab. specialize make_signal_diagram for editing.
this is a step towards editing multiple traffic signals at once, and a design that yuwen has suggested many times before
2020-08-11 12:00:49 -07:00
Dustin Carlino
e38814563a cleanup storymap code after menu refactor 2020-08-11 11:26:06 -07:00
Dustin Carlino
7443f4ba98 detangle the way Menus communicate results, removing the Clone
requirement and finishing off InputResult
2020-08-11 09:10:16 -07:00
Dustin Carlino
c0d335b074 fix readme videos 2020-08-10 17:39:25 -07:00
Dustin Carlino
0749a2ac7b start keeping goldenfiles for bus routes, similar to the screenshot diff test. this will make it much easier to finish up bus matching without accidentally regressing somewhere 2020-08-10 16:03:04 -07:00
Dustin Carlino
312775b491 refactor TurnGroup creators, but keep it stored on traffic signal, so
it's regenerated for edits
2020-08-10 15:39:28 -07:00
Dustin Carlino
c101666c7c finishing the consolidation of docs 2020-08-10 14:56:39 -07:00
Dustin Carlino
0ac22208c7 moving a few more docs into the mdbook 2020-08-10 14:12:53 -07:00
Dustin Carlino
d44245211e mdbook cant have blank section 2020-08-10 13:52:16 -07:00
Dustin Carlino
f9b41dda30 finally get github pages + mdbook to work, thanks to
https://github.com/rust-lang/mdBook/pull/1248#issuecomment-671528271 and
removing jekyll
2020-08-10 13:49:30 -07:00
Dustin Carlino
31e8c654d2 prototype directional traffic signal demand viz over time 2020-08-10 13:19:47 -07:00
Dustin Carlino
f02fdec8e3 new release 2020-08-09 15:16:18 -07:00
Dustin Carlino
43a6edbc28 regenerate everything, prep for release. [rebuild]
lakeslice still gridlocks and lots of bus routes cut out. not the
happiest release.
2020-08-08 21:33:11 -07:00
Dustin Carlino
ad3a0398bb stop missing panics even after long Timer notes 2020-08-08 19:38:32 -07:00
Dustin Carlino
ecd5d86009 handle bus stops right at intersections 2020-08-08 19:32:18 -07:00
Dustin Carlino
52e89315d7 in lieu of understanding bus platforms, add a shoulder to some roads with bus stops, now that we know what side of the road with some confidence. fixes 45th and I5. 2020-08-08 18:39:40 -07:00
Dustin Carlino
8764226765 cutover to using the new stuff for snapping bus stop positions...
seems pretty good for a few examples. not regenerating yet. still lots
of routes skipped because of edge cases, but now it's way more clear
how to work on those smaller problems.
2020-08-08 18:14:08 -07:00
Dustin Carlino
6c525d625d match transit stops to side of the road based on the orientation of the points in the route. don't use this just yet...
not regerating yet either
2020-08-08 17:44:28 -07:00
Dustin Carlino
94f83dcc6a step 1 of much more sane bus route/stop matching: just get the order of points in a route in a good order
not regenerating yet. this eliminates some routes that were previously
imported (but who knows, maybe not successfully)
2020-08-08 16:51:40 -07:00
Dustin Carlino
d1e9e38e82 refactor for #231: use typed OSM IDs everywhere, dedupe URL code
have to regen, the binary format has changed
2020-08-08 16:09:36 -07:00
Dustin Carlino
84e913a642 fix bus routes where the last bus stop is also on the outbound border
lane

not regenerating yet
2020-08-08 10:11:09 -07:00
Dustin Carlino
eee179ce8a store offset in the permanent signal format 2020-08-08 09:45:59 -07:00