Skip to content

支持预留cubism core堆内存容量配置,避免堆扩容破坏在场的Live2D立绘 - #1042

Merged
MakinoharaShoko merged 2 commits into
OpenWebGAL:devfrom
TremblingMoeNew:fix/reserve-cubism-memory
Oct 3, 2026
Merged

MakinoharaShoko merged 2 commits into
OpenWebGAL:devfrom
TremblingMoeNew:fix/reserve-cubism-memory

Conversation

@TremblingMoeNew

Copy link
Copy Markdown
Contributor

#1040
OpenWebGAL/pixi-live2d-display-webgal#16

由于Cubism Web SDK实现上的问题,当载入的Live2D立绘的内存总占用达到一定限度、触发了Emscripten堆扩容时,已载入的立绘将无法正常更新。具体的问题原理解释,见pixi-live2d-display-webgal#16的描述。

该改动通过PLDW提供的内存预留API,允许提前为Live2D预留更大的Emscripten堆内存空间。这将在一定程度上增大项目的内存占用。默认的堆空间提升至32MB,一般情况下足够满足正常演出所需。

同时,提供config.txt中的新配置项Cubism_Memory_Reserved_Size_MB,类型为number,单位为MiB,允许用户为项目自定义配置cubism core堆内存预留容量,支撑更多live2d模型的显示需要。

@MakinoharaShoko
MakinoharaShoko merged commit 4e33cb5 into OpenWebGAL:dev Oct 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants