Skip to content

Commit b9efa2d

Browse files
authored
fix: draw goal vectors under agents but above paths (#45)
1 parent dbaf163 commit b9efa2d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mapf-visualizer",
33
"private": true,
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src/PixiApp.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,12 @@ const PixiApp = forwardRef(({
278278
agentPathsRef.current.partial.addChild(new PIXI.Container());
279279
});
280280

281+
// Goal vectors
282+
const goalVectors = viewport.addChild(goalVectorsRef.current);
283+
solution[solution.length - 1].forEach(() => {
284+
goalVectors.addChild(new PIXI.Graphics());
285+
});
286+
281287
// Agents
282288
const agents = viewport.addChild(new PIXI.Container());
283289
agentsRef.current = agents;
@@ -310,12 +316,6 @@ const PixiApp = forwardRef(({
310316
idText.x = -idText.width / 2;
311317
idText.y = -idText.height / 2;
312318
});
313-
314-
// Goal vectors
315-
const goalVectors = viewport.addChild(goalVectorsRef.current);
316-
solution[solution.length - 1].forEach(() => {
317-
goalVectors.addChild(new PIXI.Graphics());
318-
});
319319

320320
const animate = () => {
321321
if(timestepTextRef.current) {

0 commit comments

Comments
 (0)