Having recently started working with AR.js, I've been experimenting with running NFT markers using Three.js and a custom image to display a model. While everything runs smoothly on localhost, I encountered a 404 "onError" message when trying to upload it to my GitHub page from the ar-nft.js file. I attempted to update the link in ar-nft to , but the error persisted. My assumption is that the descriptors URL cannot locate the NFT data files on the server. If this is the case, I'm unsure of how to properly link them.
You can find the entire project at https://github.com/pillipillow/ARjs-with-Threejs
The code snippet below is taken from https://github.com/pillipillow/ARjs-with-Threejs/blob/main/nft-tracking.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<title>Viewport</title>
<link rel ="stylesheet" href="css/main.css">
</head>
<body>
<script src = "libs/threeJS/three.min.js"></script>
<script src = "https://raw.githack.com/AR-js-org/AR.js/master/three.js/build/ar-nft.js"></script>
<script>THREEx.ArToolkitContext.baseURL = "libs/arJS/"</script>
<script type= "module">
import { GLTFLoader } from './libs/jsm/GLTFLoader.js';
var scene, camera, renderer, clock;
var arToolkitSource, arToolkitContext;
var markerRoot;
var model;
// Remaining JavaScript code...
</script>
</body>
</html>