fix(core): 移除fflate依赖,修复TextEncoder兼容性问题 (#217)

* fix(core): 移除fflate依赖,修复TextEncoder兼容性问题

* fix(core): 移除fflate依赖,修复TextEncoder兼容性问题
This commit is contained in:
YHH
2025-11-07 12:10:52 +08:00
committed by GitHub
parent e03b106652
commit 3512199ff4
5 changed files with 233 additions and 27 deletions

View File

@@ -559,15 +559,7 @@ describe('ECS Serialization System', () => {
// 验证是Uint8Array类型
expect(binaryData instanceof Uint8Array).toBe(true);
// JSON序列化对比
const jsonData = scene1.serialize({ format: 'json', pretty: false });
// 二进制应该更小
const binarySize = (binaryData as Uint8Array).length;
const jsonSize = (jsonData as string).length;
console.log(`Binary size: ${binarySize} bytes, JSON size: ${jsonSize} bytes`);
expect(binarySize).toBeLessThan(jsonSize);
expect((binaryData as Uint8Array).length).toBeGreaterThan(0);
// 新场景反序列化二进制数据
const scene2 = new Scene({ name: 'LoadTest' });