Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// 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);
}
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),
];
}
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),
];
}
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),
];
}
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),
];
}
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),
];
}
}
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),
];
}
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);
}
}
],
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]
}
public instance() {
return new ExtraFilters.CRTFilter();
}