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:
maksarsanjeev
2026-10-07 23:13:47 +03:00
parent 91878fa2e3
commit dc47247340
5 changed files with 48 additions and 9 deletions
+3 -2
View File
@@ -14,7 +14,8 @@ struct BotCanvasView: View {
@State private var fader = MemojiFader()
var body: some View {
TimelineView(.animation(paused: state.mode == .hidden)) { timeline in
// 30 fps is plenty for the character (the display would drive 120 on ProMotion).
TimelineView(.animation(minimumInterval: 1.0 / 30.0, paused: state.mode == .hidden)) { timeline in
Canvas { context, size in
let now = timeline.date.timeIntervalSinceReferenceDate
let dtRaw = min(0.05, now - engine.lastTime)
@@ -191,7 +192,7 @@ struct MiniBotCanvasView: View {
}
var body: some View {
TimelineView(.animation) { timeline in
TimelineView(.animation(minimumInterval: 1.0 / 30.0)) { timeline in
Canvas { context, size in
let now = timeline.date.timeIntervalSinceReferenceDate
let dt = min(0.05, now - engine.lastTime)