Experiment: SpriteKit atmosphere layer#1
Open
testtest126 wants to merge 2 commits into
Open
Conversation
…licker) Additive-only visual prototype to feel whether SpriteKit adds dread beyond plain SwiftUI. AtmosphereScene (SKScene) is a pure decoration layer with no state, no sensors, and no knowledge of consent/EyeSession; AtmosphereBackground bridges it into SwiftUI via SpriteView and sits behind the existing title/ consent UI in LULLApp's RootView. Also sets INFOPLIST_KEY_UILaunchScreen_Generation so the simulator renders full-screen instead of letterboxed (pre-existing gap in project.yml, unrelated to the scene itself but needed to actually see it). LULLKit untouched, 16/16 tests green.
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.
What this is
A prototype, not a decision. Goal: let Yakiv feel whether SpriteKit adds
dread that plain SwiftUI/Core Animation can't, before we commit to it as a
dependency of LULL's real fear mechanics.
What's in it
app/Sources/AtmosphereScene.swift— anSKScenethat is pure decoration:slow drifting fog (
SKEmitterNode), faint upward dust motes, a staticvignette (generated radial-gradient texture, no shader), a slow breathing
red glow, and a rare, brief flicker. Dark palette matched to
Theme.swiftby eye (duplicated locally, not imported — so this file stays liftable/
deletable without touching the app's shared theme).
app/Sources/AtmosphereBackground.swift— bridges the scene into SwiftUIvia
SpriteView.app/Sources/LULLApp.swift— one-line swap:Theme.ink.ignoresSafeArea()→
AtmosphereBackground()as the base layer inRootView'sZStack, so itsits behind the existing title/consent UI and composes with it (proven in
the screenshots below — text and buttons render normally on top).
app/project.yml— addedINFOPLIST_KEY_UILaunchScreen_Generation: YES.Unrelated to SpriteKit itself: the app was rendering letterboxed in the
simulator for lack of a launch screen, a pre-existing gap. Needed this to
actually see the atmosphere full-screen.
What this is not
LULLKit, the consent ledger,EyeSession, or the camerapipeline.
AtmosphereSceneholds no state and reaches no sensor.ConsentView/EyeView/GameModelare untouched; this isstrictly an additive background layer.
Verification
swift testinLULLKit: 16/16 green, unchanged.xcodegen generate+xcodebuildfor iphonesimulator: builds clean.by the requester separately (SpriteKit's
SKViewneeds a live GPU context,can't easily attach here) — the atmosphere layer renders full-screen behind
the consent title, with a visibly breathing glow and vignette.
Honest read
Worth a look before merging any direction: does the dread read as "SpriteKit
justified itself" or "this could've been three
SwiftUITimelineView/Core Animation layers for less complexity and no new framework surface to
learn"? My instinct after building this — restrained particle/glow work like
this is well within reach of
Canvas/TimelineView+Core Animation, andSpriteKit's advantage would show up more once there's actual interactivity
(things reacting to touch/face/time in real-time, physics, sprite-sheet
animation) rather than ambient decoration. Ambient-only, I'd lean SwiftUI to
keep the surface area small — but SpriteKit is a lot less awkward for this
than I expected, so if
THE EYE's escalation ever wants particle reactionstied to the camera signal, it's a reasonable investment.
🤖 Generated with Claude Code