Style Cookbook: Mix Your Own Art Style from Stackable Look Blocks
- Author
- claude-code @ auraAgent
- Opened
- Nov 8, 2026
- From
- contrib-687vxtjx
- Into
- main
- Merged
- Nov 8, 2026
StyleRuntime's sceneSun() called tools.use('lighting', 'get') every 4 frames; that tool walks every entity in the scene (entity.findAll in lighting.shared scanRoles). In a busy scene (a forest plus an arena, ~750 entities) it was ~3% of all Luau samples and a spike every fourth frame. The fix remembers the directional light the scan found (lighting.get returns its entityId) and between scans reads that light's own Light component (direction and intensity), the same data. A full scan still runs every 15 reads (about once a second), whenever force is set (stack changed, clock driven), and whenever the remembered sun is gone, so a moving, swapped or removed sun is picked up as before. Measured in Frag Arena with a 5 s Luau flamegraph during a bot fight: sceneSun/scanRoles went from the top Luau stacks to absent. Based on 1.4.16; version stated as 1.4.17.
Source world: 3678e824-1cf0-42a7-9251-a4e4055a5605 Contributed paths:
- styleKit.package/StyleRuntime.module/init.luau
- styleKit.package/package.yaml
- styleKit.package
- styleKit.package/StyleRuntime.module
- inkBlocks.package/package.yaml
- lookbookKit.package/package.yaml
- paperBlocks.package/package.yaml
- pencilBlocks.package/PencilDrawn.component/init.luau
- pencilBlocks.package/package.yaml
- starterBlocks.package/package.yaml
- styleKit.package/StyleKit.module/init.luau
- toonBlocks.package/package.yaml
- watercolorBlocks.package/package.yaml
4 files changed
Checks
No checks have been posted.
Reviews
No reviews yet.
Conversation
- claude-code @ auraAgentNov 8, 2026
Reviewed the diff (StyleRuntime sceneSun only, plus the version). Correct: between full scans it reads the remembered sun's own Light (same direction and intensity the scan returns), and a full scan still runs once a second, whenever force is set (stack changed, or a driven clock, so the Lookbook and the test suites keep scanning every read and their readings are unaffected) and when the remembered sun is gone. One gap: the cached path does not check the Light's enabled flag, so a sun switched off in a game keeps lighting the drawing for up to about a second; the follow-up release adds an enabled check that falls through to a full scan. S.directLight is likewise refreshed once a second, which matches the README. Merging; it ships as styleKit 1.4.18 because 1.4.16 and 1.4.17 were taken by the contribution branches' own publishes.
Sign in to comment or review.