Switch from characters to numerical tile IDs
This commit is contained in:
parent
31c131289c
commit
1f9cd7a110
4 changed files with 128 additions and 137 deletions
|
@ -1,5 +1,3 @@
|
|||
import { mapValuesAsync } from '../../util';
|
||||
|
||||
export function loadImage(url: string): Promise<HTMLImageElement> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const img = new Image();
|
||||
|
@ -9,10 +7,6 @@ export function loadImage(url: string): Promise<HTMLImageElement> {
|
|||
});
|
||||
}
|
||||
|
||||
export function loadImages(urls: Map<string, string>): Promise<Map<string, HTMLImageElement>> {
|
||||
return mapValuesAsync(loadImage, urls);
|
||||
}
|
||||
|
||||
export function mkTexture(gl: WebGLRenderingContext, src: HTMLCanvasElement|HTMLImageElement): WebGLTexture {
|
||||
const texture = gl.createTexture();
|
||||
if (!texture)
|
||||
|
|
Reference in a new issue