PixiJS Filter measure() pass proof-of-concept

This is the version before merging the measure() pass.

by ShukantPal

HTML

<script src="https://pixijs.download/v5.2.0/pixi.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/pixi-filters.js"></script>
<!DOCTYPE html>
<html>
  <head>
    <title>PixiJS measure() p.o.c</title>
  </head>
  <body>
     <canvas id="target-view">
     </canvas>
  </body>
</html>

JavaScript

const canvas = document.getElementById('target-view');
const app = new PIXI.Application({
	view: canvas,
  width: 256,
  height: 256,
  backgroundColor: 0xeeeeee
});

const graphics = new PIXI.Graphics();
graphics.width = 128;
graphics.height = 128;
graphics.beginFill(0xff00ff);
graphics.drawCircle(64, 64, 64);
graphics.endFill();

graphics.filters = [
	new PIXI.filters.DropShadowFilter(),
  new PIXI.filters.DropShadowFilter(),
  new PIXI.filters.DropShadowFilter(),
  new PIXI.filters.DropShadowFilter(),
  new PIXI.filters.DropShadowFilter()
];
graphics.filters[0].autoFit = true;

graphics.x = -0;
graphics.y = -0;

app.stage.addChild(graphics);