File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export const VtkDataTypes = {
15
15
CHAR : 'Int8Array' ,
16
16
SIGNED_CHAR : 'Int8Array' ,
17
17
UNSIGNED_CHAR : 'Uint8Array' ,
18
+ UNSIGNED_CHAR_CLAMPED : 'Uint8ClampedArray' , // should be used for VTK.js internal purpose only
18
19
SHORT : 'Int16Array' ,
19
20
UNSIGNED_SHORT : 'Uint16Array' ,
20
21
INT : 'Int32Array' ,
Original file line number Diff line number Diff line change @@ -206,7 +206,8 @@ function vtkScalarsToColors(publicAPI, model) {
206
206
// map scalars through lookup table only if needed
207
207
if (
208
208
( colorMode === ColorMode . DEFAULT &&
209
- scalars . getDataType ( ) === VtkDataTypes . UNSIGNED_CHAR ) ||
209
+ ( scalars . getDataType ( ) === VtkDataTypes . UNSIGNED_CHAR ||
210
+ scalars . getDataType ( ) === VtkDataTypes . UNSIGNED_CHAR_CLAMPED ) ) ||
210
211
( colorMode === ColorMode . DIRECT_SCALARS && scalars )
211
212
) {
212
213
newColors = publicAPI . convertToRGBA (
You can’t perform that action at this time.
0 commit comments