Hi, when I am doing my project I got this error from glft module called Uncaught (in promise) TypeError: onLoad is not a function on 214 line in glft module. I dont know what to do with it. If anyone knows I would appreciate it.
it’s
load(url, callback, ...)
not
load(url), callback, ...
you’re accidentally giving it a single argument only. are you using a formatting tool? prettier would have notified you about invalid javascript.
btw you can define functions inline, you don’t need “function” syntax which imo always looks weird when given as a callback
const loader = new GLTFLoader()
loader.load(url, gltf => {
...
})
Maybe a simple example will help you.
From the Collection of examples from discourse.threejs.org
BeginnerExample step 3
LoadGLTFmove
By the way, a screenshot is hard to read, better post a code snippet.
yes I wrote that line wrong, thank you very much you safed me here.