THREE Cell embedded in Github Pages doesn't start

I am trying to embed a THREE renderer cell from this notebook on this github pages but it doesn’t show.

What do you think is happening?

1 Like

You have a cell that right below the THREE rendered cell (called threeFrame) that affects threeFrame indirectly. You need to name and embed that cell as well. You’ll also probably want to hide that cell with CSS as well. I forked your notebook so I could try it out; the following should work from that fork:

<div id="observablehq-threeFrame-9444c8b5"></div>
<div style="display: none" id="observablehq-doit-9444c8b5"></div>
<script type="module">
import {Runtime, Inspector} from "https://cdn.jsdelivr.net/npm/@observablehq/runtime@4/dist/runtime.js";
import define from "https://api.observablehq.com/d/62f37b4f90cb93b8.js?v=3";
new Runtime().module(define, name => {
  if (name === "threeFrame") return new Inspector(document.querySelector("#observablehq-threeFrame-9444c8b5"));
  if (name === "doit") return new Inspector(document.querySelector("#observablehq-doit-9444c8b5"));
});
</script>
1 Like

It works! Thanks a lot!!!

1 Like

That looks amazing, btw!

Haha thanks! Still a bit of work to get better perfs and a little DOM overlay to distract from the aberrations…