mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2024-11-27 02:24:04 -05:00
Merge pull request #280 from CesiumGS/reduce-max-buffer-length
Don't merge buffers if final buffer exceeds fs.write maximum of `2147479552` bytes
This commit is contained in:
commit
81f6d539d3
@ -1,5 +1,9 @@
|
||||
# Change Log
|
||||
|
||||
### 3.1.5 - ????-??-??
|
||||
|
||||
- Fixed crash when writing GLB files above 2GB. [#280](https://github.com/CesiumGS/obj2gltf/pull/280)
|
||||
|
||||
### 3.1.4 - 2021-10-15
|
||||
|
||||
- Unlocked CesiumJS package now that CesiumJS 1.86.1 is released with a fix for Node 16. [#270](https://github.com/CesiumGS/obj2gltf/pull/270)
|
||||
|
@ -1,5 +1,7 @@
|
||||
"use strict";
|
||||
const BUFFER_MAX_BYTE_LENGTH = require("buffer").constants.MAX_LENGTH;
|
||||
const FS_WRITE_MAX_LENGTH = 2147479552; // See https://github.com/nodejs/node/issues/35605
|
||||
const BUFFER_MAX_LENGTH = require("buffer").constants.MAX_LENGTH;
|
||||
const BUFFER_MAX_BYTE_LENGTH = Math.min(FS_WRITE_MAX_LENGTH, BUFFER_MAX_LENGTH);
|
||||
const Cesium = require("cesium");
|
||||
const getBufferPadded = require("./getBufferPadded");
|
||||
const getDefaultMaterial = require("./loadMtl").getDefaultMaterial;
|
||||
|
Loading…
Reference in New Issue
Block a user