Sign in to follow this  

Rectangle from Pixi JS Graphics doesnt show up on screen

Recommended Posts

I tried to draw a rectangle like this:

graphics.lineStyle(2, 0xFF00BB, 1);
graphics.beginFill(0xFF00BB, 0.25);
graphics.drawRoundedRect(150, 450, 300, 100, 15);

But it does not show up on my screen. I use pixi layers and I guess it is on the lowest layer so it gets covered by my background image.

How can I make it be drawn on top ? Can I assign a pixi parentgroup as well?

Share this post

Link to post
Share on other sites

It hsould work.

Please provide the demo. If you use pixi-layers there are several things that you have to check, for example : whatever gets passed to "rendered.render" has to be "PIXI.display.Stage", otherwise you have to call update method on it manually. If you dont understand what that means, you are likely using pixi Application, and "app.stage = new PIXI.display.Stage" should help.

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.

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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.