question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can not load .glTF file in three.js editor r82dev + GLTFLoader v2

See original GitHub issue
Description of the problem
  1. Access to following URL https://cdn.rawgit.com/mrdoob/three.js/dev/editor/index.html
  2. [File] - [Import] - [Duck.gltf] select Duck.gltf file on the desktop -> Can not load Duck.gltf. Following error has been displayed on the console.
three.min.js:150 THREE.WebGLRenderer 82dev
Storage.js:75 [22:07:15] Saved state to IndexedDB. 1.94ms
Loader.js:22 Loading Duck.gltf (191 KB) 100%
GLTFLoader.js:77 Synchronous glTF object access is deprecated. Use the asynchronous 'callback' argument instead.get scene @ GLTFLoader.js:77(anonymous function) @ Loader.js:168FileReader (async)Loader.loadFile @ Loader.js:173(anonymous function) @ Menubar.File.js:45
GLTFLoader.js:79 Uncaught ReferenceError: scene is not defined
    at Object.get scene [as scene] (https://cdn.rawgit.com/mrdoob/three.js/dev/examples/js/loaders/GLTFLoader.js:79:12)
    at FileReader.<anonymous> (https://cdn.rawgit.com/mrdoob/three.js/dev/editor/js/Loader.js:168:14)get scene @ GLTFLoader.js:79(anonymous function) @ Loader.js:168FileReader (async)Loader.loadFile @ Loader.js:173(anonymous function) @ Menubar.File.js:45
GLTFLoader.js:59 GLTFLoader: 130ms
GLTFLoader.js:67 Uncaught (in promise) TypeError: callback is not a function
    at https://cdn.rawgit.com/mrdoob/three.js/dev/examples/js/loaders/GLTFLoader.js:67:4
    at GLTFParser.<anonymous> (https://cdn.rawgit.com/mrdoob/three.js/dev/examples/js/loaders/GLTFLoader.js:813:3)(anonymous function) @ GLTFLoader.js:67(anonymous function) @ GLTFLoader.js:813Promise.resolve (async)_each @ GLTFLoader.js:593(anonymous function) @ GLTFLoader.js:1710Promise.resolve (async)_each @ GLTFLoader.js:593(anonymous function) @ GLTFLoader.js:1517Promise.resolve (async)_each @ GLTFLoader.js:593(anonymous function) @ GLTFLoader.js:1246Promise.resolve (async)_each @ GLTFLoader.js:593(anonymous function) @ GLTFLoader.js:955

In previous version (r81 + GLTFLoader v1) it will be displayed correctly. https://cdn.rawgit.com/mrdoob/three.js/master/editor/index.html

Three.js version
  • Dev
  • r81
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • Linux
  • Android
  • IOS
Hardware Requirements (graphics card, VR Device, …)

Windows 10 + ThinkPad X201 Intel HD Graphics

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:22 (20 by maintainers)

github_iconTop GitHub Comments

2reactions
donmccurdycommented, Feb 26, 2017

The original issue (RawShaderMaterial did not update correctly) has been fixed by #10851.

I think that re-assigning an object’s material should ‘just work’ (maybe also unset mesh.onBeforeRender?) but let’s open a new issue if there’s a problem there. GLTFLoader had been keeping an internal reference to these shaders, but isn’t anymore, so maybe that was the problem.

0reactions
cx20commented, Feb 27, 2017

I confirmed that it was fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to load any gltf file in three js/editor - Questions
here is my GLTF format file I have extract Zip file and want to load gltf in three js editor from local machine....
Read more >
[Be Solved]GLTF file can not load texture - three.js forum
when i used GLTFLoad() to load the gltf file,why can't load the texture. There is no error in the Console.I can find the...
Read more >
Cannot load .glTF file - Questions - three.js forum
hi all, I have an issue when load glTF file. Eventually, when I check the file using glTF viewer, this error comes: Validation...
Read more >
Bug - in GLTF LOADER - Questions - three.js forum
You are wrong, the editor can load a list of files, and even in the archive, the only problem is that the pictures,...
Read more >
GLTFLoader – three.js docs
GLTFLoader. A loader for glTF 2.0 resources. glTF (GL Transmission Format) is an open format specification for efficient delivery and loading of 3D...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found