Files
tower/ts/simple_tile.ts

13 lines
458 B
TypeScript
Raw Permalink Normal View History

2021-05-11 05:28:20 +00:00
import { AnimatableTile } from './animatable_tile.js';
2021-05-17 04:26:18 +00:00
import { Mask } from './mask.js';
2021-05-11 02:57:17 +00:00
2021-05-11 05:28:20 +00:00
export class SimpleTile extends AnimatableTile {
2021-05-17 04:26:18 +00:00
constructor(width: number, height: number, masks: Map<string, Mask>, animations: Map<string, [Keyframe[], object]>, image_url: string) {
super(width, height, masks, animations);
2021-05-11 02:57:17 +00:00
this.elem.style.backgroundImage = `url('${encodeURIComponent(image_url)}')`;
this.elem.style.backgroundSize = 'cover';
2021-05-11 03:12:32 +00:00
}
2021-05-11 02:57:17 +00:00
}