Style Cookbook: Mix Your Own Art Style from Stackable Look Blocks
README.md
ChannelProbe (module)
A test helper for block authors: measures what one object's style channel does to the picture. ChannelProbe.with(entries, fn, opts) builds a small lit set of its own (a floor, a pale wall, one subject box in the middle of the frame and a camera looking at it), loads the stack entries, and calls fn(sample); sample(fields) gives the subject a channel with those fields (nil for none), waits for the presented frame to settle and answers the mean colour of the subject's part of the frame { r, g, b, luma, chroma }. The stack, the role set, the camera and the set are put back afterwards. ChannelProbe.diff(a, b) is the largest channel gap between two samples. The test suites of toonBlocks, inkBlocks, watercolorBlocks, paperBlocks and pencilBlocks use it to check that each block honours line weight, marks and value.
local Probe = require("~styleKit.ChannelProbe")
Probe.with({ { id = "line", block = "depthLine" } }, function(sample)
local plain, heavy = sample(nil), sample({ line = 3 })
assert(heavy.luma < plain.luma - 1)
end)
Known limits
- Two engines on one account join as one player, so a two-player check needs two accounts or two machines (#14448).
- A world boot can wait about 30 s on a network handshake before any content starts (#24669).
- The web build was not checked from here (#20946).
The package README's Known limits lists the rest.