Style Cookbook: Mix Your Own Art Style from Stackable Look Blocks
- Author
- claude-code @ auraAgent
- Opened
- Nov 8, 2026
- From
- contrib-ayxrpd1c
- Into
- main
- Merged
- Nov 8, 2026
What happened: in a world that updated starterBlocks (1.0.23 to 1.0.29) while the engine ran, every starterBlocks block in the stack (chunkyPixels, vignette, flatWash, plainPaper, softGrain...) silently drew nothing. StyleKit._status().lastError read 'shader not found: .../deps/<world>/versions/<old hash>/starterBlocks.package/blocks/vignette/vignette.shader'. The block registry lives in module state, so it survives the update: it still pointed every id at the old copy under deps/*/versions, whose shaders the engine no longer lists. The new copy did register, but _blockRegistered saw the id taken and renamed it 'starterBlocks.vignette', so StyleKit.block('vignette') kept answering with the dead path. Stacks loaded fine, describe() looked right, and the frame never changed.
Fix (StyleKit.module, StyleRuntime.module, version 1.4.16):
- _blockRegistered: a block registering from another copy of the SAME package replaces the old entry instead of being renamed. Two different packages that both ship an id still get the qualified name as before.
- M._rescan(): rebuild the registry from asset.list('styleBlock'): drop entries whose path is no longer listed, re-register listed blocks, and give a block that was only listed under its package-qualified name its own name back once that name is free.
- _render calls _rescan when the runtime reports 'shader not found', at most once every 5 s, so a live session heals without a restart.
- StyleRuntime.clearError() so the healed error stops being reported (and stops re-triggering the rescan).
Verified in Lantern Depths (styleKit 1.4.15): before, StyleKit.block('vignette').path pointed under deps/.../versions/70da40a9.../ and status.effects held only depthLine and ditherPalette. After one rescan the path is the current starterBlocks copy, effects hold all four blocks (chunkyPixels and vignette included), passes rose from 7 to 9, and presented captures show the vignette and the chunky pixels.
Not fixed here, for your judgement: the first time a stack uses a new effect, the presented frame is black (sometimes white) for one or more seconds while the engine builds that effect's pipeline. Registering the effect outside the render callback, or holding passes back for a few frames, did not help, so it looks engine side (pipelines are built on first use). Each new entry id makes a new effect name, so every look swap pays it once per session.
Source world: a8c98b5b-86a7-474c-9b7a-4a4eb6856130 Contributed paths:
- styleKit.package/StyleKit.module/init.luau
- styleKit.package/StyleRuntime.module/init.luau
- styleKit.package/package.yaml
- styleKit.package
- styleKit.package/StyleKit.module
- styleKit.package/StyleRuntime.module
- design/lookbook/pencil_blocks_motion_118.luau
- design/lookbook/pencil_lookbook_118.luau
- design/shots/pencilstage/marks_stay_put.luau
- design/shots/pencilstage/zoom_by_eye.luau
- inkBlocks.package/Gallery.scene/build.luau
- inkBlocks.package/package.yaml
- inkBlocks.package/tests/inkBlocks.testSuite/init.luau
- lookbookKit.package/Lookbook.module/init.luau
- lookbookKit.package/package.yaml
- lookbookKit.package/tests/lookbook.testSuite/init.luau
- paperBlocks.package/PaperGallery.module/init.luau
- paperBlocks.package/PaperGalleryLook.module/init.luau
- paperBlocks.package/PaperMaterial.module/init.luau
- paperBlocks.package/package.yaml
- paperBlocks.package/tests/paperBlocks.testSuite/init.luau
- pencilBlocks.package/PencilDrawn.component/init.luau
- pencilBlocks.package/PencilHero.module/init.luau
- pencilBlocks.package/package.yaml
- pencilBlocks.package/tests/pencilBlocks.testSuite/init.luau
- scenes/RecipeStage.module/init.luau
- starterBlocks.package/Gallery.scene/build.luau
- starterBlocks.package/package.yaml
- styleKit.package/StyleStack.component/init.luau
- styleKit.package/pigmentSet.assetType/behavior.luau
- styleKit.package/skills/styleKit.agentSkill/skill.yaml
- styleKit.package/styleBlock.assetType/behavior.luau
- styleKit.package/styleKit.toolbox/add.tool/init.luau
- styleKit.package/styleKit.toolbox/check.tool/init.luau
- styleKit.package/styleKit.toolbox/clear.tool/init.luau
- styleKit.package/styleKit.toolbox/list.tool/init.luau
- styleKit.package/styleKit.toolbox/remove.tool/init.luau
- styleKit.package/styleKit.toolbox/set.tool/init.luau
- styleKit.package/styleKit.toolbox/stack.tool/init.luau
- styleKit.package/styleKit.toolbox/swap.tool/init.luau
- styleKit.package/styleLook.assetType/behavior.luau
- styleKit.package/styleStack.renderFeature/init.luau
- styleKit.package/tests/styleKit.testSuite/init.luau
- toonBlocks.package/ToonBlocks.module/init.luau
- toonBlocks.package/ToonMaterial.module/init.luau
- toonBlocks.package/ToonOutlines.module/init.luau
- toonBlocks.package/package.yaml
- toonBlocks.package/tests/toonBlocks.testSuite/init.luau
- watercolorBlocks.package/Gallery.scene/build.luau
- watercolorBlocks.package/WatercolorHero.module/init.luau
- watercolorBlocks.package/package.yaml
- watercolorBlocks.package/tests/watercolorBlocks.testSuite/init.luau
6 files changed
- ChangedstyleKit.packageFolderBeforeAfter
- ChangedstyleKit.package/StyleKit.moduleFolderBeforeAfter
- ChangedstyleKit.package/StyleKit.module/init.luau53.4 KB → 55.6 KBBeforeAfter
- ChangedstyleKit.package/StyleRuntime.moduleFolderBeforeAfter
- ChangedstyleKit.package/StyleRuntime.module/init.luau50.3 KB → 50.4 KBBeforeAfter
- ChangedstyleKit.package/package.yaml1.3 KB → 1.3 KBBeforeAfter
Checks
No checks have been posted.
Reviews
No reviews yet.
Conversation
No comments yet.
Sign in to comment or review.