Files
tower/ts/simple_tile.ts
2021-05-11 05:28:20 +00:00

12 lines
391 B
TypeScript

import { AnimatableTile } from './animatable_tile.js';
export class SimpleTile extends AnimatableTile {
constructor(width: number, height: number, image_url: string, animations: Map<string, [Keyframe[], object]>) {
super(width, height, animations);
this.elem.style.backgroundImage = `url('${encodeURIComponent(image_url)}')`;
this.elem.style.backgroundSize = 'cover';
}
}