hit2501 Posted October 20, 2015 Share Posted October 20, 2015 Hi. I have the following issue: I must change the texture of a mesh dynamically (by dragging) with different images. Using:mesh.material.diffuseTexture = new BABYLON.Texture("colors/" + colorNameVariable + ".jpg", scene);works fine on every desktop browser but Chrome for Mac, in chrome for Mac I get in the console: ...../colors/.jpg 404 (not found) babylon.js:3...../colors/.jpg 404 (not found) .jpg:1 "colorNameVariable" not appear. What can I do for this kind of issues? Thank you all. Quote Link to comment Share on other sites More sharing options...
jerome Posted October 20, 2015 Share Posted October 20, 2015 hit2501, on 20 Oct 2015 - 4:18 PM, said: ...../colors/.jpg 404 (not found) babylon.js:3...../colors/.jpg 404 (not found) .jpg:1Look at the name of the files it tries to download :/colors/.jpgit should be color/something.jpgthis means your variable colorNameVariable is empty, or undefined or null Quote Link to comment Share on other sites More sharing options...
hit2501 Posted October 20, 2015 Author Share Posted October 20, 2015 Yes, thats strange because I put: console.log(colorNameVariable); and this shows me the variable value correctly. Quote Link to comment Share on other sites More sharing options...
davrous Posted October 21, 2015 Share Posted October 21, 2015 Can you please share your code somewhere? It will be easier to review.Thanks,David Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted October 21, 2015 Share Posted October 21, 2015 FYI, I once tried to implement drag'n drop image, I don't remember in which browser there was a problem (maybe Chrome) but in this one the file variable were not correctly filed with the file name. 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.