22 lines
888 B
Markdown
22 lines
888 B
Markdown
# Vendored third-party assets
|
|||
|
|
|
||
|
|
## pixi.mjs — PixiJS 8.21.0 (MIT)
|
||
|
|
|
||
|
|
Topology graph renderer for the admin panel. Self-hosted on purpose: the panel
|
||
|
|
must not depend on a CDN at runtime (the CTF network is air-gapped during the
|
||
|
|
event, and a CDN outage would take the topology view down with it).
|
||
|
|
|
||
|
|
Provenance and upgrade path:
|
||
|
|
|
||
|
|
npm pack pixi.js@8
|
||
|
|
tar xzf pixi.js-8.21.0.tgz
|
||
|
|
cp package/dist/pixi.min.mjs panel/static/vendor/pixi.mjs
|
||
|
|
|
||
|
|
Use `pixi.min.mjs`, **not** `pixi.min.js`. The `.js` bundle is an IIFE that
|
||
|
|
discards its return value and exports no global, so it cannot be loaded with a
|
||
|
|
plain `<script>` tag. The `.mjs` build has real named exports and is loaded via
|
||
|
|
`await import('/static/vendor/pixi.mjs')` in `static/topo_pixi.js`.
|
||
|
|
|
||
|
|
Loading it dynamically (rather than a `<script>` in every page) keeps the ~800 KB
|
||
|
|
parse cost off panel loads that never open the Topology tab.
|