-
-
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
Convert Graphics to typescript #6352
Conversation
It has begun. |
Codecov Report
@@ Coverage Diff @@
## dev #6352 +/- ##
=======================================
Coverage 75.03% 75.03%
=======================================
Files 86 86
Lines 4819 4819
=======================================
Hits 3616 3616
Misses 1203 1203 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.
Looks good. Just a couple of things to discuss
All the chain-able methods should return |
What you mean?
Linter breaks without assignments type of return. |
He means that a method that returns the instance of the class should use e.g. |
Thanks, done. |
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.
Why did you remove buildComplexPoly and bezierCurveTo functions?
} | ||
|
||
if (!Array.isArray(points)) | ||
else | ||
{ |
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.
Why remove support for ...args:number[]
here? These TS conversions shouldn't remove functionality. I suggest you add another argument signature for args implementation.
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.
Same problem in Poligon package now. We doesn't support arrays in constructor now.
Can you write 2 annotation with ... and [], because i wasn't resolve this?
And we can't do this because there is lint rule as no-dupe-class-members
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.
Oke, i restore it.
Tests will come later.
Dead and doublicated code. |
Co-Authored-By: Matt Karl <matt@mattkarl.com>
Co-Authored-By: Matt Karl <matt@mattkarl.com>
Conclusion:
upd. @andrewstart change lint rule, now we can do multiple annotations upd: |
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.
Looks good to me!
Thank you @eXponenta 🎉 |
@bigtimebuddy do you even sleep? |
@ivanpopelyshev newborn duty 👶 |
Description of change
Convert PIXI.Graphics to TS
P.S Awaits before
core's
problems will be resolved.cross-package changes:
type IShape = Circle | Ellipse | Polygon | Rectangle | RoundedRectangle;
- moved to @pixi/mathTransform._worldID
- is internal (without modificator)changed signature of hex2rgb to:
hex2rgb(hex: number, out: Array<number> | Float32Array = []): Array<number> | Float32Array
Pre-Merge Checklist
npm run lint
)npm run test
)