feat(core)!: simplify Scene model — remove scene stack (#11)#139
Merged
Conversation
v0.14 Phase 4A, PR2 of 2 (BREAKING). Completes the Scene-stack simplification
that the UI-Core (PR1) unblocked.
BREAKING CHANGES:
- Removed the scene stack: SceneManager.pushScene/popScene/scenes +
PushSceneOptions/PopSceneOptions are gone. One active scene; switch with
app.scene.setScene(scene, { transition }) (fade preserved).
- Removed Scene participation: SceneStackMode, scene.stackMode,
SceneParticipationPolicy, scene.setParticipationPolicy.
- New: scene.paused — skips the scene update() + systems while it keeps
drawing (the freeze / former "modal" replacement). Overlays/HUDs/menus live
on scene.ui (PR1).
Migration: overlay/HUD scenes -> widgets on scene.ui; pause (push+pop) ->
scene.paused + a scene.ui overlay. Examples (pause-blur, hud-overlay-scene,
pause-and-resume) and 5 guides migrated; new "UI & widgets" guide added.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v0.14 Phase 4A — Scene-stack simplification, PR 2 of 2 (BREAKING). Completes the #11 work that UI-Core (PR1 #138) unblocked.
Breaking changes
SceneManager.pushScene/popScene/scenes+PushSceneOptions/PopSceneOptionsare gone. There is now one active scene; switch withapp.scene.setScene(scene, { transition })(the fade transition is preserved).SceneStackMode,scene.stackMode,SceneParticipationPolicy,scene.setParticipationPolicy.scene.paused— skips the scene'supdate()+ systems each frame while it keeps drawing. This is the replacement for "freeze the game behind a menu" (the formermode: 'modal'). Overlays, HUDs and menus live onscene.ui(added in PR1).Migration
pushScene(hud, { mode: 'overlay' })scene.uipushScene(pause)+popScene()scene.paused = true+ ascene.uioverlaypushScene(next, { mode: 'opaque' })app.scene.setScene(next, { transition })Migrated:
scene-manager.test.ts, examplespause-blur/hud-overlay-scene/pause-and-resume, and 5 guides (scenes-and-lifecycle, keyboard-and-actions, recipes/hud-overlay, recipes/cinematics, recipes/pause-menu). New "UI & widgets" guide added.All CI-only gates green locally (
pnpm test3263, typecheck, lint:all, format:check, typecheck:examples/guides, docs:api:check, root-index, guide-structure).