Kuraudo Posted November 30, 2016 Share Posted November 30, 2016 Hello. I created a small demo, inspired by this scene. But I got bad. When you change the color of the item, mesh disappears completely. See gif file. Function code caused by a clique Codepen. She called each time you change colors. Yes, it is terrible). Please help advice. How best to implement? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 30, 2016 Share Posted November 30, 2016 Hello this may caused by the time required for the material to compile the shader You can test material.isReady() before affecting it to the mesh Quote Link to comment Share on other sites More sharing options...
Kuraudo Posted December 1, 2016 Author Share Posted December 1, 2016 This method always returns false. I call it without any arguments. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 1, 2016 Share Posted December 1, 2016 like this: http://www.babylonjs-playground.com/#F3OW0#1 Quote Link to comment Share on other sites More sharing options...
Kuraudo Posted December 1, 2016 Author Share Posted December 1, 2016 arrayMeshes.forEach((mesh) => { if (!mesh.material && material.isReady()) { console.log('ok'); mesh.material = material; } }) the condition does not work. Anyway, thanks for the advice. Quote Link to comment Share on other sites More sharing options...
Kuraudo Posted December 1, 2016 Author Share Posted December 1, 2016 I solved the problem with the help of setTimeout(). Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 1, 2016 Share Posted December 1, 2016 Yes because compilation takes time Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 2, 2016 Share Posted December 2, 2016 "ohhh... there's... jaggies on my skybox, jaggies on my skybox, jaggies on my skybox just for youuuuuuu, babe" I think it's a new hit song! (Wingy grabs his Black & Decker vibrating sander, and searches for a power outlet in the scene.) When I was in Korea, I once got jaggies on my extrusion, but the doctor gave me some medicine. My Corel Photopaint X7 says "What the hell is a .hdr file? Get that thing away from me." Wuss software. Quote Link to comment Share on other sites More sharing options...
Kuraudo Posted December 2, 2016 Author Share Posted December 2, 2016 with language removed. gold words 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.