(gl, opt)
| 181 | } |
| 182 | |
| 183 | createTexture(gl, opt) { |
| 184 | const textureOptions = Object.assign( |
| 185 | { |
| 186 | format: gl.RGBA32F, |
| 187 | dataFormat: gl.RGBA, |
| 188 | type: gl.FLOAT, |
| 189 | parameters: { |
| 190 | [gl.TEXTURE_MAG_FILTER]: gl.NEAREST, |
| 191 | [gl.TEXTURE_MIN_FILTER]: gl.NEAREST, |
| 192 | [gl.TEXTURE_WRAP_S]: gl.CLAMP_TO_EDGE, |
| 193 | [gl.TEXTURE_WRAP_T]: gl.CLAMP_TO_EDGE |
| 194 | }, |
| 195 | pixelStore: {[gl.UNPACK_FLIP_Y_WEBGL]: true} |
| 196 | }, |
| 197 | opt |
| 198 | ); |
| 199 | |
| 200 | return new Texture2D(gl, textureOptions); |
| 201 | } |
| 202 | |
| 203 | calculatePositions({nx, ny, bbox}) { |
| 204 | const diffX = bbox.maxLng - bbox.minLng; |
no outgoing calls
no test coverage detected