moved 'background' to drawShapes for the time being

This commit is contained in:
Gavin McDonald
2018-09-01 15:01:01 -04:00
parent 3ded7cf4f0
commit 1f2131c992
4 changed files with 12 additions and 16 deletions

View File

@@ -6,7 +6,6 @@ export default class Sketch {
[
'getContext',
'background',
'onResize',
'render',
].map(method => this[method] = this[method].bind(this));
@@ -33,14 +32,6 @@ export default class Sketch {
return this.context;
}
background ({red, green, blue, alpha}) {
this.context.beginPath();
this.context.rect(0, 0, this.canvas.width, this.canvas.height);
this.context.fillStyle = getColor({red, green, blue, alpha});
this.context.closePath();
this.context.fill();
}
onResize (event) {
const width = this.container.offsetWidth;
const height = this.container.offsetHeight;