Jump to content

Pixi hitArea for whole stage


Griva
 Share

Recommended Posts

I have on stage special "workspace" pixi container -  I use it to allow user to draw on it.  It works perfect if I set hitArea dimensions to renderer width and height but the problem is that user can move this layer or zoom in/out.
I think result is obvious, after move/zoom it is not possible to draw on canvas because hitArea "run" out from the screen or it is too small.

My question is what is the best actual solution for this (pixi v4)?

I was thinking about setting Infinite hitArea but this is not possible. I could set hitArea Rectangle to be like 999999px so it should not be possible to go out of drawing area but is it ok? Can setting very big hitArea slow down interaction manager?
Also another option was to replace hitArea (make it bigger) after move/zoom but this is proably not the best idea. Is there any elegant solution to cover this case easly?

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...