Muppet9010 Posted June 3, 2017 Share Posted June 3, 2017 After creating a Text2D object when setting the isVisible field it seems to have the reverse behaviour to expected and documented. When setting isVisible to True the text disappears from the scene. When setting to False it appears. Seen with the 2.5 release. Documentation, I know I've quoted 2.4, but the 2.5 makes no mention of this field and there is no deprecated warning showing when running with 2.5 js: https://doc.babylonjs.com/classes/2.4/text2d Playground example, comment out the commands at the end of the code. http://www.babylonjs-playground.com/#3MCNYG Quote Link to comment Share on other sites More sharing options...
Muppet9010 Posted June 3, 2017 Author Share Posted June 3, 2017 ah, just realised this field probably isn't intended to be used. As post initial render changing its value doesn't have any visual effect. I have switched to use the levelVisible field and it behaves correctly at initial render and when later changed. as per documentation: https://doc.babylonjs.com/overviews/canvas2d_visibility included just in case anyone else searches for this same thing GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 8, 2017 Share Posted June 8, 2017 Well solved, Muppet9010! Welcome to the BJS forum... good to have you with us. You are now, officially, a BJS forum helper... because you helped yourself. You did it in a friendly and timely manner, too. Way to go! Try to mark your thread as [solved] if you wish (edit first post - adjust title). That helps forum helpers like yourself. Quote Link to comment Share on other sites More sharing options...
Muppet9010 Posted June 13, 2017 Author Share Posted June 13, 2017 I think the oddity of the field having the inverse effect to expected is still valid from my first post. Just not sure how often (if ever) you would set this field pre-render cycle. 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.