Tresjs / tres

Declarative ThreeJS using Vue Components
https://tresjs.org
MIT License
2.27k stars 107 forks source link

May be we could use vitepress-plugin-sandpack instead #261

Closed jerrywu001 closed 11 months ago

jerrywu001 commented 1 year ago

Sometimes previews fail for example with StackBlitz on mobile.

But we can use vitepress-plugin-sandpack instead. It's a vitepress plugin, and the syntax is concise, use the MD syntax directly.

Setup Steps https://vitepress-sandbox.js-bridge.com/custom-usage/custom.html

and also support Use snippets

Online demo: https://vitepress-sandbox.js-bridge.com/vite-templates/vite-vue-ts.html

image

alvarosabu commented 1 year ago

Ohhhh that was exactly what I was looking for @jerrywu001, I was considering implementing it on my own but it already has it.

I liked Stackblitz demos because they are interactive but it's true that it fails in certain browsers. Maybe we could add this as a fallback even.

Great idea

alvarosabu commented 11 months ago

Hi @jerrywu001 we ended up using https://play.tresjs.org/ which is a Tres REPL to replace Stackblitz doc examples