Commit 538a370a authored by Christian Winter's avatar Christian Winter

show center of selected prefabs

parent ff584129
Pipeline #4763451 passed with stage
in 1 minute and 34 seconds
......@@ -118,7 +118,7 @@ class Logic {
Camera.canvasOffset.x = canvas.width * 0.5;
Camera.canvasOffset.y = canvas.height * 0.5;
/*
//*
Saver.loadAutoSave();
/*/
Saver.newFile();
......@@ -174,7 +174,7 @@ class Logic {
Renderer.redraw();
if (Preferences.developerMode)
console.log(this.previousState + " --> " + this.currentState);
;//console.log(this.previousState + " --> " + this.currentState);
}
static setWaitingState(state) {
......
......@@ -157,18 +157,18 @@
offscreenCanvas.style.left = -doubleRadius;
offscreenCanvas.style.top = -doubleRadius;
offscreenthis.currentContext.beginPath();
offscreenthis.currentContext.strokeStyle = color;
offscreenthis.currentContext.fillStyle = color;
offscreenthis.currentContext.lineWidth = thickness;
offscreenthis.currentContext.arc(radius + thickness + margin, radius + thickness + margin, radius, 0, 2 * Math.PI);
offscreenContext.beginPath();
offscreenContext.strokeStyle = color;
offscreenContext.fillStyle = color;
offscreenContext.lineWidth = thickness;
offscreenContext.arc(radius + thickness + margin, radius + thickness + margin, radius, 0, 2 * Math.PI);
++this.drawnCirclesCounter;
if (filled)
offscreenthis.currentContext.fill();
offscreenContext.fill();
else
offscreenthis.currentContext.stroke();
offscreenContext.stroke();
let center = new Vector2(0, 0);
let circle = null;
......@@ -993,6 +993,8 @@
// draw prefab instances
for (let instance of Selection.data.prefabInstances) {
if (!Logic.isPreviewing())
this.batchCircle(instance.transform.position.addVector(deltaPos));
// TODO multibatching? or dont delete batch after rendering to reuse?
// light green outline
if (!Logic.isPreviewing()) {
......@@ -1013,5 +1015,7 @@
line.color
);
}
if (!Logic.isPreviewing())
this.renderBatchedCircles(2, 0, outlinecolor, false, true, true);
}
}
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