How to use pixi-filters - 10 common examples

To help you get started, we’ve selected a few pixi-filters examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dfinityexplorer / dfinityexplorer / web / src / Components / DfinitySymbolD3 / DfinitySymbolD3.js View on Github external
//  this.props.logoMode ?
      //    this.getNodeStrokeColorArray(node) : this.nodeFillColorArray);

      nodeOpacity = this.nodeOpacity;
      nodeRadius = this.nodeRadius;
    }

    node.graphics.clear();
    node.graphics.lineStyle(
      this.nodeStrokeWidth * this.scaleSimulationToPixi,
      nodeStrokeColor,
      nodeOpacity);
    node.graphics.beginFill(nodeFillColor, nodeOpacity);
    if (selectedNodeMagnitude) {
      node.graphics.filters = [
        new filters.GlowFilter(
          5,                          // distance
          4 * selectedNodeMagnitude,  // outerStrength
          0,                          // innerStrength
          nodeStrokeColor,            // color
          0.5)                        // quality
      ]
    }
    else
      node.graphics.filters = null;
    node.graphics.drawCircle(0, 0, nodeRadius * this.scaleSimulationToPixi);
  }
github dacaher / pixijs-ts-boilerplate / src / scripts / app / sample-app.ts View on Github external
bunny.y = Math.floor(i / 5) * 40;
            bunniesContainer.addChild(bunny);
        }

        text.position.set(bunniesContainer.width / 2, 0);

        bunniesContainer.hitArea = new PIXI.Rectangle(0, 0, bunniesContainer.width, bunniesContainer.height);

        this.filteredBunnies.x = this.app.initialWidth - this.filteredBunnies.width - 10;
        this.filteredBunnies.y = this.app.initialHeight - this.filteredBunnies.height;

        // Filters
        const filters = [
            new AsciiFilter(),
            new CRTFilter(),
            new GlowFilter(),
            new OldFilmFilter(),
            new ShockwaveFilter(new PIXI.Point(bunniesContainer.width / 2, bunniesContainer.height / 2)),
            new OutlineFilter(1, 0xFF0000),
        ];
    }
github dacaher / pixijs-ts-boilerplate / src / scripts / app / sample-app.ts View on Github external
bunny.x = (i % 5) * 40;
            bunny.y = Math.floor(i / 5) * 40;
            bunniesContainer.addChild(bunny);
        }

        text.position.set(bunniesContainer.width / 2, 0);

        bunniesContainer.hitArea = new PIXI.Rectangle(0, 0, bunniesContainer.width, bunniesContainer.height);

        this.filteredBunnies.x = this.app.initialWidth - this.filteredBunnies.width - 10;
        this.filteredBunnies.y = this.app.initialHeight - this.filteredBunnies.height;

        // Filters
        const filters = [
            new AsciiFilter(),
            new CRTFilter(),
            new GlowFilter(),
            new OldFilmFilter(),
            new ShockwaveFilter(new PIXI.Point(bunniesContainer.width / 2, bunniesContainer.height / 2)),
            new OutlineFilter(1, 0xFF0000),
        ];
    }
github dacaher / pixijs-ts-boilerplate / src / scripts / app / sample-app.ts View on Github external
bunniesContainer.addChild(bunny);
        }

        text.position.set(bunniesContainer.width / 2, 0);

        bunniesContainer.hitArea = new PIXI.Rectangle(0, 0, bunniesContainer.width, bunniesContainer.height);

        this.filteredBunnies.x = this.app.initialWidth - this.filteredBunnies.width - 10;
        this.filteredBunnies.y = this.app.initialHeight - this.filteredBunnies.height;

        // Filters
        const filters = [
            new AsciiFilter(),
            new CRTFilter(),
            new GlowFilter(),
            new OldFilmFilter(),
            new ShockwaveFilter(new PIXI.Point(bunniesContainer.width / 2, bunniesContainer.height / 2)),
            new OutlineFilter(1, 0xFF0000),
        ];
    }
