Skip to content

Commit

Permalink
feat(other): 🐛 1. Made the end points a different colour for debuggin…
Browse files Browse the repository at this point in the history
…g and 2. fixed it so now the constraints are working properly!!! :D :D :D
  • Loading branch information
Tsunami014 (Max) authored and Tsunami014 (Max) committed Dec 4, 2024
1 parent 1e06147 commit e931e13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion BlazeSudio/utils/wrap/makeShape.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 5 additions & 1 deletion demos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e931e13

Please sign in to comment.