This maybe a skool boi error, but I'm getting a 404 for a file that does exist:
http://localhost:8000/Desktop/Skeletor/js/build/three.module.js net::ERR_ABORTED 404 (File not found)
it should say
http://localhost:8000/Desktop/Skeletor/MYPROJECT/js/build/three.module.js
So I'm running a directory short and I can't see why or where I'm going wrong. Yes, I changed from
../build/three.module.js
to
./build/three.module.js
intentionally.
Here's the js in the index.html copied from the three.js webgl loader example
<script type="module">
import * as THREE from './build/three.module.js';
import { OrbitControls } from './jsm/controls/OrbitControls.js';
import { GLTFLoader } from './jsm/loaders/GLTFLoader.js';
The directory structure is this:
MyProject/
index.html
.DS_Store
styles.css
obj/
dime_low.glb
textures/
00.jpg
build/
three.module.js
.DS_Store
jsm/
.DS_Store
controls/
.DS_Store
OrbitControls.js
loaders/
.DS_Store
RGBELoader.js
GLTFLoader.js
Everything is running locally using a simple HTTP server via Python
Go easy on me, I'm meant to be doing colouring-in today not learning three.js :)
jsm
beforebuild
so it should beimport * as THREE from './jsm/build/three.module.js';
jsm
directory.localhost
? It might be an issue with the config file, maybe pointing one folder too high.