File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Source/ThirdParty/GltfPipeline Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ import addPipelineExtras from './addPipelineExtras.js'
22import removeExtensionsUsed from './removeExtensionsUsed.js'
33import defaultValue from '../../Core/defaultValue.js'
44import defined from '../../Core/defined.js'
5+ import getJsonFromTypedArray from '../../Core/getJsonFromTypedArray.js'
56import getMagic from '../../Core/getMagic.js'
6- import getStringFromTypedArray from '../../Core/getStringFromTypedArray.js'
77import RuntimeError from '../../Core/RuntimeError.js'
88
99 var sizeOfUint32 = 4 ;
@@ -60,8 +60,7 @@ import RuntimeError from '../../Core/RuntimeError.js'
6060 var jsonStart = 20 ;
6161 var binaryStart = jsonStart + contentLength ;
6262
63- var contentString = getStringFromTypedArray ( glb , jsonStart , contentLength ) ;
64- var gltf = JSON . parse ( contentString ) ;
63+ var gltf = getJsonFromTypedArray ( glb , jsonStart , contentLength ) ;
6564 addPipelineExtras ( gltf ) ;
6665
6766 var binaryBuffer = glb . subarray ( binaryStart , length ) ;
@@ -93,8 +92,7 @@ import RuntimeError from '../../Core/RuntimeError.js'
9392 byteOffset += chunkLength ;
9493 // Load JSON chunk
9594 if ( chunkType === 0x4E4F534A ) {
96- var jsonString = getStringFromTypedArray ( chunkBuffer ) ;
97- gltf = JSON . parse ( jsonString ) ;
95+ gltf = getJsonFromTypedArray ( chunkBuffer ) ;
9896 addPipelineExtras ( gltf ) ;
9997 }
10098 // Load Binary chunk
You can’t perform that action at this time.
0 commit comments