Sign in to follow this  
Dad72

Create viewport in round shaped ?

Recommended Posts

Hello,

I would like for the realization of a mini map, create a viewport of round shape rather than square or rectangle. I guess you have to use the Layers, but I do not know how to do it.

I have to prepare a PG of the mini map:

http://www.babylonjs-playground.com/#UCFKM#10

Does someone have an idea. Thank you in advance.

Share this post


Link to post
Share on other sites

Hi  @Dad72 and @adam ,

I face the same problem as @Dad72 had, Above information is very useful for me.

But i face one issue , how can i set the position of layer to sets the layer or roundmask image around my some predefined round shape area ?
can i change the position of layer ?? 

Share this post


Link to post
Share on other sites

Hiya B!  https://www.babylonjs-playground.com/#UCFKM#96

The first 2 numbers in line 12... allow you to adjust the X/Y of the lower left corner of the viewport position.

Viewports are like textures... 0,0 in lower left corner.  (thx Dad72)  :)

I did a little animating in lines 44-48.

Should do the trick for ya.  Party on!

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.