Commit c5e9c94d authored by Christian Winter's avatar Christian Winter

wip. bugfixes. renderpreviw

parent 90bd4031
......@@ -35,6 +35,9 @@
this.oldPosScreenSpace = Vector2.zero;
this.processingWaitingState = false;
this.mouseMovedAfterMouseDown = false;
// settings
this.finalRender = false;
}
mouseMove(e) {
......@@ -431,11 +434,9 @@
}
activate() {
this.canvas.style.background = Settings.canvasColor;
}
deactivate() {
this.canvas.style.background = 'darkred';
}
_updateCurrentPosition() {
......@@ -519,8 +520,8 @@
case Key.Tab:
if (!Logic.isPreviewing()) {
Logic.isRenderPreviewing = true;
Renderer.setQualitySetting("quality");
Application.redrawAllViews();
this.renderer.setQualitySetting("quality");
this.renderer.redraw();
}
break;
......@@ -553,8 +554,8 @@
case Key.Tab:
if (Logic.isPreviewing()) {
Logic.isRenderPreviewing = false;
Renderer.setQualitySetting(Preferences.qualitySetting);
Application.redrawAllViews();
this.renderer.setQualitySetting(Preferences.qualitySetting);
this.renderer.redraw();
}
break;
......
......@@ -233,16 +233,7 @@
GUI.qualitySelection.value = setting;
this.currentQualitySetting = setting;
}
tmpRedraw() {
this.view.context.clearRect(0, 0, this.view.canvas.width, this.view.canvas.height);
this.screenBounds = this.view.camera.getVisibleBounds();
for (let line of File.currentLayer.lines){
this.drawLineFromTo(line.start.position, line.end.position, line.thickness, line.color.toString(), false, false);
}
}
redraw(step) {
if (!this.view.context)
return;
......@@ -321,7 +312,7 @@
}
cutRenderPreview() {
if (this.view.context != context)
if (this.view.finalRender)
return;
let o = Preferences.artBounds.origin;
......@@ -416,7 +407,7 @@
size = size.multiply(this.view.camera.zoom);
// TODO not culled
if (this.view.context == context) {
if (!this.view.finalRender) {
this.view.context.fillStyle = 'white';
this.view.context.fillRect(origin.x, origin.y, size.x, size.y);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment