Generates a Texture from a Data URI, or otherh URL.
(name: string, uri: string)
| 14 | |
| 15 | /** Generates a Texture from a Data URI, or otherh URL. */ |
| 16 | function createTexture(name: string, uri: string): Texture { |
| 17 | const imageEl = document.createElement('img'); |
| 18 | imageEl.src = uri; |
| 19 | const texture = new Texture(imageEl); |
| 20 | texture.name = name; |
| 21 | texture.flipY = false; |
| 22 | return texture; |
| 23 | } |
| 24 | |
| 25 | // Placeholder images. |
| 26 | const NULL_IMAGE_URI = |
no outgoing calls
no test coverage detected