This is a extension for PixiJS v8 that provides a single display element for displaying a marquee selection. Also, sometimes called "Marching Ants". As Wikipedia says:
The marching ants effect is an animation technique often found in selection tools of computer graphics programs. It helps the user to distinguish the selection border from the image background by animating the border. The border is a dotted or dashed line where the dashes seem to move slowly sideways and up and down. This creates an illusion of ants marching in line as the black and white parts of the line start to move.
npm install @pixi/marquee-selection
import { Application } from 'pixi.js';
import { MarqueeSelection } from '@pixi/marquee-selection';
const app = new Application();
await app.init();
const marquee = new MarqueeSelection();
app.stage.addChild(marquee);