The battery pass: paint less, wake less
- opaque canvas: the compositor stops alpha-blending 2.5Mpx at 60Hz - settled modals and the death summary idle at 20-24 fps; play untouched - TUNE.lowPower caps RES at 3 (-44% pixels/frame), flippable live Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
911035af00
commit
3b6a82c97d
6 files changed
+43
-4
No files matched your search
@@ -1,3 +1,6 @@
|
||||
// Canvas handles — imported by everyone, imports nothing (keeps module cycles harmless).
|
||||
export const cv = document.getElementById('c');
|
||||
export const ctx = cv.getContext('2d');
|
||||
// alpha:false — render() clears the whole frame to an opaque colour anyway, so declaring the canvas
|
||||
// opaque lets the compositor skip blending a 2.5-megapixel layer 60 times a second (battery, not
|
||||
// looks). desynchronized is a further no-op-where-unsupported compositor shortcut (Chrome).
|
||||
export const ctx = cv.getContext('2d', { alpha: false, desynchronized: true });
|
||||
Reference in new issue
Block a user