3 ms·
I think you missed the point. This is enabling you to use a declarative, component-based approach over three.js. You get to use templates and reactivity from Sv
by ricardobeat 5y ago
I think you missed the point. This is enabling you to use a declarative, component-based approach over three.js. You get to use templates and reactivity from Svelte. Ex: https://github.com/Rich-Harris/svelte-cubed/blob/main/src/routes/examples/_content/01-hello-world/index.svelte#L60 https://github.com/Rich-Harris/svelte-cubed/blob/main/src/ro...
That’s quite different from “what any developer does to use three.js on their website” which is usually imperative code in a render loop.
That the implementation itself [1] looks pretty vanilla is actually one of Svelte’s selling points! It would look a lot more complex with other frameworks.
[1] https://github.com/Rich-Harris/svelte-cubed/blob/main/src/lib/components/lights/AmbientLight.svelte https://github.com/Rich-Harris/svelte-cubed/blob/main/src/li...