File tree Expand file tree Collapse file tree 2 files changed +33
-7
lines changed
src/service/record/main/memory Expand file tree Collapse file tree 2 files changed +33
-7
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " wonder.js" ,
3
- "version" : " 1.1.0-alpha.7 " ,
3
+ "version" : " 1.1.0-alpha.8 " ,
4
4
"authors" : " Wonder" ,
5
5
"description" : " 3d webgl engine" ,
6
6
"homepage" : " https://github.com/Wonder-Technology/Wonder.js" ,
Original file line number Diff line number Diff line change 1
1
let isDisposeTooMany = (disposeCount: int , settingRecord) =>
2
2
disposeCount >= MemorySettingService . getMaxDisposeCount(settingRecord);
3
3
4
- let isGeometryBufferNearlyFull =
5
- (percent , {vertices , verticesOffset} : GeometryType . geometryRecord ) => {
6
- let totalVerticesLength = vertices |> Js . Typed_array . Float32Array . length ;
4
+ let _isGeometryPointsNearlyFull = (percent , totalPointsLength , pointsOffset) =>
5
+ (pointsOffset |> NumberType . convertIntToFloat)
6
+ /. (totalPointsLength |> NumberType . convertIntToFloat) >= percent ;
7
7
8
- (verticesOffset |> NumberType . convertIntToFloat)
9
- /. (totalVerticesLength |> NumberType . convertIntToFloat) >= percent;
10
- };
8
+ let isGeometryBufferNearlyFull =
9
+ (
10
+ percent,
11
+ {
12
+ vertices,
13
+ indices16,
14
+ indices32,
15
+ verticesOffset,
16
+ indices16Offset,
17
+ indices32Offset,
18
+ }: GeometryType . geometryRecord ,
19
+ ) =>
20
+ Js . Typed_array . (
21
+ _isGeometryPointsNearlyFull(
22
+ percent,
23
+ vertices |> Float32Array . length,
24
+ verticesOffset,
25
+ )
26
+ || _isGeometryPointsNearlyFull(
27
+ percent,
28
+ indices16 |> Uint16Array . length,
29
+ indices16Offset,
30
+ )
31
+ || _isGeometryPointsNearlyFull(
32
+ percent,
33
+ indices32 |> Uint32Array . length,
34
+ indices32Offset,
35
+ )
36
+ );
You can’t perform that action at this time.
0 commit comments