Jump to content

BABYLON.Text2D.isVisible paramater behaves backwards


Muppet9010
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...