parent
b532c94438
commit
9462ba06fb
@ -0,0 +1,17 @@
|
|||||||
|
export class Background {
|
||||||
|
|
||||||
|
private ctx: CanvasRenderingContext2D
|
||||||
|
|
||||||
|
constructor(ctx: CanvasRenderingContext2D) {
|
||||||
|
this.ctx = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
render(canvasRect: DOMRect) {
|
||||||
|
const { width, height } = canvasRect
|
||||||
|
this.ctx.save()
|
||||||
|
this.ctx.fillStyle = '#ffffff'
|
||||||
|
this.ctx.fillRect(0, 0, width, height)
|
||||||
|
this.ctx.restore()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
export const EDITOR_COMPONENT = 'editor-component'
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
export enum EditorComponent {
|
||||||
|
MENU = 'menu',
|
||||||
|
MAIN = 'main'
|
||||||
|
}
|
||||||
Loading…
Reference in new issue