I’m a new user of p5js and loving learning what’s possible!
Can I get some advice please about the loadModel function?
I’m getting the error in console.log:
“ReferenceError: loadModel is not defined”
I can’t see where I’m going wrong, or how I’m deviating from the octahedron example at https://p5js.org/reference/#/p5/loadModel.
Only change is that I’ve downloaded a simple ships hull .obj file and using that instead.
Do I need an additional line in the index.html file for loadModel to be available? I.e., something along the lines of…
Oh yes, I agree with all your points.
The model is actually three hulls!
And yes, I’ll definitely use fill() and noStroke(), and also the /assets directory.
However, I’m wondering why it still doesn’t work locally on my laptop using sublimetext2. I downloaded the code that works as a zip file, but it is throwing an error in the console.log:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///Users/cex/Documents/Processing/course%20-%20Heavy%20Lift/module%202/loadhull_test/working%20on%20p5js.org/3d-model.obj. (Reason: CORS request not http).
TypeError: NetworkError when attempting to fetch resource. 2 [p5.js:78248:25](file:///Users/cex/Documents/Processing/course%20-%20Heavy%20Lift/module%202/loadhull_test/working%20on%20p5js.org/p5.js)
why not, i would call it a extra project and
i would use it to have finished projects online available…
++ i use Raspberry Pi for it /
also you better have a main page with links to the p5.js …projects
but not for development
( there i use online editor or PDE / p5.js mode )