This repository has been archived by the owner on Oct 20, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a glTF file is loaded directly from a server, outside any zip/gz archive, it is treated as text file instead of being parsed correctly as a JSON. Images are sometimes also not loaded correctly when loaded from loadImages() because fileloader.requestURI() would confuse it for a type 'arraybuffer'.
The error I get with gltf :
Unhandled rejection ReaderWriterGLTF.prototype.loadBuffers<@webpack:///./sources/osgPlugins/ReaderWriterGLTF.js?:251:25 r@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:31:9667 [19]</e.exports/e.method/<@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:30:4044 ReaderWriterGLTF.prototype.readJSON<@webpack:///./sources/osgPlugins/ReaderWriterGLTF.js?:1007:70 r@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:31:9667 [19]</e.exports/e.method/<@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:30:4044 readNodeURL/<@webpack:///./sources/osgPlugins/ReaderWriterGLTF.js?:1000:20 r@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:31:9667 [22]</e.exports/i.prototype._settlePromiseFromHandler@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:30:14825 [22]</e.exports/i.prototype._settlePromise@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:30:15628 [22]</e.exports/i.prototype._settlePromise0@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:30:16329 [22]</e.exports/i.prototype._settlePromises@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:30:17684 c@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:29:1555 a@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:29:1496 [2]</r.prototype._drainQueues@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:29:3106 r/this.drainQueues@http://localhost:9000/node_modules/bluebird/js/browser/bluebird.min.js:29:1236
The test case, to put in the "examples" folder
test-gltf-loading.zip