加载大型glb模型出现错误
-
加载大型glb模型出现错误
orillusion.umd.js:57 Error allocating matrix: out of memory! (Max:1000, Cur:15114)
orillusion.umd.js:57代码:
const gt = 3.141592653589793
, Z = class {
constructor(t=!0) {
s(this, "index", 0);
s(this, "offset", 0);
s(this, "shareBytes");
s(this, "_positon");
s(this, "rawData");
t ? this.rawData = new Float32Array(16) : (Z.useCount >= Z.count && console.error("Error allocating matrix: out of memory! (Max:%d, Cur:%d)", Z.count, Z.useCount),
this.index = Z.useCount,
this.offset = Z.useCount * Z.blockBytes + Z.wasmMatrixPtr,
Z.useCount++,
this.shareBytes = Z.MatrixBytes,
this.rawData = new Float32Array(Z.MatrixBytes.buffer,this.offset,16)),
this._positon = new m
} -
-
Engine3D.setting.memory.doMatrixMaxCount = 100000;
我设置了这个后,上面错误没有了,但是页面崩溃。 加载小的glb文件没有问题,大的20M的就崩溃。