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

Method draw

modules/layers/src/icon-layer/icon-layer.ts:266–288  ·  view source on GitHub ↗
({uniforms})

Source from the content-addressed store, hash-verified

264 }
265
266 draw({uniforms}): void {
267 const {sizeScale, sizeBasis, sizeMinPixels, sizeMaxPixels, sizeUnits, billboard, alphaCutoff} =
268 this.props;
269 const {iconManager} = this.state;
270 const iconsTexture = iconManager.getTexture();
271 if (iconsTexture) {
272 const model = this.state.model!;
273 const iconProps: IconProps = {
274 iconsTexture,
275 iconsTextureDim: [iconsTexture.width, iconsTexture.height],
276 sizeUnits: UNIT[sizeUnits],
277 sizeScale,
278 sizeBasis: sizeBasis === 'height' ? 1.0 : 0.0,
279 sizeMinPixels,
280 sizeMaxPixels,
281 billboard,
282 alphaCutoff
283 };
284
285 model.shaderInputs.setProps({icon: iconProps});
286 model.draw(this.context.renderPass);
287 }
288 }
289
290 protected _getModel(): Model {
291 // The icon-layer vertex shader uses 2d positions

Callers

nothing calls this directly

Calls 3

getTextureMethod · 0.80
setPropsMethod · 0.65
drawMethod · 0.65

Tested by

no test coverage detected