Skip to content

fragment-tools@0.1.14

Compare
Choose a tag to compare
@raphaelameaume raphaelameaume released this 17 Nov 10:05
· 58 commits to dev since this release
a934266

Changelog v0.1.14

Features

Configure exports path from sketch (#49)

It is now possible to change the directory used for exports at the sketch level with a new named exports exportDir.
It also fixes a small issue with the filestamp used for naming exports. Hours used to generate the timestamp string were 12-hour and not 24-hour, which would cause the files to not be in order when displayed per name in File Explorer/Finder.

Custom renderers (#50)

It is now possible to define a custom renderer from a sketch file by using a new named export renderer which accepts a static or dynamic import. See the new segment Custom Renderers in the documentation for usage.

Bulk exports (#54)

This adds the possibility to do multiple exports in a single capture. It exposes new hooks to update your sketch between capture.

Resolve #include directives in shader files (#56)

Shader files now supports #include directives in files with .glsl, .vert, .frag, .fs, .vs extensions when used with three and fragment renderers. Under the hood, Fragment keeps track of shaders dependencies to reload only the ones affected by a dependency change.
It adds a new // @fragment-nohsr directive to disable Hot Shader Replacement when placed at the top of a file.

Make props reactive (#60)

Reactive props are now available through a newly exposed hook reactiveProps, making it easier to build conditional props, adding new props on the fly or simply reflect prop values changed from code.

Improvements

Support hidden prop flag function (#52)

The hidden key at the top level of a prop declaration now supports function so a prop can be hidden on reaction to an other prop change.

Remove label confusion with new prop.displayName (#53)

There was confusion on the existing prop.params.label, which was used for giving a label to or change the label of a BUT at the same time was overriding the name of the prop displayed on screen, therefore it was impossible to set a different text between the two.

This PR enables a new displayName at the top level of a prop declaration, keeping the existing params.label behaviour for .

Update to Vite 4 and Svelte 4 (#58)

Update to the latest major versions of the main dependencies.

Bugfixes

Fix disabling props (#51)

The disabled flag for props is now at the top level of a prop declaration instead of inside the nested params object. It also support functions so disabled behaviour can be reactive to other prop changes.

Fix hot reloading props (#55)

This fixes an issue happening when adding/removing props, as Svelte loose track of the UI already rendered without a proper key in the #each block.

Prevent svelte warning when prop has no displayName (#57)

Remove a warning introduced by #53

Fix triggers when used with wildcard or number argument (#61)

This fixes a bug happening when using triggers with a single function argument or a number argument instead of string.

Docs

Add principles to About section (#59)