question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v4.* the mask do not change when i change stage

See original GitHub issue

I was used pixijs in TBmini programs. i created a retangle sprite to be as a mask in another sprite.

when i use stage.width and stage.x to change the stage scale and position, all things changed but mask.

Expected Behavior

when i scale the stage, mask should be scaled too

Current Behavior

but the mask was not changed now! i tried to change new mask when stage changed ,but it can leader to annother bugs example precision question。

does have some solution to change stage ,at the same time i do not do extra work to change my codes。

i also tried annother way,that is ajudst the canvas css scale number ,but it will be blank in tbMiniprogram 。

how can i do to resolve this problem。

Possible Solution

Steps to Reproduce

Environment

  • pixi.js version: e.g. 4.7.5
  • Browser & Version: e.g. Chrome 67
  • OS & Version: e.g. Ubuntu 18.04
  • Running Example: url

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
mengsumincommented, Oct 13, 2021

i

You need to add the mask to your container if you want the parent transforms to affect it. Which you do. It will render without doing this, but will not take part in the chain of update transforms.

I know it is frustrating when something doesn’t just work as you expect, however, you do not provide a minimal reproduction of your issue, and you are using v4, which is very old at this point. Please consider upgrading if you can and be more helpful when reporting issues and you may get a better response. Also, use the discussion forums if you don’t understand how something behaves rather than reporting an issue.

i am sorry for bring your this trouble. pixi infomations in my country is very less, thank you for help me to resulve my problem . when i use mask to be a child to addchild in his parent controls, it works. i do not product rerpduction because my componay do no allow person public behaviror. and i use old version in mini TB minigram , because mini tb environment is not absolutely html5, tb workers encapsulate your pixi and provide the tb-pixijs to us. the tb-pixi version is v4.7.5。 if i use newerest version, tb worker must upgrate their tb-pixijs then after that i can use .

at the end thanks every body. love you 。

1reaction
bigtimebuddycommented, Oct 13, 2021

You need to add the mask to your container if you want the parent transforms to affect it. Which you do. It will render without doing this, but will not take part in the chain of update transforms.

I know it is frustrating when something doesn’t just work as you expect, however, you do not provide a minimal reproduction of your issue, and you are using v4, which is very old at this point. Please consider upgrading if you can and be more helpful when reporting issues and you may get a better response. Also, use the discussion forums if you don’t understand how something behaves rather than reporting an issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

LAC | DPH | Wear a Mask to protect yourself from COVID-19
If you have to continually adjust your mask, it might not fit properly. Consider trying different types or sizes of masks. Wearing two...
Read more >
The 6 Stages of Mask Wearing | Oliberté Footwear
Stage 2: Masks are not required, but some sort of face covering is recommended. ... Stage 4: Masks are required indoors for all...
Read more >
Strategies for Optimizing the Supply of Facemasks: COVID-19
Find strategies for optimizing the supply of face masks for doctors during COVID-19, including reusing face masks and extended use of face masks...
Read more >
How to understand the new CDC mask guidelines for COVID-19
Currently, Austin Public Health is recommending vaccinated people wear masks indoors and outdoors under Stage 4. They can travel, shop or dine ...
Read more >
Mask Policy Update – The City University of New York - CUNY
This policy change, which takes effect on Monday, March 7, ... The suspension of mandatory masking does not affect the student booster ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found