MCPcopy Index your code
hub / github.com/gre/gl-react / get

Method get

packages/tests/utils.js:400–411  ·  view source on GitHub ↗
(ft: FakeTexture)

Source from the content-addressed store, hash-verified

398 return input instanceof FakeTexture;
399 }
400 get(ft: FakeTexture) {
401 const array = ft.getPixels();
402 if (array) {
403 const t = createNDArrayTexture(this.gl, array);
404 this.textures.push(t);
405 return {
406 texture: t,
407 width: ft.width,
408 height: ft.height
409 };
410 }
411 }
412 load(ft: FakeTexture) {
413 const res = this.get(ft);
414 return res ? Promise.resolve(res) : Promise.reject();

Callers 1

loadMethod · 0.95

Calls 1

createNDArrayTextureFunction · 0.85

Tested by

no test coverage detected