VictorF Posted November 12, 2018 Share Posted November 12, 2018 https://www.babylonjs-playground.com/#A3M2K3 That is a really really simple example that works ok with the providen url boxMaterial.reflectionTexture = new BABYLON.CubeTexture("http://babylonjsguide.github.io/img/", scene, ["cubeSide_nx.jpg", "cubeSide_nx.jpg", "cubeSide_nx.jpg", "cubeSide_nx.jpg", "cubeSide_nx.jpg", "cubeSide_nx.jpg"]); but fails using my own server boxMaterial.reflectionTexture = new BABYLON.CubeTexture("http://www.motivacg.com/temporal/victor/CubeBabylon/", scene, ["SalonA_nx.jpg", "SalonA_nx.jpg", "SalonA_nx.jpg", "SalonA_nx.jpg", "SalonA_nx.jpg", "SalonA_nx.jpg"]); Obviously you can get the SalonA_nx.jpg file without problem using that url. Any tip about this? thank you in advance and sorry for being such newbie! Quote Link to comment Share on other sites More sharing options...
brianzinn Posted November 12, 2018 Share Posted November 12, 2018 You need to setup CORS on your images, if you want them to work in the playground (ie: put them on github). The good news is that it will work on the same server without CORS. Don't be sorry for being a newbie - we all started somewhere. Much better to be a newbie and learn new things Buzul 1 Quote Link to comment Share on other sites More sharing options...
VictorF Posted November 12, 2018 Author Share Posted November 12, 2018 29 minutes ago, brianzinn said: You need to setup CORS on your images, if you want them to work in the playground (ie: put them on github). The good news is that it will work on the same server without CORS. Don't be sorry for being a newbie - we all started somewhere. Much better to be a newbie and learn new things Thank you so much! it worked like a charm. Quote Link to comment Share on other sites More sharing options...
totallybueno Posted December 13, 2019 Share Posted December 13, 2019 How can you set up CORS for that images? I´m not being able to load some images from a CDN when using Phaser, they load correctly with a <img> tag in a html file... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.