Shader assets: graph-built shaders, the Shader tab and sprite rows from the graph (#62)
game-maker / suite (push) Failing after 3m59s

A shader is an asset carrying a node graph (Texture color, Output, Property,
Color, Add/Subtract/Multiply/Divide, Mix, Luminance) that compiles to the GLSL
fragment of a Pixi filter. The Shader tab reuses the Behavior canvas; a sprite
wears a shader through its Shader picker, and the rows below it are the
graph's Property nodes. Property schema, resolution and deviation take the
project because a sprite's rows now live in another asset. The built-in
registry of the prototype is gone; "Adjust colors" ships as a graph in the
fixture and the three example games.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Fable 5.1 committed 2026-09-12 22:41:14 +02:00
1 parent 6141d07d4f
commit 42cafa7543
62 files changed
+1682 -144

No files matched your search

+6 -6
View File
@@ -67,15 +67,15 @@ describe('asset deviation', () => {
it('marks an asset only once a property really differs from its default', () => {
const f = makeAsset('sprite', 'Box');
expect(assetDeviates(f.asset())).toBe(false);
expect(assetDeviates(f.project, f.asset())).toBe(false);
// Written, but the default value – the inspector shows no gold, so neither does the list.
f.stack.execute(new SetAssetPropertyCommand(f.assetId, 'width', 100));
expect(f.asset().props.width).toBe(100);
expect(assetDeviates(f.asset())).toBe(false);
expect(assetDeviates(f.project, f.asset())).toBe(false);
f.stack.execute(new SetAssetPropertyCommand(f.assetId, 'width', 250));
expect(assetDeviates(f.asset())).toBe(true);
expect(assetDeviates(f.project, f.asset())).toBe(true);
f.stack.execute(new ResetAssetPropertyCommand(f.assetId, 'width'));
expect(assetDeviates(f.asset())).toBe(false);
expect(assetDeviates(f.project, f.asset())).toBe(false);
});
it('leaves a behavior unmarked for its variables, which the inspector does not mark either', () => {
@@ -83,8 +83,8 @@ describe('asset deviation', () => {
f.stack.execute(new AddVariableCommand(f.assetId, 'speed', 'number'));
f.stack.execute(new SetAssetPropertyCommand(f.assetId, 'speed', 42));
expect(f.asset().props.speed).toBe(42);
expect(assetDeviates(f.asset())).toBe(false);
expect(assetDeviates(f.project, f.asset())).toBe(false);
f.stack.execute(new SetAssetPropertyCommand(f.assetId, 'enabled', false));
expect(assetDeviates(f.asset())).toBe(true);
expect(assetDeviates(f.project, f.asset())).toBe(true);
});
});