From 93cb69e99a67c5f5063dd602e42f4defa147ca93 Mon Sep 17 00:00:00 2001 From: cha0s Date: Thu, 1 Aug 2024 00:40:06 -0500 Subject: [PATCH] refactor: targeting ghost --- app/react/components/pixi/ecs.jsx | 8 ++++---- app/react/components/pixi/targeting-ghost.jsx | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/react/components/pixi/ecs.jsx b/app/react/components/pixi/ecs.jsx index ee448e4..c64e768 100644 --- a/app/react/components/pixi/ecs.jsx +++ b/app/react/components/pixi/ecs.jsx @@ -71,16 +71,16 @@ export default function Ecs({camera, monopolizers, particleWorker, scale}) { y={position.y} /> )} - {projected?.length > 0 && layers[0] && ( )} + ) } diff --git a/app/react/components/pixi/targeting-ghost.jsx b/app/react/components/pixi/targeting-ghost.jsx index 5298661..c1cece8 100644 --- a/app/react/components/pixi/targeting-ghost.jsx +++ b/app/react/components/pixi/targeting-ghost.jsx @@ -4,6 +4,8 @@ import {PixiComponent} from '@pixi/react'; import {useRadians} from '@/react/context/radians.js'; +import {deferredLighting} from './lights.js'; + const tileSize = {x: 16, y: 16}; const TargetingGhostInternal = PixiComponent('TargetingGhost', { @@ -25,6 +27,7 @@ const TargetingGhostInternal = PixiComponent('TargetingGhost', { const container = new Container(); container.alpha = 0.4; container.addChild(target, targetInner); + container.parentGroup = deferredLighting.diffuseGroup; return container; }, applyProps: (container, oldProps, {x, y, radians}) => {