← Commit history

Require Babylon engine frame lifecycle for memory-safe on-demand rendering

John Lauer ·99e031770b ·1mo ago ·parent 899e394
3 files changed +4−2
package.json+1−1
@@ -1,7 +1,7 @@ {   "slug": "adom-wiki-skillpack",   "title": "Adom Wiki Skill Pack",-  "version": "0.8.8",+  "version": "0.8.9",   "type": "skill",   "hero": {     "path": "screenshots/hero.png"
page.json+1−1
@@ -121,7 +121,7 @@       "prompt": "Before I create this wiki page, check whether the thing already has a home."     }   ],-  "version": "0.8.8",+  "version": "0.8.9",   "description": "The Adom Wiki Skill Pack \u2014 one main skill plus the focused sub-skills that teach the AI to publish to wiki.adom.inc without breaking pages, name the wiki repo archetypes (Page, Skillpack, Family), and publish rich component pages (chips, molecules, boards). The wiki is six tools in one: git, package manager, releases, discussions, pull requests, and discovery. One package manager install drops the whole set onto your container.",   "dependencies": {     "adom/adom-wiki-hero-image": "^0.2.2",
skills/wiki-component-lod/references/runtime.md+2
@@ -16,6 +16,8 @@ Selection, residency and rendering are separate controls: - An asset cache decides what is downloaded/decoded and resident. Evict inactive expensive levels by a documented budget/LRU policy. Dispose unused GPU buffers, textures, materials and asset containers only when no instance needs them. Keep the super-low fallback available. Removing a mesh from the view is not proof that memory was freed. - A render scheduler draws only when there is motion, interaction, changing telemetry or an invalidated view. Stop hidden/offscreen views and idle render loops. Cap active frame rate appropriately for a CAD work surface, and resume on pointer/camera changes, resizing or real animation. Pause background recording/rendering when the user reports slowdown. +When replacing Babylon's `engine.runRenderLoop` with an on-demand scheduler, preserve the engine frame lifecycle: `engine.beginFrame(); try { scene.render(); } finally { engine.endFrame(); }`. Calling only `scene.render()` leaves the engine frame counter unchanged in the tested integration. ObjectRenderer then keeps allocating per-frame scene uniform buffers for shadow/highlight passes instead of resetting their reuse index. This bug can survive perfect component-cache eviction tests. Check engine frame advancement and live WebGL buffer counts across repeated interaction, not only the app's asset registry. Do not patch the shared installed viewer to fix one app; change and validate the app-owned scheduler, then report reusable improvements to the owning project.+ Choose explicit startup, resident-memory, triangle, draw-call, texture and concurrent-load budgets for the actual deployment. Report limits and observations to the AI. Do not label an estimate as measured GPU memory. Include loaded level per reference, in-flight requests, cache hits, resident asset counts/bytes, evictions, scene mesh/primitive counts, frame timing and render-paused state in a read-only diagnostic endpoint. Budget refusal should explain what to reduce or regenerate; never silently drop expected chips or hide lost markings as a performance fix.  Runtime/source version, generated assets, installed package and painted UI are separate evidence. Do not claim streaming/eviction works merely because `addLODLevel` was called.