Efficiency: Release builds by default, only the visible island screen is built, character at 30 fps, adaptive mouse polling (60/30/10 Hz), hex colours parsed once
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -498,7 +498,9 @@ struct IslandContentView: View {
|
||||
.animation(.easeInOut(duration: 0.2), value: state.view == .confused)
|
||||
|
||||
ZStack {
|
||||
ForEach(IslandView.allCases, id: \.self) { v in
|
||||
// Only the visible screen is built (plus the chat, to keep its draft and
|
||||
// scroll): hidden screens used to keep their animations and timers running.
|
||||
ForEach(IslandView.allCases.filter { $0 == state.view || $0 == .prompt }, id: \.self) { v in
|
||||
let active = state.view == v
|
||||
// Views that fill available height instead of the fixed 98pt content frame:
|
||||
// chat (prompt) is always flexible; mail is flexible only when active so
|
||||
@@ -514,6 +516,7 @@ struct IslandContentView: View {
|
||||
.opacity(active ? 1 : 0)
|
||||
.scaleEffect(active ? 1 : 0.97)
|
||||
.allowsHitTesting(active)
|
||||
.transition(.opacity)
|
||||
.animation(anim, value: state.view)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user