12 lines
391 B
TypeScript
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';
|
|
}
|
|
}
|
|
|