WebIO – simple examples?

I’m hoping to display a simple Three.js visual in the plot panel of Juno; unfortunately the working examples I’ve found are either too basic (displaying pure html tags), or too complicated (plotly, with full interactivity etc.). I’ve resorted to generating a standalone html page for now, but it’s quite inconvenient to have to open a browser just to visualise an object’s geometry.

I wonder if someone might have an example to share that could point me in the right direction.

Here’s the javascript code I’d like to visualise, and below is my stunted attempt with WebIO,

w = Scope(imports=["//cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"])
# how do I check if this succeeded?

w(dom"div.container"(dom"p"("this is a test"))) # OK, I can display html

# how do I inject some code and have it interpreted as `<script>` ?

The p5.js example gives me an error in Juno, unfortunately:

Uncaught TypeError: log is not a function

so I can’t really get started from here.