Hi everyone,
I’ve created a playable ad that works perfectly on all ad platforms, but when I upload it to
https://adsmanager.facebook.com/adsmanager
the GLTFLoader fails to work and throws the following error:
Here’s my code:
async loadGLTF(name: string, base64: string) {
try {
const arrayBuffer = this.base64ToUint8Array(base64).buffer; // Convert base64 directly to ArrayBuffer
const manager = new THREE.LoadingManager();
const dracoLoader = new DRACOLoader(manager);
dracoLoader.setDecoderPath(""); // Set decoder path if needed
const gltf = await this.loadGLTF_DARCOAsync(dracoLoader, arrayBuffer);
Assets.Models.set(name, gltf);
} catch (err) {
console.error(err);
}
}
async loadGLTF_DARCOAsync(darco: DRACOLoader, arrayBuffer: ArrayBuffer): Promise<GLTF> {
return new Promise((resolve,reject) => {
const gltfLoader = new GLTFLoader();
gltfLoader.setDRACOLoader(darco);
gltfLoader.parse(
arrayBuffer,
'',
(data) =>{
console.log(data)
resolve(data)
},
(err) => {
reject(err)
//console.log(err)
// reject(err)
}
);
});
}
The code works perfectly on the
https://developers.facebook.com/tools/playable-preview/
and everywhere else except when uploaded to
https://adsmanager.facebook.com/adsmanager
Has anyone encountered this issue or found a workaround? Any help would be greatly appreciated!