Conveyors and producers: goods flow from presses down the belts
Deploy web Studio / deploy (push) Successful in 1m4s

- Producer (category Industry): a press making cartons, crates, drums, sacks or parts at a set
  rate per minute; its ram goes down once per item, a green / red light shows running / stopped.
- Conveyor: drawn the way it runs (new prefab meta `directed`: the Studio turns the piece from
  where the drag starts), belt width, height, rise (inclines), speed, goods and spacing; legs,
  rails and a drive motor. Corners join without overlap (the receiving belt runs through, the
  feeding one stops at its side).
- A conveyor starting on a producer's output side carries its goods at its rate; one starting at
  another's end carries on with what that one carries. The gap is speed / rate. A stopped press or
  belt stops the goods after it. Tooltips show speed, rate and source.
- The goods ride a group moving one gap per loop (no reordering), first fading in, last out.
- Script API: world_of(o, u, v), info_row(key, value); objects_on falls back to half of p.d.
- Theme: industry colours, LED colours (the marker's LED had none).
- examples/factory + Factory demo in the web Studio; MCP instructions on production lines.

Checks: 68 Rust tests (conveyor joints, feed and spacing, every view of the factory demo),
Studio 108/108 (draw direction, feed from a producer, rate change), web 89/89.
This commit is contained in:
grabowski committed 2026-10-24 21:46:10 +07:00
1 parent a202283a60
commit 18dd324543
20 files changed
+617 -18

No files matched your search

+14
View File
@@ -309,6 +309,20 @@ try:
check(an[0] == "light" and an[1] >= 6 and an[2] == 0 and t1 > an[3] and pg.locator('.iso-bar [data-a="anim"]').is_visible(),
f"animations are light by default: {an[1]} stepped, none running, time moves on; the toolbar can switch")
# ---------------------------------------------------------------- the factory demo: presses and conveyors
pg.locator("#wb-projects").click()
pg.locator("#wb-nfactory").click()
pg.wait_for_load_state()
ready(pg)
pg.wait_for_timeout(500)
nf = len(doc(pg)["objects"])
rides = pg.evaluate("() => document.querySelectorAll('.iso-svg .iso-ride').length")
check(title(pg) == "isokit factory" and nf > 15 and rides >= 5 and pg.evaluate("() => __studio.S.warnings.length") == 0,
f"Factory demo opens a production yard ({nf} objects, goods riding {rides} belts, no warnings)")
carries = pg.evaluate("() => Object.fromEntries((__studio.view.info('belt-a3') || {rows: []}).rows)['Carries'] || ''")
check("20 cartons a minute" in carries and "(from belt-a2)" in carries, "goods come down the line: " + carries)
shot(pg, "web-factory.jpg")
# ---------------------------------------------------------------- folder project (OPFS stands in for a picked folder)
demo = {f.relative_to(ROOT / "examples" / "demo").as_posix(): f.read_text(encoding="utf-8")
for f in (ROOT / "examples" / "demo").rglob("*") if f.is_file() and "dist" not in f.parts}