From f8587d845d65599e2a7bfadfb789d0e143af05bf Mon Sep 17 00:00:00 2001 From: bluesaxman Date: Thu, 10 Feb 2022 08:59:22 -0700 Subject: [PATCH] minor refrence error fixed --- libs/bluepixle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/bluepixle.js b/libs/bluepixle.js index ced7fe6..431a755 100644 --- a/libs/bluepixle.js +++ b/libs/bluepixle.js @@ -118,7 +118,7 @@ class container { rotation = rotation instanceof vector ? rotation : new vector([0,1]); var refPos = this.coordinates.add(position); var refRot = rad2vec(this.rotation.getRadAngle() + (rotation instanceof vector ? rotation : new vector([0,1])).getRadAngle()); - var center = this.refPos.add(this.dimentions.mag(0.5)); + var center = refPos.add(this.dimentions.mag(0.5)); ctx.translate(center.d[0],center.d[1]); ctx.rotate(refRot.getRadAngle()); ctx.translate(-center.d[0],-center.d[1]);