Tourismustal: iPad-Runde 3 - Performance, Touch-Bauvorschau, breite Overlays
- Performance ohne Sichtverlust: Retina-Faktor auf 1.5 gecappt (~45 % weniger GPU-Pixel), Framerate auf ~30 fps (Pause ohne Interaktion ~10 fps) - Simulation exakt, uebersprungene Zeit wird akkumuliert. iPad sollte deutlich kuehler bleiben. - Touch-Bauvorschau: erster Tipp heftet die volle Vorschau (gruen/rot, Pisten-/Strecken-Korridor, Einflusskreise) an die Kachel, zweiter Tipp auf DIESELBE Kachel baut. Maus behaelt Hover + Sofortbau. - Info-Overlays breiter (680px statt 440px) - weniger Scrollen. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -125,7 +125,7 @@ function inspectBuilding(c, r) {
|
||||
});
|
||||
}
|
||||
|
||||
function onTileTap(c, r) {
|
||||
function onTileTap(c, r, pointerType) {
|
||||
// Ohne Bau-Werkzeug: Gebäude anklicken öffnet den Report
|
||||
if (!ui.activeBuild) {
|
||||
if (state.map[r]?.[c]?.building) inspectBuilding(c, r);
|
||||
@@ -133,6 +133,22 @@ function onTileTap(c, r) {
|
||||
}
|
||||
const type = ui.activeBuild;
|
||||
|
||||
// Touch (iPad): erster Tipp heftet die VORSCHAU an die Kachel (grün/rot,
|
||||
// Pisten-/Strecken-Korridor, Einflusskreis) – erst der zweite Tipp auf
|
||||
// DIESELBE Kachel baut. Mit Maus bleibt der Sofort-Bau (Hover zeigt ja).
|
||||
if (pointerType !== 'mouse') {
|
||||
const p = renderer.pendingTile;
|
||||
if (!p || p.c !== c || p.r !== r) {
|
||||
renderer.pendingTile = { c, r };
|
||||
if (!state.firedEvents.has('touch-build-hint')) {
|
||||
state.firedEvents.add('touch-build-hint');
|
||||
ui.toast('👆 Vorschau gesetzt – tippe dieselbe Stelle nochmal an, um zu bauen.', 5000);
|
||||
}
|
||||
return;
|
||||
}
|
||||
renderer.pendingTile = null;
|
||||
}
|
||||
|
||||
const check = canPlace(state, type, c, r);
|
||||
if (!check.ok) {
|
||||
// Ablehnung erklärt IMMER auch die Bauregeln des Gebäudes
|
||||
|
||||
Reference in New Issue
Block a user