These past months, I've been rewriting the entire core of Fragment with the latest version of @svelte.dev!
It's 100% compatible with the previous version but has a bunch of new exciting features.
Let's look at one thing a day everyday (until I don't have anything new to show).
https://fragment.tools/
It's 100% compatible with the previous version but has a bunch of new exciting features.
Let's look at one thing a day everyday (until I don't have anything new to show).
https://fragment.tools/
Comments
Props values are now persisted across refreshes through local storage. They will only get overridden if you change their initial values in the code.
Props are now reactive by default!
You can update a prop value in your code and the UI will react accordingly. And it works with any prop attributes!
This brings a whole new dimension to Fragment as you can also create props on the fly and build reactive interfaces!
Demo ⬇️
After many unsuccessful attempts in the past years, I finally managed to make folders work as I wanted, thanks to @svelte.dev runes and snippets!
props.color.folder = "materials";
And it's fully reactive like any other props attributes!
Docs: https://github.com/raphaelameaume/fragment/blob/dev/docs/guide/organizing-props.md
Props can also be organised with groups! Groups are subsets of props that can be displayed in different modules.
https://props.color.group = "cubes";
Thanks to this, you can organise the layout to better reflect your workflow by having props wherever you want them to be.
Demo ⬇️
init() now supports async functions! While load() can still be used as before, this simplifies the share of resources between the two functions.
Also getting ready for p5.js 2.0 and WebGPU requestAdapter() 👀
Sketches now run at monitor's native framerate instead of the default 60 fps, bringing enhanced support for 120/144Hz monitors and smoother animations on high-refresh-rate displays.
A specific framerate can still be set with:
export let fps = 24;