Here is the code for the ESM import (no header script)
async function initMacy(args, ctx) {
const { default: Macy } = await import('https://cdn.jsdelivr.net/npm/macy/+esm');
var macyInstance = new Macy({
container: '.macy',
trueOrder: false,
waitForImages: false,
margin: 20,
columns: 5,
breakAt: {
940: 3,
520: 2,
400: 1
}
});
}
the Macy instance can be tweaked to the requirements