@@ -3,7 +3,6 @@ import { mat4 } from 'gl-matrix';
3
3
4
4
import * as macro from 'vtk.js/Sources/macros' ;
5
5
import vtkHelper from 'vtk.js/Sources/Rendering/OpenGL/Helper' ;
6
- import vtkMapper2D from 'vtk.js/Sources/Rendering/Core/Mapper2D' ;
7
6
import vtkPoints from 'vtk.js/Sources/Common/Core/Points' ;
8
7
import vtkPolyData2DFS from 'vtk.js/Sources/Rendering/OpenGL/glsl/vtkPolyData2DFS.glsl' ;
9
8
import vtkPolyData2DVS from 'vtk.js/Sources/Rendering/OpenGL/glsl/vtkPolyData2DVS.glsl' ;
@@ -18,8 +17,6 @@ import { DisplayLocation } from 'vtk.js/Sources/Rendering/Core/Property2D/Consta
18
17
19
18
import { registerOverride } from 'vtk.js/Sources/Rendering/OpenGL/ViewNodeFactory' ;
20
19
21
- import { ScalarMode } from 'vtk.js/Sources/Rendering/Core/Mapper/Constants' ;
22
-
23
20
const { primTypes } = vtkHelper ;
24
21
const { Filter, Wrap } = vtkOpenGLTexture ;
25
22
const { vtkErrorMacro } = macro ;
@@ -353,14 +350,12 @@ function vtkOpenGLPolyDataMapper2D(publicAPI, model) {
353
350
' opacity = opacity*vertexColorVSOutput.a;' ,
354
351
] )
355
352
) . result ;
356
- } else {
357
- if ( model . renderable . getAreScalarsMappedFromCells ( ) ) {
358
- colorImpl = colorImpl . concat ( [
359
- ' vec4 texColor = texture2D(texture1, tcoordVCVSOutput.st);' ,
360
- ' diffuseColor = texColor.rgb;' ,
361
- ' opacity = opacity*texColor.a;' ,
362
- ] ) ;
363
- }
353
+ } else if ( model . renderable . getAreScalarsMappedFromCells ( ) ) {
354
+ colorImpl = colorImpl . concat ( [
355
+ ' vec4 texColor = texture2D(texture1, tcoordVCVSOutput.st);' ,
356
+ ' diffuseColor = texColor.rgb;' ,
357
+ ' opacity = opacity*texColor.a;' ,
358
+ ] ) ;
364
359
}
365
360
366
361
colorImpl = colorImpl . concat ( [
@@ -597,7 +592,7 @@ function vtkOpenGLPolyDataMapper2D(publicAPI, model) {
597
592
model . internalColorTexture &&
598
593
cellBO . getProgram ( ) . isUniformUsed ( 'texture1' )
599
594
) {
600
- let texUnit = model . internalColorTexture . getTextureUnit ( ) ;
595
+ const texUnit = model . internalColorTexture . getTextureUnit ( ) ;
601
596
if ( texUnit > - 1 ) {
602
597
cellBO
603
598
. getProgram ( )
0 commit comments