Conflict between loadShader() and p5 reference?

Hi everyone!

I am trying to have a callback function triggered by a shader loading, but there seems to be something wrong. This is the suggested syntax in the reference:

loadShader(vertFilename, fragFilename, [callback], [errorCallback])

but when I try to add any extra arguments, I get this error:

> p5.js says: loadShader() was expecting no more than 2 arguments, but received 3.[]

Any clues to what’s going on?

I also haven’t found any examples or tests in the source code that use that callback function, which makes me think it might not have been tested a lot.


It does seem to be implemented

but I haven’t tested it. Did you try with the latest p5.js?

I didn’t :woman_facepalming:t2:
Thank you!

1 Like