Taureon / aps-plus-plus

Hosting your own Arras Community Server, made very easy to get and edit!
GNU General Public License v3.0
33 stars 72 forks source link

My improved glow code, (tiny bit buggy) #183

Closed WaitWhatGliches closed 9 months ago

WaitWhatGliches commented 9 months ago

  ? gameDraw.modifyColor(m.glow.color)
  : gameDraw.mixColors(
      gameDraw.modifyColor(instance.color),
      render.status.getColor(),
      render.status.getBlend()
    );

if (m.glow.radius && m.glow.radius > 0) {
  const auraRadius = m.glow.radius * ((drawSize / m.size) * m.realSize);
  const auraDiameter = auraRadius * 2;

  context.save();
  context.beginPath();
  context.arc(xx, yy, auraRadius, 0, 2 * Math.PI, false);
  context.fillStyle = glowColor;
  context.globalAlpha = m.glow.alpha;
  context.shadowColor = glowColor;
  context.shadowBlur = auraRadius;
  context.shadowOffsetX = 0;
  context.shadowOffsetY = 0;
  context.fill();
  context.globalAlpha = 1;
  context.restore();
}

drawPoly( context, xx, yy, (drawSize / m.size) * m.realSize, m.shape, rot, instance.borderless, instance.drawFill, m.imageInterpolation
);```
Taureon commented 9 months ago

can you make a PR instead of this?

zephiii commented 9 months ago

@WaitWhatGliches if you want this to get added put it in a push request, not an issue