Quac_quac_92 Posted November 25, 2016 Share Posted November 25, 2016 it can't display image in my Demo. it has a warning in Console " 'file:///E:/BabylonJs/babylonjs/car2.png' from origin 'file://' has been blocked by CORS policy: Invalid response. Origin 'null' is therefore not allowed access." help me. here are my file. Demo2-LightChange.html Quote Link to comment Share on other sites More sharing options...
gryff Posted November 25, 2016 Share Posted November 25, 2016 @Chien Pham Ngoc : Welcome to the forum The red/black squares you see tell me that the index.html file you run is not finding the textures (grass.jpg, misc.jp and tree.png). It is looking for the textures in a directory (called textures) below the directory holding the index.html file. I suggest you check your directory structure and paths. cheers, gryff Quote Link to comment Share on other sites More sharing options...
Quac_quac_92 Posted November 25, 2016 Author Share Posted November 25, 2016 i checked the img Path. it's ok. I build another demo and Console alarm " Access to Image at 'file:///E:/BabylonJs/babylonjs/car.png' from origin 'file://' has been blocked by CORS policy: Invalid response. Origin 'null' is therefore not allowed access. babylon.js:3 BJS Error while trying to load texture: car.png " . Quote Link to comment Share on other sites More sharing options...
gryff Posted November 25, 2016 Share Posted November 25, 2016 @Chien Pham Ngoc : What is this "car.png" ? There are only three textures in in the zip file - grass.jpg, misc.jpg and tree.png And they should be local - as you have downloaded them ... There is no reference to "car.png" in the index.html file. So what is that? cheers, gryff Quote Link to comment Share on other sites More sharing options...
gryff Posted November 25, 2016 Share Posted November 25, 2016 1 hour ago, Chien Pham Ngoc said: i downloaded file get.zip on tutorial 2 http://www.babylonjs-playground.com/?4. But when run this demo and some other, they can't display images. @Chien Pham Ngoc : You seem to have changed your first post - and it no longer includes the above link And the new link tries to load "car.png" Not sure what you are trying to do any more gryff Quote Link to comment Share on other sites More sharing options...
dbawel Posted November 25, 2016 Share Posted November 25, 2016 Can you make a PG scene? Your link is down as @gryff mentioned. DB 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.