hulahula Posted November 13, 2017 Share Posted November 13, 2017 Hello guys . I have some issue whit image load texture. var panel = BABYLON.Mesh.CreateBox("panel", 0.2, scene); var panelMat = new BABYLON.StandardMaterial("panel1",scene); panelMat.diffuseTexture = new BABYLON.Texture("tpanel.png", scene); panel.material = panelMat; panel.scaling.z = 0.1; In developer tools always show me this : index.html:1 : Access to Image at 'file:///C:/Users/user/Desktop/trapbox/tvorbamodelov/tpanel.png' from origin 'null' has been blocked by CORS policy: Invalid response. Origin 'null' is therefore not allowed access. babylon.js:3 : BJS - [00:16:44]: Error while trying to load image: tpanel.png. I am new in this and I am trying to understand how BABYLON.JS works. Thank you in advance for your answers . Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 13, 2017 Share Posted November 13, 2017 Hello this is a more general web based question. You cannot directly serve your content from the file system because of security constraints You have to use a local webserver (like IIS express or Apache) hulahula 1 Quote Link to comment Share on other sites More sharing options...
hulahula Posted November 14, 2017 Author Share Posted November 14, 2017 Oh I got it thank you ? I am feel littel dump know that I didnt find out ? Again thank you very much @Deltakosh. GameMonetize 1 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.