12 lines
287 B
JavaScript
12 lines
287 B
JavaScript
|
export class Entity {
|
||
|
constructor() {}
|
||
|
async render(renderNode) {}
|
||
|
async update(renderNode) {}
|
||
|
}
|
||
|
|
||
|
export class Sprite extends Entity {
|
||
|
constructor(image) {
|
||
|
if (!(image instanceof Image))
|
||
|
throw TypeError("Image has to be instance of `Image`");
|
||
|
}
|
||
|
}
|