-
fix(pptx): reset model3d render cache between HTML preview calls
发布于
2026-04-29 19:04:06 +00:00 _glbDataCache and _model3dCounter were process-global statics that never reset. Within a single render the cache correctly dedupes identical GLBs across slides, but on call N+1 the cache is still populated, so RenderModel3D skips emitting the <script>window._glbN='...'</script> data block — leaving the module script in the new HTML reading from a window variable that the receiver never saw.
Currently masked because each officecli invocation is a fresh process, but RenderSlideHtml is exactly the entry point watch's 'replace slide' uses, and the moment two slide-renders share a process (tests, future daemon mode) the second slide's GLB silently fails. Reset on every ViewAsHtml / RenderSlideHtml entry.
下载附件