Skip to content

Commit

Permalink
fix: draw goal vectors under agents but above paths (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinShetty authored Feb 7, 2025
1 parent dbaf163 commit b9efa2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mapf-visualizer",
"private": true,
"version": "1.0.0",
"version": "1.0.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
12 changes: 6 additions & 6 deletions src/PixiApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@ const PixiApp = forwardRef(({
agentPathsRef.current.partial.addChild(new PIXI.Container());
});

// Goal vectors
const goalVectors = viewport.addChild(goalVectorsRef.current);
solution[solution.length - 1].forEach(() => {
goalVectors.addChild(new PIXI.Graphics());
});

// Agents
const agents = viewport.addChild(new PIXI.Container());
agentsRef.current = agents;
Expand Down Expand Up @@ -310,12 +316,6 @@ const PixiApp = forwardRef(({
idText.x = -idText.width / 2;
idText.y = -idText.height / 2;
});

// Goal vectors
const goalVectors = viewport.addChild(goalVectorsRef.current);
solution[solution.length - 1].forEach(() => {
goalVectors.addChild(new PIXI.Graphics());
});

const animate = () => {
if(timestepTextRef.current) {
Expand Down

0 comments on commit b9efa2d

Please sign in to comment.