Releases: raphaelameaume/fragment
v0.1.18
What's Changed
- Better p5.js documentation and example by @raphaelameaume in #119
- Fix build in current directory by @raphaelameaume in #120
- Fix print server urls in preview task by @raphaelameaume in #121
- Access params in sketch dispose function by @raphaelameaume in #122
- Delegate canvas resizing by @raphaelameaume in #126
- Update vite and vite-plugin svelte versions by @raphaelameaume in #127
- v0.1.18 by @raphaelameaume in #128
Full Changelog: v0.1.17...v0.1.18
v0.1.17
What's Changed
- Fix exportDir for frames exports by @raphaelameaume in #111
- Reset p5 matrix before sketch update by @raphaelameaume in #112
- Remove exports log by @raphaelameaume in #113
- Prevent error when field value is null by @raphaelameaume in #114
- Fix pixelRatio for p5 renderers by @raphaelameaume in #115
- Handle directory path in received filename by @raphaelameaume in #116
- Fix output not defined by @raphaelameaume in #117
- v0.1.17 by @raphaelameaume in #118
Full Changelog: v0.1.16...v0.1.17
v0.1.16
What's Changed
- CLI: add flag to disable interactive prompts by @raphaelameaume in #106
- Fix onDestroyPreview in p5 renderers by @raphaelameaume in #107
- Replace arrow function in p5 webGL template by @raphaelameaume in #108
- Prevent sketch update when loading by @raphaelameaume in #109
- v0.1.16 by @raphaelameaume in #110
Full Changelog: v0.1.15...v0.1.16
v0.1.15
- Remove FFMPEGRecorder and dependencies by @raphaelameaume in #64
- Fix initial values of playhead and playcount by @raphaelameaume in #69
- Pass current frame index to update by @raphaelameaume in #70
- Configurable preset orientation by @raphaelameaume in #65
- Fix passing props to sketch lifecycle functions by @raphaelameaume in #72
- Fix display of empty field by @raphaelameaume in #74
- Expose Vite base param to cli for production build by @raphaelameaume in #76
- Access width height and pixelRatio from prop onChange callback by @raphaelameaume in #78
- Fix posix separator issue on Windows by @raphaelameaume in #80
- Revert "Fix posix separator issue on Windows" by @raphaelameaume in #81
- Fix separator in generated files by @raphaelameaume in #82
- Interval input by @raphaelameaume in #83
- Fix field min-height by @raphaelameaume in #84
- Fix field displayName hot reload by @raphaelameaume in #85
- Remove unused font files by @raphaelameaume in #86
- Prettier formatting by @raphaelameaume in #87
- Run multiple sketches in the same folder by @raphaelameaume in #88
- Props: preserve changes made in browser when hot reloaded by @raphaelameaume in #89
- Add prettier format script by @raphaelameaume in #90
- Prettier formatting by @raphaelameaume in #91
- Update package-lock.json by @raphaelameaume in #92
- CLI refinements by @raphaelameaume in #93
- IntervalInput: dispatch change on number inputs by @raphaelameaume in #94
- Field: detect if value has changed with complex types by @raphaelameaume in #95
- Reset complex typed props and trigger onChange callback by @raphaelameaume in #96
- CLI: Improve error logs on missing arguments by @raphaelameaume in #97
- Fix print server urls by @raphaelameaume in #98
- Move sketches subscription in Init to avoid deduping by @raphaelameaume in #99
- Support saving multiple files at once by @raphaelameaume in #100
- Expose public path to lifecycle functions by @raphaelameaume in #101
- Support p5.js in WebGL mode by @raphaelameaume in #102
- Add JSDoc comments to templates by @raphaelameaume in #103
- Add dispose lifecycle function by @raphaelameaume in #104
- v0.1.15 by @raphaelameaume in #105
Full Changelog: v0.1.14...v0.1.15
[email protected]
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)
[email protected]
[email protected]
- bugfix: fix error when trying to create a build (#29)
- bugfix: fix values of
width
andheight
insketch.update()
(#30) - bugfix: keep types of initial options when using a Select component (#31)
- bugfix: fix pause rendering when hitting Space key (#32)
- bugfix: prevent black screenshots when using WebGL context (#34)
- bugfix: remove extra frame when recording a video with a fixed duration (#35)
- improvement: prevent unnecessary updates when dragging a Number component with a progress bar (#27)
- improvement: prevent local save in build (#33)
- improvement: add support for color arrays (#36)
- improvement: add
—exportDir
flag to change the directory used for exports (#37)
Breaking
- add support for no renderer at all (#28)
Sketches were usingrendering="2d"
by default. You need to specifyexport let rendering="2d"
in your sketch file if you want to use thecontext
provided by Fragment.
[email protected]
Global
Fix space in .npmignore filename #15 (@spenserblack)
Improve documentation
VectorInput (#19)
Remove Vec2Input and Vec3Input
Add support for Vector4
Fix reference update of prop.value
ColorInput (#20)
Fix HSL conversion
Fix HSL and HSLA strings interpolation
Improve the display of the input when color has an alpha channel
Add support for { r: 0, g: 0, b: 0}
and { r: 0, g: 0.5, b: 1: a: 1 }
objects.
Fix reference update of prop.value
Triggers (#21)
Fix save of key
for MIDI and Keyboards triggers in LocalStorage
Clear key on triggers change in UI