I would like to embed and edit simple 3D graphics drawings in Markdown (or another lightweight markup language) documents. I know about support for 2D diagrams provided by Mermaid or GraphViz, but I'm looking for a similar option to embed a definition of a simple 3D scene, e.g.:
box((0, 0, 0), (1, 1, 1))
to get a unit cube.
I looked at X3D standard in JSON format, which seems to be suitable for this task, but I couldn't find any embeddings in Markdown editors/viewers.
If there is no suitable 3D solution, 2D graphics would be of some interest too.