From 26edf8381fd14e58acc8bbcc25ac36d0e4c453f4 Mon Sep 17 00:00:00 2001 From: bluesaxman Date: Tue, 13 Sep 2022 11:47:46 -0600 Subject: [PATCH] fixed default rotation on containers and shapes, should be 0 degrees now --- libs/bluepixle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/bluepixle.js b/libs/bluepixle.js index 79c9f10..2cabd4c 100644 --- a/libs/bluepixle.js +++ b/libs/bluepixle.js @@ -7,7 +7,7 @@ class shape { this.type = "string" == typeof type ? (["rect","elipse","image"].includes(type) ? type : "rect") : "rect"; this.coordinates = coordinates instanceof vector ? coordinates : new vector([0,0]); this.dimentions = dimentions instanceof vector ? dimentions : new vector([1,1]); - this.rotation = rotation instanceof vector ? rotation : new vector([0,1]); + this.rotation = rotation instanceof vector ? rotation : new vector([0,-1]); this.fColor = "string" == typeof fColor ? fColor : undefined; this.bColor = "string" == typeof bColor ? bColor : undefined; this.bStyle = "number" == typeof bStyle ? bStyle : undefined; @@ -89,7 +89,7 @@ class container { constructor(coordinates,dimentions,rotation) { this.coordinates = coordinates instanceof vector ? coordinates : new vector([0,0]); this.size = dimentions instanceof vector ? dimentions : new vector([1,1]); - this.rotation = rotation instanceof vector ? rotation : new vector([1,0]); + this.rotation = rotation instanceof vector ? rotation : new vector([0,-1]); this.movementVector = new vector([0,0]); this.shapes = []; this.containers = [];