-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(profiling): add gl utils and gl-matrix lib #30878
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
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.
lowercase type leaves me sad
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.
Yeah, agree :(
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.
how do you feel about this?
| // it's easier to display a matrix as a 3x3 array. WebGl matrices are row first and not column first | |
| // https://webglfundamentals.org/webgl/lessons/webgl-matrix-vs-math.html | |
| // prettier-ignore | |
| return mat3.fromValues( | |
| this.width, 0, 0, | |
| 0, this.height, 0, | |
| this.x, this.y, 1 | |
| ) | |
| const {width: w, height: w, x, y} = this; | |
| // it's easier to display a matrix as a 3x3 array. WebGl matrices are row first and not column first | |
| // https://webglfundamentals.org/webgl/lessons/webgl-matrix-vs-math.html | |
| // prettier-ignore | |
| return mat3.fromValues( | |
| w, 0, 0, | |
| 0, h, 0, | |
| x, y, 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.
Yup, looks much more readable :) (I'm not a fan of the extra allocations, but who cares)
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.
damn I don't know why our eslint isn't catching this. I thought I specifically fixed this here getsentry/eslint-config-sentry#117
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.
Hmm, indeed. This should have been caught, I dont see an error in vscode either.
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.
@evanpurkhiser I think the config we use for this codebase actually never extends config/rules/base (or it overrides it somewhere).
In other words, if I manually set .eslintrc.js to
extends: ['sentry-app/strict', 'sentry/rules/base'],Then I get Expected { after 'if' condition.eslintcurly, but if I set it to
extends: ['sentry/rules/base', 'sentry-app/strict'],The error does not show, which makes me think that we are overriding the rule here somehow, or that sentry-app/strict just never extends it. Maybe something for @billyvg to investigate?
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.
Whoa whoa, good findings
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.
Yeah I'll take a look
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.
@JonasBa @evanpurkhiser Ah it's because of the prettier plugin, we'll need to override it in sentry-app (or wherever we use the plugin) https://github.com/prettier/eslint-config-prettier/tree/79db534f6afc0be1c9b1a6c7c3fdf825cbe52827#special-rules
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 find @billyvg, thanks for investigating!
a545b10 to
687db50
Compare
687db50 to
1f31ea4
Compare
|
Rebasing again because acceptance tests timeout |
94af023 to
69f3ab2
Compare
Add some utils for keeping the canvas properly resized and add the main rect class that we use in order to represent the flamegraph's frames.