diff --git a/packages/graphics/stage.js b/packages/graphics/stage.js index f8a19ed..3db64b7 100644 --- a/packages/graphics/stage.js +++ b/packages/graphics/stage.js @@ -13,8 +13,9 @@ const decorate = compose( export class Stage extends decorate(Container) { - constructor(size) { + constructor(visibleSize, visibleScale) { super(); + const size = Vector.mul(visibleSize, visibleScale); // Container element. this.element = window.document.createElement('div'); this.element.className = 'avocado-stage'; @@ -58,6 +59,8 @@ export class Stage extends decorate(Container) { this.element.appendChild(this.ui); this.element.tabIndex = 0; this.on('cameraChanged', this.onCameraChanged, this); + // Set scale. + this.scale = visibleScale; } addToDom(parent) {