File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed
typescript/packages/subsurface-viewer/src/layers Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ export default `\
4
4
5
5
precision highp float;
6
6
7
- //uniform vec4 uColor;
8
-
9
7
out vec4 fragColor;
10
8
11
9
void main(void) {
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ export default `\
4
4
5
5
precision highp float;
6
6
7
- // uniform float uClipZ;
8
-
9
7
in vec3 positions;
10
8
11
9
void main(void) {
Original file line number Diff line number Diff line change 1
1
import type { BitmapLayerPickingInfo , BitmapLayerProps } from "@deck.gl/layers" ;
2
2
import { BitmapLayer } from "@deck.gl/layers" ;
3
- import type { LayerProps , PickingInfo } from "@deck.gl/core" ;
3
+ import type { LayerContext , LayerProps , PickingInfo } from "@deck.gl/core" ;
4
4
5
5
import type {
6
6
LayerPickInfo ,
@@ -20,6 +20,7 @@ import type { ContinuousLegendDataType } from "../../components/ColorLegend";
20
20
import type { ShaderModule } from "@luma.gl/shadertools" ;
21
21
import type { Model } from "@luma.gl/engine" ;
22
22
import { project32 } from "@deck.gl/core" ;
23
+ import { UniformValue } from "@luma.gl/core" ;
23
24
24
25
function getImageData (
25
26
colorMapName : string ,
@@ -121,9 +122,11 @@ export default class ColormapLayer extends BitmapLayer<ColormapLayerProps> {
121
122
super . initializeState ( ) ;
122
123
}
123
124
124
- setShaderModuleProps (
125
- ...props : Parameters < Model [ "shaderInputs" ] [ "setProps" ] >
126
- ) : void {
125
+ draw ( args : {
126
+ moduleParameters ?: unknown ;
127
+ uniforms : UniformValue ;
128
+ context : LayerContext ;
129
+ } ) : void {
127
130
if ( ! this . isLoaded ) {
128
131
if ( typeof this . props . reportBoundingBox !== "undefined" ) {
129
132
const xMin = this . props . bounds [ 0 ] as number ;
@@ -138,7 +141,12 @@ export default class ColormapLayer extends BitmapLayer<ColormapLayerProps> {
138
141
} ) ;
139
142
}
140
143
}
144
+ super . draw ( args ) ;
145
+ }
141
146
147
+ setShaderModuleProps (
148
+ ...props : Parameters < Model [ "shaderInputs" ] [ "setProps" ] >
149
+ ) : void {
142
150
// Set property for modelMatrix.
143
151
const m = getModelMatrix (
144
152
this . props . rotDeg ,
You can’t perform that action at this time.
0 commit comments