Add camera AR view, GPS stable mode and wider machine range
CI/CD / test (push) Successful in 28s
CI/CD / publish (push) Successful in 17s
CI/CD / deploy (push) Successful in 4s

- Real-world mode opens the phone's rear camera as the game background;
  the 3D camera stands at the GPS position and follows the phone's
  orientation, so machines, beacons, range circles, the route and the
  robot appear in their real direction. City, traffic and family are
  hidden in this view; a toggle switches back to the 3D map, and drag
  turns the view where there is no orientation sensor
- Stable mode (default on): drops GPS jumps impossible on foot, holds the
  position until it drifts past half the GPS error, calms the compass
- Arrival range is 2.5x the GPS error (20–50 m), shown as a ground circle
- Tests for the stabilizer, AR orientation and field of view

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 12:14:04 +03:30
co-authored by Claude Opus 5.5
parent 9564880783
commit 6ce560089f
9 changed files with 316 additions and 30 deletions
+5 -3
View File
@@ -92,10 +92,12 @@ export function createTraffic(scene, data, count = 28) {
car.model.group.visible = false;
return false;
}
const cars = [];
// All traffic sits in one group so it can be hidden as a whole (camera AR view).
const group = new THREE.Group(), cars = [];
scene.add(group);
for (let i = 0; i < count; i++) {
const model = createCarModel(COLORS[i % COLORS.length]);
scene.add(model.group);
group.add(model.group);
model.group.visible = false;
cars.push({model, road: null, d: 0, dir: 1, lane: 2.2, speed: 10, x: 1e9, z: 1e9});
}
@@ -141,5 +143,5 @@ export function createTraffic(scene, data, count = 28) {
for (const wheel of car.model.wheels) wheel.rotation.z -= speed * dt / .36;
}
}
return {cars, update, remove};
return {group, cars, update, remove};
}