Rune and Ember: The Fantasy and Magic Material Collection
README.md
FantasyShowcase
The Rune and Ember dressing of materialLibraryKit's swatch gallery. It opens the gallery on the page holding every fantasy material on one ring, hangs each material's generated reference picture in a dark frame on its bay wall, lays each fantasy bay's floor tile and wall out in metres (so every material shows at its real size), and sets every fantasy plaque on one shared label grid (same rows, heights and text sizes, so the labels line up bay to bay and read from the spawn): name, then kind and style, tile size and texture memory, roughness and metal ranges, and whether it glows, moves or is see-through. In front of each glowing material's swatches it stands a FantasyGlowLight in the glow's colour (from FantasyGallery.GLOW_LIGHTS).
Two ways to use it. With driveGallery on, put it alone on the gallery entity: it does what the library's SwatchGallery does (lighting look, view, shared state, toolbar and picker, name tags) but builds the gallery once, straight onto the fantasy page, which is what lets this world's gallery come up within the browser's start-up limit. With driveGallery off, put it beside a SwatchGallery and it only dresses (it builds only if the gallery is not already on the fantasy page).
Fast and self-healing. Dressing runs three bays a frame. Plaques, trim, floor tiles and walls of the fantasy bays get this component's own runtime meshes and materials. Once a second, in play and in edit mode alike (paused or not), it checks every fantasy bay: each of its four runtime-built pieces must stand on the current, live mesh and material (renderer.mesh.isResident / onDevice, renderer.material.describe, microseconds each). A stale piece gets its bay re-dressed with fresh resources; missing pieces, missing bays or a gallery that is gone get the gallery rebuilt; a bay whose board went missing gets it back. So whatever a test run (from this package's suite or any other), a scene reload or a released resource leaves behind is repaired within a second or two, with no rebuild flag needed. While FantasyGallery.holdGalleryUntil is in the future (the test suite sets it for up to 30 s per test) it stands down, so it does not rebuild in the middle of a test.
Local to each machine; the exhibit, lighting look and applied materials stay shared through the library. Fields: openOnFantasy, showReferences, glowLights, driveGallery, lighting, showHud. Forked from scifiMaterials' ScifiShowcase (Hull and Hologram, MIT).