-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
fix(Colors): fix UInt8Clamped array color definition #3034
Conversation
@finetjul This PR i solves the problem with color defined with UInt8Clamped arrays |
@@ -15,6 +15,7 @@ export const VtkDataTypes = { | |||
CHAR: 'Int8Array', | |||
SIGNED_CHAR: 'Int8Array', | |||
UNSIGNED_CHAR: 'Uint8Array', | |||
UNSIGNED_CHAR_CLAMPED: 'Uint8ClampedArray', |
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.
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.
The problem here is for UCHAR we have two possible values...
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.
My first guess is that this won't affect VTK compatibility, since these constants need to be mapped to the VTK equivalents anyways.
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.
@rodrigobasilio2022 maybe add an inline comment that says it "should be used for VTK.js internal purpose only (e.g.GPU)"
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.
@finetjul Done squash
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.
LGTM (the 2 commits could be squashed though...)
5e2be69
to
08d1f28
Compare
Done quash |
Context
This PR fixes a bug in vtk.js when one creates a color definition with UInt8Clamped array structure
Results
Changes
PR and Code Checklist
npm run reformat
to have correctly formatted codeTesting