Recommended Posts

Hi @steven_EXC

 

there is a ScreenSpaceCanvas2D.opacity property. A value of 0.5 equals to 50% transparency. The Text2D object has this property too. But I don't know whether you can change the Text2D opacity after it has been used inside a ScreenSpaceCanvas2D object. I think it's internally baked or something... Then use simply the canvas.opacity property.

Share this post


Link to post
Share on other sites

@Nabroski Thanks, I did not know you can simply change the content after all. I really can use it for one of my projects. But I have a some questions:

1. Is there any reason for the rect2D? Why not setting the text2D directly as a child of the canvas2D? -> http://babylonjs-playground.com/#TQFJR#2


2. Why did you use onAfterCameraRenderObservable and not registerBeforeRender?

 

Share this post


Link to post
Share on other sites

So this is a little embarrassing.  Here's basically what I was doing in my code before I posted: http://babylonjs-playground.com/#TQFJR#3

As you can see, it works.  I should've just created a playground with my issue and I would've seen that it was working fine.  My issue was that I wasn't using the right version of babylon.  As soon as I grabbed an updated version, it all worked fine.  There must've been something wonky in the version I was using before.

Sorry for the mix-up.  Thanks for your help guys!

Share this post


Link to post
Share on other sites

Hey Steffen,

Greetings to Hanover, i remember we started here in the Forum at the same time! 

"Why did you use onAfterCameraRenderObservable and not registerBeforeRender?
 "

I use Scene Optimization and sometimes, it happens my models wont load when Babylon don't CompileAndRun after(CameraRender) - so the 1Frame is ready, this way i never facing problems. 
I'm also an experimental nature, i have to keep a basic work set from witch i expect a working behavior when turning the knobs all the way up in other areas. 
You also see at my post count i have contribute some of playgrounds here, so, basically i copy paste stuff that i already got few month ago.

http://babylonjs-playground.com/#TQFJR#5

 

Share this post


Link to post
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...

  • Recently Browsing   0 members

    No registered users viewing this page.