zoomable_lottie = {
let s = 500;
let w = 180;
let h = 180;
let container = d3
.create("svg")
.attr("viewBox", [0, 0, w, h])
.style("width", `${s}px`)
.style("height", `${s}px`);
let g = container.append("g");
container.call(
d3
.zoom()
.extent([
[0, 0],
[w, h]
])
.scaleExtent([0.2, 5])
.duration(500)
.on("zoom", function (evt) {
g.attr("transform", evt.transform);
})
);
yield container.node();
lottie.loadAnimation({
container: g.node(),
renderer: "svg",
loop: true,
autoplay: true,
path
});
}