coatless-quarto / pyodide

Quarto extension to enable interactive Python code cells in HTML documents using Pyodide
http://quarto.thecoatlessprofessor.com/pyodide/
53 stars 3 forks source link

[Q&A]: Animations #22

Open AustenLamacraft opened 3 days ago

AustenLamacraft commented 3 days ago

What's your question?

In the past I've experimented with hooking Pyodide up to p5.js in the past to produce a visualisation of a Python simulation. This was a bit fiddly, as it involved using a bit Pyodide magic to turn Python objects into JS objects. Does quarto-pyodide allow any easier route to doing this?

coatless commented 3 days ago

In short: sort of.

In long: the extension handles the setup and loading done by assets/ising.js in your first code block. However, the later portions using JavaScript would need to be dealt with Pyodide's js module.

I probably would say this extension focuses more on simplifying the setup and deployment of Python code with Pyodide.