Using Svelte

I want to use Svelte for the UI of the game I am making with playcanvas.

I used node.js to create a Svelte project and I created some simple UI and some UI events.
It works on its own, but I have no idea how to import it to Playcanvas.

When I searched I couldn’t find any mention of how to do it but I saw some people mentioning that they used Svelte in their Playcanvas projects so I believe it is possible.

Any kind of help is appreciated.

I’ve not used Svelte so this is based off a quick read on the site.

Either people are using PlayCanvas as a separate project that they import into a Svelte project (iframe or direct on a canvas on the page)

Or somewhere there is a browser compatible version of Svelte that can be imported into a PlayCanvas project.

1 Like