<iframe id="api-frame"></iframe>
html,
body {
padding: 0;
margin: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
}
iframe {
width: 100%;
height: 100%;
border: 0;
}
xxxxxxxxxx
const iframe = document.getElementById("api-frame");
const client = new Sketchfab(iframe);
client.init("dGUrytaktlDeNudCEGKk31oTJY", {
autostart: 0,
success: (api) => {
api.addEventListener("viewerready", () => {
api.setBackground({ color: [0, 0.8, 0.6] });
});
},
error: () => console.error("Sketchfab API error")
});
This Pen doesn't use any external CSS resources.