fixed default rotation on containers and shapes, should be 0 degrees now
This commit is contained in:
parent
53c6a37741
commit
c451375ba3
@ -7,7 +7,7 @@ class shape {
|
|||||||
this.type = "string" == typeof type ? (["rect","elipse","image"].includes(type) ? type : "rect") : "rect";
|
this.type = "string" == typeof type ? (["rect","elipse","image"].includes(type) ? type : "rect") : "rect";
|
||||||
this.coordinates = coordinates instanceof vector ? coordinates : new vector([0,0]);
|
this.coordinates = coordinates instanceof vector ? coordinates : new vector([0,0]);
|
||||||
this.dimentions = dimentions instanceof vector ? dimentions : new vector([1,1]);
|
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([1,0]);
|
||||||
this.fColor = "string" == typeof fColor ? fColor : undefined;
|
this.fColor = "string" == typeof fColor ? fColor : undefined;
|
||||||
this.bColor = "string" == typeof bColor ? bColor : undefined;
|
this.bColor = "string" == typeof bColor ? bColor : undefined;
|
||||||
this.bStyle = "number" == typeof bStyle ? bStyle : undefined;
|
this.bStyle = "number" == typeof bStyle ? bStyle : undefined;
|
||||||
@ -89,7 +89,7 @@ class container {
|
|||||||
constructor(coordinates,dimentions,rotation) {
|
constructor(coordinates,dimentions,rotation) {
|
||||||
this.coordinates = coordinates instanceof vector ? coordinates : new vector([0,0]);
|
this.coordinates = coordinates instanceof vector ? coordinates : new vector([0,0]);
|
||||||
this.size = dimentions instanceof vector ? dimentions : new vector([1,1]);
|
this.size = 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([1,0]);
|
||||||
this.movementVector = new vector([0,0]);
|
this.movementVector = new vector([0,0]);
|
||||||
this.shapes = [];
|
this.shapes = [];
|
||||||
this.containers = [];
|
this.containers = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user