MCPcopy
hub / github.com/visgl/deck.gl / createTexture

Method createTexture

showcases/wind/src/layers/wind-layer/wind-layer.js:183–201  ·  view source on GitHub ↗
(gl, opt)

Source from the content-addressed store, hash-verified

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;

Callers 15

initializeStateMethod · 0.95
getTextureFunction · 0.45
createTextureFunction · 0.45
setupMethod · 0.45
_resizeBufferMethod · 0.45
_resizeRenderBuffersMethod · 0.45
constructorMethod · 0.45
resizeTextureFunction · 0.45
packIconsMethod · 0.45
initializeStateMethod · 0.45
createRenderTargetFunction · 0.45
createColorRangeTextureFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected