Shader library: fingerprint without node positions, a drag no longer recompiles (#65)
game-maker / suite (push) Successful in 9m5s
game-maker / suite (push) Successful in 9m5s
shaderFingerprint(graph) covers node id/type/params/ports and edge endpoints only; x/y, collapsed, folded and edge ids stay out. ShaderLibrary keys on it and counts compiles (__gm.shaderCompiles()). Measured before: one compile per preview step of a node drag (12 for a harness drag); after: 0, a param change exactly +1. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
016e83c9b5
commit
102a649a35
6 files changed
+82
-6
No files matched your search
@@ -415,6 +415,8 @@ export function installDebugHook(app: Application, state: EditorState, editor: E
|
||||
},
|
||||
/** Holds the shader clock at `at` seconds, so a Time shader's pixels can be measured; null releases it. */
|
||||
shaderTime: (at: number | null) => shaderLibrary.freezeTime(at),
|
||||
/** Graphs compiled so far; a moved node must not add one (#65). */
|
||||
shaderCompiles: () => shaderLibrary.compiles,
|
||||
/** Which views redraw every tick because a Time shader is on screen. */
|
||||
animates: () => ({ scene: viewport.animates, game: gameView.animates }),
|
||||
lowLatency: () =>
|
||||
|
||||
Reference in new issue
Block a user