freetoplay Posted August 10, 2018 Share Posted August 10, 2018 I want to load a file with the draco compression extension, I am doing something like this: BABYLON.SceneLoader.Append("https://rawgit.com/KhronosGroup/glTF-Sample-Models/master/2.0/Duck/glTF-Draco/", "Duck.gltf", scene, function (scene) { // do something } This works fine, but how do I know if the draco compression extension has been applied? The reason I am asking is the documentation for "append" accepts a parameter called pluginExtension, so I am not sure if I need to explicitly pass in the extension or it's done automatically. Quote Link to comment Share on other sites More sharing options...
brianzinn Posted August 10, 2018 Share Posted August 10, 2018 The draco compression extension is used automatically, if you have a v2 model. The loader v1 or v2 is chosen based on the file version: https://doc.babylonjs.com/how_to/gltf#full-version You can read more about the decoder here: https://doc.babylonjs.com/api/classes/babylon.dracocompression Use BABYLON.DracoCompression.DecoderAvailable to determine if the decoder is available for the current session. 16 minutes ago, freetoplay said: The reason I am asking is the documentation for "append" accepts a parameter called pluginExtension I think that's only if you want to override, because an appropriate loader will be used based on the file extension. ie: you can force a gltf loader on a file missing an extension: https://github.com/BabylonJS/Babylon.js/blob/master/src/Loading/babylon.sceneLoader.ts#L251 bghgary 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 10, 2018 Share Posted August 10, 2018 Thanks @brianzinn for the answer. Adding @bghgary to the thread if it requires more details. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.