Hi,
In previous version of observable I was importing a GLB file from my github repository.
https://observablehq.com/@ferrari212/section-2-6-inserting-gltf-and-creating-a-more-realistic-mod
This is the peace of the code I used before, where the boatPath is the url pointing to the source:
{
loaderGLTF.load(
boatPath,
(gltf) => {
var shipGLTF = gltf.scene;
shipGLTF.rotation.x = Math.PI / 2;
shipGLTF.rotation.y = -Math.PI / 2;
shipGLTF.position.set(-1, 0, 0);
shipGLTF.name = "ModelGLTF";
if (shipGLTF.material) {
shipGLTF.material.side = THREE.DoubleSide;
}
scene.add(shipGLTF);
},
(xhr) => {
mutable loaderPecentage = (xhr.loaded / 31780028) * 100;
}
);
}
In the newer version, however, I am not able to import it and by checking the console I noticed I receive a CORS issue problem and error 200. I want to know if there is a new procedure to import it from another source than observable. I saw some solutions using FileAttachment but I would rather prefer to keep with the one I am using.
Regards,
Felipe