We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi!
I'm so happy that p5.js finally has 3D functionality! But when I try to set a texture I get this message: Image from origin 'file://' has been blocked from loading by Cross-Origin Resource Sharing policy: Invalid response. Origin 'null' is therefore not allowed access.
Can anybody help?
Thanks!
Peter Farrell
Answers
http://forum.Processing.org/two/discussion/12594/load-image-from-the-web
Thanks, I used createImg and got the error that it's not defined. Preload didn't work either.
@peterfarrell66, If you used createImg() instead of loadImage(), it means you haven't understood my answers there... :|
Also I remember warning that preload() doesn't work w/ my solution.
Perhaps in the next p5.js 0.4.16 version it will though. [-O<
I tried loadImage() first, as the website suggested. When that didn't work, I posted my question. The other suggestions on the link didn't work either.
If you had read the explanations laid out by my explanations in this forum, you would have known that loadImage() doesn't work for images which got CORS disabled (unless locally loaded)! [-(
Have you really read the whole issue from here: (:|
http://forum.Processing.org/two/discussion/11608/i-can-t-display-images-dynamically-loaded-from-web-with-p5-js-always-a-cross-domain-issue
And also from here: https://GitHub.com/processing/p5.js/issues/802
On 2nd thought even though your original message error is related to "Cross-Origin Resource Sharing policy", that is CORS, perhaps your issue is about running the sketch as a local file w/o a server! :-\"
In this case, the link below got many tips, for example which browsers to use, in order to overcome that:
http://forum.Processing.org/two/discussion/comment/52795/#Comment_52795