Streets: sidewalks, road curves, junctions and roundabouts
Deploy web Studio / deploy (push) Successful in 4m31s
Deploy web Studio / deploy (push) Successful in 4m31s
Roads take sidewalks (none, both, left, right): 12 cm high paving with kerb faces drawn where they face the viewer. Road curve (radius, angle, left/right) carries a street round a bend; centre lines are true arcs when cut and offset, so curve joints are seamless. A road ending on another road's centre line opens that road's kerb and sidewalk (T junction); two roads ending at one corner close it. Roundabout: ring radius and width, one or two lanes, up to four arms with flared kerbs, splitter islands, give-way lines on the entry side (traffic on the left or right) and a central island with apron. Studio: a road run drawn corner by corner gets a curve in each corner (prefab meta `corner`). Tooltips list the streets each one meets. Engine: open `polyline` primitive (Prim::Poly open) so dashes run on round curves. examples/streets and a Streets demo in the web Studio; MCP guidance, docs. ROADMAP: backlog 5-7 done; multi-select and the hosted copy marked done. Tests: Rust 72, Studio 113, web 95.
This commit is contained in:
1 parent
2442966743
commit
c91d63663b
24 files changed
+989
-29
No files matched your search
@@ -29,7 +29,13 @@ side; a conveyor (rot 0 runs towards +x, 90 +y, 180 -x, 270 -y; w = length, prop
|
||||
at that side carries them, and a conveyor whose start is at another's end carries on with them (corners join). \
|
||||
The gap between goods is speed / rate, so set the rate on the producer and the speeds on the belts. \
|
||||
A robot_arm (props.reach, default 2 m) picks goods off the end of the nearest conveyor within its reach and puts \
|
||||
them on the start of another conveyor within reach, or on a pallet beside it; place it 1.5 to 2 m past a belt's end.";
|
||||
them on the start of another conveyor within reach, or on a pallet beside it; place it 1.5 to 2 m past a belt's end. \
|
||||
Streets (category Ground) join by their centre lines: a road (x, y = middle, rot 0 along x, w = length, d = width, \
|
||||
props.walk none/both/left/right adds raised sidewalks walk_w wide) ending on another road's centre line makes a \
|
||||
junction there; a road_curve starts at its x, y heading along local +x (rot 0/90/180/270), bends props.angle degrees \
|
||||
left or right on radius r and ends where the next road starts; two roads ending at one point make a sharp corner. \
|
||||
A roundabout (props.r ring radius, arm_e/n/w/s, arm_len) has its arm ends r + arm_len from its centre: put the \
|
||||
roads' ends exactly there, with the same width as road_d.";
|
||||
|
||||
fn tool(name: &str, description: &str, props: Value, required: &[&str]) -> Value {
|
||||
json!({ "name": name, "description": description,
|
||||
|
||||
@@ -72,8 +72,8 @@ fn demo_passes_the_check() {
|
||||
assert!(f.is_empty(), "{f:?}");
|
||||
}
|
||||
|
||||
/// The house and factory demos: every view draws every object without warnings or
|
||||
/// depth-sort cycles (walls and belts must not overlap), and the projects pass the check.
|
||||
/// The house, factory and streets demos: every view draws every object without warnings
|
||||
/// or depth-sort cycles (walls and belts must not overlap), and the projects pass the check.
|
||||
#[test]
|
||||
fn house_demo_renders_every_view_cleanly() {
|
||||
example_renders_every_view_cleanly("house");
|
||||
@@ -84,6 +84,11 @@ fn factory_demo_renders_every_view_cleanly() {
|
||||
example_renders_every_view_cleanly("factory");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn streets_demo_renders_every_view_cleanly() {
|
||||
example_renders_every_view_cleanly("streets");
|
||||
}
|
||||
|
||||
fn example_renders_every_view_cleanly(name: &str) {
|
||||
let p = Project::load(
|
||||
Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
|
||||
Reference in new issue
Block a user