Browse Source

tweaked lightpatch effect

tags/v0.3.3^2
Big Bad Waffle 4 years ago
parent
commit
3811047257
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      src/client/js/components/lightPatch.js

+ 7
- 0
src/client/js/components/lightPatch.js View File

@@ -36,6 +36,13 @@ define([
sprite.alpha = (maxAlpha * 0.3) + (Math.random() * (maxAlpha * 0.7));
sprite.tint = '0x' + this.color;

const size = (3 + ~~(Math.random() * 6)) * scaleMult;

sprite.width = size;
sprite.height = size;
sprite.x += scaleMult * ~~(Math.random() * 4);
sprite.y += scaleMult * ~~(Math.random() * 4);

sprite.blendMode = PIXI.BLEND_MODES.ADD;

this.patches.push(sprite);


Loading…
Cancel
Save