Skip to content

Commit

Permalink
v0.2.0 (#133)
Browse files Browse the repository at this point in the history
* Init rewrite and display modules

* wip layout rewrite

* Layout: rerender from tree object

* Render sibling on change module

* Fix layout toolbar and add opposite type to col/row

* Layout:: swap root

* rewrite ui components

* wip sketchRenderer and sync sketch with localStorage

* FieldTriggers: save to localStorage and restore

* Persist layout

* Sketches: persist

* Exports: persist state and ui

* Layout: fix persist

* Rendering: simplify api

* remove log

* Rendering: persist state

* Field: extract icons to components

* VectorInput: fix derived state

* Restore fixed dimensions on resizing change

* Layout: allow minimized column

* Fix ColorInput and add support for three and rgb string objects

* ColorInput: refresh text value on three change

* Fix Midi Panel new event

* Prevent errors on GL renders

* ColorInput: treat three as an object

* Fix hydrate if nothing exists

* SketchRenderer: fix mountParams.canvas and add record

* Sketch: wip keep props references

* Preserve references of prop.value

* Fix pointer issue for primitives prop value

* ColorInput: remove log

* GLSL errors: point to state

* Wip rearchitecture

* wip render with rendering.svelte

* restore props between refreshes and sketch updates

* fix midi triggers not firing

* fix sketch reset framerate and errors

* Sketch: rerender when trigger or props change and framerate 0

* fix rendering for custom framerates

* Handle screenshot and hooks from sketch

* Handle record canvas

* Support filenamepattern and exportDir

* Handle hot triggers

* Handle sketch backgroundColor

* FloatingParams: switch to runes

* LayoutComponent :: prettier

* prettier

* Interval input: avoid binding

* cleanup

* update dependencies

* update dependencies

* Preview and build

* fix restoration of rendering after preview

* fix three rendering by switching render to class and array

* fix rendering for sketch with fps=0

* Rerender when shader update and framerate is 0

* fix shader errors from p5GLRenderer

* Fix rendering when no renderer

* Add hint for sketch paused

* fix position paused hint

* Rename hints

* SketchRenderer: loading state

* Module: support headerRight snippet

* Wip console rewrite

* wip console

* prevent persistence of rendering and exports in build mode

* Layout: fix actions by switching to array

* Fix layout save and restore

* Fix layout save and restore

* Fix layout switch to preview

* Fix build layout

* Build: fix max height of floating params

* Floating params: rename container

* Add params to layout components and add props groups

* Sketch: prevent resize if sketch is not loaded

* clean

* clean

* Render sketch at native framerate if fps not specified

* Params: add output option when sketch has multiple props groups

* SketchRenderer: remove check for shader update

* Prevent weird unmount/remount because of ModuleRenderer

* fix

* fix console layout registering

* clean

* LayoutComponent: fix binding to dom element

* Fix floating params minimize and filter group

* Allow record overlay to pass pointer events

* FragmentGL: add data-engine attribute

* Field: prettier syntax

* Rendering: unmount existing sketch before mounting again

* Layout: check if parent exists for removal

* Params: allow filtering without relying on layoutComponent + fix output display in preview

* Floating params: fix overflow

* Rendering: fix swapable canvas and ref error

* Sketch: fix hidden reactive to other props change and fix displayName for props

* Resize of rendering is handled through monitors instead of sketchrenderer

* prettier

* error overlay: fix import

* use single timeout for resync rendering instead of one per render

* Fix render playhead playcount and listen canvas resize

* Fix overflow scrolling for floating params

* Interval Input: rewrite

* Monitor: handle multiple sketches selection

* Console: auto scroll to bottom with css

* Console: fix rendering of nested objects

* ErrorOverlay: prevent filtering issue

* THREERenderer: support hot reloading in extended materials

* Cleanup record from sketch

* Params: fix display of framerate when fps is set to 0

* Rendering: handle concurrency for long loads + fix useDuration

* layout: remove log

* CanvasRecorder: add duration to create recording

* Monitor: fix selected value reset

* Fix preview sketch selection

* Fix ButtonInput label

* fix button and select inputs

* reactive props

* Extend Vite config with fragment.config.js

* Prevent layout bug on minimized

* prevent crash if props is not defined

* Fix examples types

* Update record keyboard shortcut

* Render sketch fields tree in order

* Restore folder collapsed state between refreshes

* Restore folder state between hmr and hard reloads

* Sync folder wip

* Sync folder from derived tree

* Handle params tree in module instead of in sketch

* Handle folder collapsed state through syntax

* Fix rendering

* Use name for display if it exists

* Remove aspect ratio computation

* Expose screenshot in helpers

* add config filepath to command line option

* Add default name to screenshot

* Layout resize: trigger computation on mousedown

* prettier

* Console: fix clear button action

* Remove ref to console stores

* Remove ref to stores and fix locking of dimensions

* Protect undefined p in P5GLRenderer

* Remove ref to stores

* Layout: fix insertion

* Triggers onChange for props on sync

* Compute pixelRatio in uniforms.uResolution

* Remove deprecated event dispatcher

* Rename MIDI localStorage key

* Build: default to gui being on the right

* Split renders and rendering

* Fix Exports module default layout id

* Update dependencies

* Update vite and svelte versions

* Fix select styles on Windows

* Conditional snippet

* Remove ref to stores in hooks
  • Loading branch information
raphaelameaume authored Jan 20, 2025
1 parent e8d12ee commit c1a555f
Show file tree
Hide file tree
Showing 107 changed files with 5,784 additions and 3,004 deletions.
4 changes: 2 additions & 2 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ prog.command('run [entry]', '', { default: true })
emptyOutDir: options.emptyOutDir,
base: options.base,
prompts: options.prompts,
config: options.config,
configFilepath: options.config,
});
}

run(entry, {
development: options.development,
exportDir: options.exportDir,
port: options.port,
config: options.config,
configFilepath: options.config,
});
});

Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [Hot Shader Replacement](./guide/hot-shader-replacement.md)
- [Custom renderers](./guide/custom-renderers.md)
- [Reactive props](./guide/reactive-props.md)
- [Configuring Fragment](./guide/configuring-fragment.md)
- [Shortcuts](./guide/shortcuts.md)

## APIs
Expand Down
24 changes: 24 additions & 0 deletions docs/guide/configuring-fragment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#### <sup>[fragment](../../README.md)[Documentation](../README.md)[Guide](../README.md#guide) → Configuring Fragment</sup>
<br>

# Configuring Fragment

When starting `fragment` from the command line, Fragment will automatically try to resolve a config file named `fragment.config.js` at the root.

Fragment configuration file is optional and can only be used to specify Vite configuration options inside a `vite` object in the config.

```js
export default {
vite: {

}
}
```

You can refer to [Vite's documentation](https://vitejs.dev/config/) to see the available options. The resolved configuration is merged with Fragment's own Vite configuration following the `mergeConfig` [strategy](https://vitejs.dev/guide/api-javascript.html#mergeconfig).

You can specify another filepath for configuration with the `--config` flag on the command line such as:

```bash
fragment sketch.js --config custom/path/to/config.js
```
Loading

0 comments on commit c1a555f

Please sign in to comment.