JSFiddle - React, Tailwind, and code Playground

by Bouh

HTML

<script src="https://pixijs.download/dev/pixi-legacy.min.js"></script>

CSS

body { margin: 0; overflow: hidden }

JavaScript

const app = new PIXI.Application({
	resizeTo: window,
  backgroundColor: 0x999999
});
document.body.appendChild(app.view);

const style = new PIXI.TextStyle({
  fill: "#333333",
  fontSize: 40,
	fontFamily: "Impact",
  fontWeight: 'bold',
});

PIXI.BitmapFont.from("NumFont", style, {
  chars: PIXI.BitmapFont.NUMERIC,
});

const text = new PIXI.BitmapText("0", { font: "NumFont" });

app.stage.addChild(text);

let counter = 0;
setInterval(() => {
  text.text = counter++ + '';
	style.fontFamily = "Arial";
}, 200);