github dacaher / pixijs-ts-boilerplate / src / scripts / app / sample-app.ts View on Github external
const bunny = new PIXI.Sprite(PIXI.loader.resources.bunny.texture);
            bunny.x = (i % 5) * 40;
            bunny.y = Math.floor(i / 5) * 40;
            bunniesContainer.addChild(bunny);
        }

        text.position.set(bunniesContainer.width / 2, 0);

        bunniesContainer.hitArea = new PIXI.Rectangle(0, 0, bunniesContainer.width, bunniesContainer.height);

        this.filteredBunnies.x = this.app.initialWidth - this.filteredBunnies.width - 10;
        this.filteredBunnies.y = this.app.initialHeight - this.filteredBunnies.height;

        // Filters
        const filters = [
            new AsciiFilter(),
            new CRTFilter(),
            new GlowFilter(),
            new OldFilmFilter(),
            new ShockwaveFilter(new PIXI.Point(bunniesContainer.width / 2, bunniesContainer.height / 2)),
            new OutlineFilter(1, 0xFF0000),
        ];
    }
github dacaher / pixijs-ts-boilerplate / src / scripts / app / sample-app.ts View on Github external
text.position.set(bunniesContainer.width / 2, 0);

        bunniesContainer.hitArea = new PIXI.Rectangle(0, 0, bunniesContainer.width, bunniesContainer.height);

        this.filteredBunnies.x = this.app.initialWidth - this.filteredBunnies.width - 10;
        this.filteredBunnies.y = this.app.initialHeight - this.filteredBunnies.height;

        // Filters
        const filters = [
            new AsciiFilter(),
            new CRTFilter(),
            new GlowFilter(),
            new OldFilmFilter(),
            new ShockwaveFilter(new PIXI.Point(bunniesContainer.width / 2, bunniesContainer.height / 2)),
            new OutlineFilter(1, 0xFF0000),
        ];
    }
github dacaher / pixijs-ts-boilerplate / src / scripts / app / sample-app.ts View on Github external
}

        text.position.set(bunniesContainer.width / 2, 0);

        bunniesContainer.hitArea = new PIXI.Rectangle(0, 0, bunniesContainer.width, bunniesContainer.height);

        this.filteredBunnies.x = this.app.initialWidth - this.filteredBunnies.width - 10;
        this.filteredBunnies.y = this.app.initialHeight - this.filteredBunnies.height;

        // Filters
        const filters = [
            new AsciiFilter(),
            new CRTFilter(),
            new GlowFilter(),
            new OldFilmFilter(),
            new ShockwaveFilter(new PIXI.Point(bunniesContainer.width / 2, bunniesContainer.height / 2)),
            new OutlineFilter(1, 0xFF0000),
        ];
    }
github source-academy / cadet-frontend / src / components / academy / game / filter-effects / filter-effects.js View on Github external
export function createGlowTexture(displayObject) {
  var width = displayObject.width + 2 * Constants.glowDistance;
  var height = displayObject.height + 2 * Constants.glowDistance;
  displayObject.position.x = width / 2;
  displayObject.position.y = height / 2;
  var container = new PIXI.Container();
  container.addChild(displayObject);
  var glowFilter = new Filters.GlowFilter(
    Constants.glowDistance,
    2.5,
    0,
    0xfffbd6,
    0.5
  );
  glowFilter.padding = Constants.glowDistance;
  return createTexture(container, [glowFilter], width, height);
}
github AlexVestin / musicvid.org / src / editor / animation / items / pixi / JSNation.js View on Github external
}
            ],
            projectUrl: "https://github.com/caseif/js.nation",
            description: "Trap Nation visualizer emulation in JavaScript.",
            license: this.LICENSE.REQUIRE_ATTRIBUTION,
            changeDisclaimer: true,
            imageUrl: "img/templates/JSNation.png"
        }

        this.graphics = info.graphics;
        this.container = info.container;
        this.resetPoints();
        this.analyser = new SpectrumAnalyser(this.folder);
        this.analyser.setUpGUI();
        this.container.addChild(this.graphics)
        const filter = new GlowFilter(40, 4, 0, 0xFF0000, 0.5);
        filter.padding = 50;
        this.container.filters = [filter]
    }

pixi-filters

[![Node.js CI](https://github.com/pixijs/filters/workflows/Node.js%20CI/badge.svg)](https://github.com/pixijs/filters/actions/workflows/nodejs.yml?query=branch%3Amain) [![npm version](https://badge.fury.io/js/pixi-filters.svg)](https://www.npmjs.com/packa

MIT
Latest version published 12 days ago

Package Health Score

76 / 100
Full package analysis

Similar packages