Bouton "📐 Agrandir la caméra à la zone visible"
Build and deploy / test-python (push) Failing after 1m23s
Build and deploy / test-js (push) Successful in 54s
Build and deploy / build-and-push (push) Skipped
Build and deploy / deploy (push) Skipped

Fait de tout le "monde" affiché par l'éditeur (la taille réelle d'un
"fond" plus grand que la scène nominale, voir routes/scenes/
scene_edit_view.py::world_width/world_height) la scène/caméra ELLE-MÊME
— jusqu'ici scene_width/scene_height n'étaient fixées qu'à la création
de l'écran, jamais modifiables ensuite. Le bouton n'apparaît que quand
un fond dépasse encore la scène nominale (même condition que le repère
"🎥 Champ de la caméra"), affiche la taille cible, recharge la page une
fois appliqué. La caméra ne recadre alors plus rien en jeu (monde ==
scène == viewport, voir personnage-controller.js::forgeUpdateSceneCamera).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
william
2026-09-03 17:07:24 +02:00
co-authored by Claude Sonnet 5
parent 14ec76dddd
commit b9d3c46087
7 changed files with 100 additions and 3 deletions
+10 -2
View File
@@ -29,8 +29,16 @@
tel quel pour l'éditeur document) a été retiré de CET éditeur à la
demande de l'utilisateur, en prévision d'un éditeur dédié aux scènes
2D (collision/périmètre -> action), pas encore construit. -->
<p class="hint" style="background:var(--panel); border:1px solid var(--border); border-radius:8px; padding:10px 14px; margin:10px 0;">
🎮 Jeu 2D — scène à taille fixe ({{ screen.scene_width }}×{{ screen.scene_height }} px).
<p class="hint" style="background:var(--panel); border:1px solid var(--border); border-radius:8px; padding:10px 14px; margin:10px 0; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;">
<span>🎮 Jeu 2D — scène à taille fixe ({{ screen.scene_width }}×{{ screen.scene_height }} px).</span>
{% if world_width > screen.scene_width or world_height > screen.scene_height %}
<!-- "📐 Agrandir la caméra à la zone visible" : fait de tout le
"monde" affiché (voir world_width/world_height, routes/scenes/
scene_edit_view.py) la scène/caméra elle-même — n'apparaît que si
un fond dépasse encore la scène nominale (voir "🎥 Champ de la
caméra" plus bas), inutile sinon. -->
<button type="button" class="button is-small" onclick="expandCameraToWorld({{ world_width }}, {{ world_height }})">📐 Agrandir la caméra à la zone visible ({{ world_width }}×{{ world_height }} px)</button>
{% endif %}
</p>
<div class="builder3" id="builder3">