Decoder not Load in Cdn
We are seeing the same issue on https://framevr.io - both ktx & draco decoders failing to load from Babylon CDN
GET https://cdn.babylonjs.com/draco_decoder_gltf.wasm net::ERR_CONNECTION_REFUSED
Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://cdn.babylonjs.com/babylon.ktx2Decoder.js' failed to load.
Also looks like https://doc.babylonjs.com/ is down
I think it’s more wide spread, https://assets.babylonjs.com/ is down too
Yes Azure outage. We unfortunately have to wait ![]()
You can use a local draco decoder:
https://dtggmezgs0e95.cloudfront.net/confi-demo/draco_decoder_gltf.wasm
https://dtggmezgs0e95.cloudfront.net/confi-demo/draco_wasm_wrapper_gltf.js
You can find the needed .js and .wasm files in the BabylonJS Addons module.
It would be in the node_modules/@babylonjs/core/assets/Draco folder.
@Deltakosh We’re working on bringing the decoders in house. Can you provide any guidance on how to configure the source url for the ktx decoder? We’re struggling due to the docs page also being down.
We have an error from trying to load the ktx decoder from CDN which is being imported in a WebWorker from this line of bjs source: Babylon.js/packages/dev/core/src/Misc/khronosTextureContainer2Worker.ts at ff1b476f06d6e5d357fdd82467e8809788327faa · BabylonJS/Babylon.js · GitHub
For Draco, we have it fixed like so, after copying the files from node_modules/@babylonjs/core/assets/Draco (and we already have webpack config to treat these as external resources).
import { DracoDecoder } from "@babylonjs/core";
import DracoWasmUrl from "@webapp/vendor/draco/draco_wasm_wrapper_gltf";
import DracoWasmBinaryUrl from "@webapp/vendor/draco/draco_decoder_gltf.wasm";
import DracoWasmFallbackUrl from "@webapp/vendor/draco/draco_decoder_gltf.js";
DracoDecoder.DefaultConfiguration = {
wasmUrl: DracoWasmUrl,
wasmBinaryUrl: DracoWasmBinaryUrl,
fallbackUrl: DracoWasmFallbackUrl,
};
adding @alexchuber for KTX ![]()
If you’re bringing the whole CDN in-house (probably not, but just in case), you can change the base URL for all resources loaded by Babylon:
BABYLON.Tools.ScriptBaseUrl = "https://my.wonderfull.server";
If you’re just bringing in the KTX2 codecs, see Documentation/content/setup/frameworkPackages/CDN.md at 128eb8d0b6e4441795bb5d28892aa737cf15145e · BabylonJS/Documentation · GitHub
If you need to also configure the workers, see Documentation/content/setup/frameworkPackages/es6Support.md at 128eb8d0b6e4441795bb5d28892aa737cf15145e · BabylonJS/Documentation · GitHub
Getting the same error on many of the sites using gltf, lesson learned, thanks for sharing how to update asset locations. Maybe there’s a way to have failsafe also on BJS level? Like if 404, load from some other CDN… Just thinking ![]()
Ok azure is back online folks. We should be good
thanks @Deltakosh
