(ft: FakeTexture)
| 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(); |
no test coverage detected