-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[web] Cleanup Vector3 #42096
[web] Cleanup Vector3 #42096
Conversation
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. |
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.
final Float32List _v3storage; | ||
const Vector3 kUnitX = (x: 1.0, y: 0.0, z: 0.0); | ||
const Vector3 kUnitY = (x: 0.0, y: 1.0, z: 0.0); | ||
const Vector3 kUnitZ = (x: 0.0, y: 0.0, z: 1.0); |
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! This actually guarantees immutability, unlike the previous method of leaving comments with warnings.
…127196) flutter/engine@e9178e1...2e6b1e6 2023-05-19 [email protected] [web] Cleanup Vector3 (flutter/engine#42096) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#127196) flutter/engine@e9178e1...2e6b1e6 2023-05-19 [email protected] [web] Cleanup Vector3 (flutter/engine#42096) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
We have limited use of
Vector3
in the engine, so I converted it into a record and removed almost all of its methods.Converting it to a record also means it's not mutable anymore, which is a positive in my book. That required a few minor changes in
Matrix4
but nothing major.