-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make core independent from display #6450
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Also, can you update the core package.json to change the dependencies?
Many times people were trying to change that thing. This PR is a delcaration that temp display object stays, but at least we can refactor it so it wont haunt us. |
Codecov Report
@@ Coverage Diff @@
## dev #6450 +/- ##
==========================================
+ Coverage 78.54% 80.15% +1.60%
==========================================
Files 57 57
Lines 2825 2827 +2
==========================================
+ Hits 2219 2266 +47
+ Misses 606 561 -45
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One other thing, can you add test(s) for these new temp functions?
I don't know which non-trivial things to add there at the moment. I prefer not to make trivial tests. |
You're reusing this pattern in three places, and I think we can simplify reuse: const cacheParent = displayObject.enableTempParent();
displayObject.updateTransform();
displayObject.disableTempParent(cacheParent); Maybe make a variant of |
OK, added a test. We declined adding a parameter before because of extra if making updateTransform ugly. no, we cant do that because there might be other operations between updateTransform and disableTempParent. Considering all the cases where i saw temp parent is needed, and all the possible cases i know (updateColorTransform and others) it will be better if people see those lines. We cant to hide them, they are important for understanding. |
packages/core/package.json
Outdated
@@ -29,7 +29,6 @@ | |||
}, | |||
"dependencies": { | |||
"@pixi/constants": "5.2.1", | |||
"@pixi/display": "5.2.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@ivanpopelyshev did you forget to push? Because I can't see any tests. |
We have to wait for localBounds fix, then I'll go over this PR again. |
Codecov Report
@@ Coverage Diff @@
## dev #6450 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 15 15
Lines 671 671
=========================================
Hits 671 671 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Continuation of #6443
@pixi/core
can be independent from@pixi/display
!_lastObjectRendered
can be null after that PR, so I patchedInteractionManager
too.For now I decided that its ok to have temp parent separate for each possible detached element.
I also couldn't built pixi because of strange
DisplacementFilter
import, I dont know if you guys want to resolve it in one of other PR's