antonio-gomez / three-gltf2-loader

Node.js wrapper for the GLTF2Loader library from Three.js
https://threejs.org/examples/?q=glt#webgl_loader_gltf
MIT License
10 stars 9 forks source link

Version 1.2 breaking change #4

Open jgwinner opened 6 years ago

jgwinner commented 6 years ago

In version 1.1, the loader is defined as:

THREE.GLTF2Loader = ( function () {

In version 1.2, the loader is defined as:

THREE.GLTFLoader = ( function () {

This is a huge breaking change. React-vr and react-vr-web both use THREE.GLTF2Loader, so gltf files now won't load in React VR at all. There is no workaround, other than to downgrade to 1.1.0. I'm also following up with React VR.

Was there a reason for this change?

Will the rename be permanent? Seems odd as GLTF2 files are more common now than GLTF1.

Also, I notice the GLTFSHADER seems to have disappeared; that seems drastic - did it move somewhere? What's it for?

Thank you,

== John ==

donmccurdy commented 6 years ago

Hi @jgwinner — note that this repo is a mirror of the GLTF(2)Loader file from the three.js repository — you're more likely to get answers promptly on issues/questions/bugs by posting there instead.

Was there a reason for this change? Will the rename be permanent?

three.js is deprecating glTF 1.0 support, and that loader has been renamed to THREE.LegacyGLTFLoader. Since glTF 2.0 is more common and preferred, we've renamed it GLTFLoader to indicate it's the default, and to hopefully avoid the need to rename with glTF 2.X, 3.X, etc. The name will remain GLTFLoader.

Also, I notice the GLTFSHADER seems to have disappeared; that seems drastic - did it move somewhere? What's it for?

glTF 1.0 had a mechanism for transmitting custom GLSL shaders with a model, which was visually flexible but prevented models from rendering in many native applications. glTF 2.0 replaced that with modern PBR materials, and will (later) support custom GLSL through a glTF extension called KHR_technique_webgl. That extension hasn't been finished, so we've removed the related code from the glTF 2.0 loader in the meantime.