diff --git a/app/react-components/targeting-ghost.jsx b/app/react-components/targeting-ghost.jsx index 7e207ac..dc84bcd 100644 --- a/app/react-components/targeting-ghost.jsx +++ b/app/react-components/targeting-ghost.jsx @@ -12,7 +12,7 @@ const radius = 17; function makeFade(renderer) { const fade = new Graphics(); fade.beginFill(0xffffff); - fade.alpha = 0.4; + fade.alpha = 0.5; fade.drawCircle( tileSize.x * (radius / 2), tileSize.y * (radius / 2), @@ -61,12 +61,13 @@ const TargetingGhostInternal = PixiComponent('TargetingGhost', { container.addChild(fade, grid, innerGrid); return container; }, - applyProps: (container, oldProps, {x, y, tint}) => { + applyProps: (container, oldProps, {x, y, pulse}) => { container.x = x - (x % tileSize.x) + (tileSize.x / 2) - (tileSize.x * (radius / 2)); container.y = y - (y % tileSize.y) + (tileSize.y / 2) - (tileSize.y * (radius / 2)); + container.children[0].alpha = 0.5 + (pulse / 2); container.children[0].x = x % tileSize.x - (tileSize.x / 2) ; container.children[0].y = y % tileSize.y - (tileSize.y / 2) ; - const color = Math.round(255 - (tint * 255)); + const color = Math.round(255 - (pulse * 255)); container.children[2].tint = `rgb(${color}, ${color}, ${color})`; }, }) @@ -87,7 +88,7 @@ export default function TargetingGhost({x, y}) { app={app} x={x} y={y} - tint={(Math.cos(radians) + 1) * 0.5} + pulse={(Math.cos(radians) + 1) * 0.5} /> ); }