From e931e1308703685e295b698f7ea58a640b41be1e Mon Sep 17 00:00:00 2001 From: "Tsunami014 (Max)" Date: Wed, 4 Dec 2024 11:56:02 +1100 Subject: [PATCH] =?UTF-8?q?feat(other):=20=F0=9F=90=9B=201.=20Made=20the?= =?UTF-8?q?=20end=20points=20a=20different=20colour=20for=20debugging=20an?= =?UTF-8?q?d=202.=20fixed=20it=20so=20now=20the=20constraints=20are=20work?= =?UTF-8?q?ing=20properly!!!=20:D=20:D=20:D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BlazeSudio/utils/wrap/makeShape.py | 2 +- demos.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/BlazeSudio/utils/wrap/makeShape.py b/BlazeSudio/utils/wrap/makeShape.py index f9510d4..45e4f14 100644 --- a/BlazeSudio/utils/wrap/makeShape.py +++ b/BlazeSudio/utils/wrap/makeShape.py @@ -186,7 +186,7 @@ def makeShape(self): # Thanks SO MUCH to https://math.stackexchange.com/question y = y0 + radius * math.sin(phi) phi += theta(L, radius) njs.append((x, y)) - self.joints = njs[startingi:] + njs[:startingi] + [njs[startingi]] + self.joints = [njs[i-startingi] for i in range(len(njs))] + [njs[-startingi]] def straighten(self): for i in range(len(self.joints)-1): diff --git a/demos.py b/demos.py index 7a175dd..19e83c0 100644 --- a/demos.py +++ b/demos.py @@ -367,11 +367,15 @@ def WrapBasicDemo(): else: col = (255, 255, 255) pygame.draw.line(win, col, segs[i][0], segs[i][1], 10) + idx = 0 for j in main.joints: if j == selectedJoint[1]: pygame.draw.circle(win, (255, 100, 100), j, 5) + elif idx in (0, len(main.joints)-1): + pygame.draw.circle(win, (200, 50, 200), j, 5) else: - pygame.draw.circle(win, (10, 50, 255), j, 5) + pygame.draw.circle(win, (100, 100, 255), j, 5) + idx += 1 if selectedSegment is not None: h = boxSze+gap*2