- Provide two different ways of working with the p5.js API:
- Using the
<P5 />
component that expects a sketch property (same api as https://github.com/tonyketcham/p5-svelte) - Via the
<Sketch />
component (previously named<P5 />
)with a lot of props, methods and components for working with the API.
- Using the
- Sketch (previously named P5)
- P5 (expects only a sketch as property)
- Prevent memory leakage by running
P5js.remove()
on destroy
- Created an internal
setupComponent
method - Parameters
<Background />
,<Fill />
and<Stroke />
are resolved in the same way as the p5js documentation defines it
- The
<P5 />
component is now mounted in a container instead of being mounted to the body. This also fixed an annoying HMR bug during development.
- Clear
- Erase
- Fill
- NoFill
- NoStroke
- Stroke
- Background
- Canvas
- Circle
- Draw
- Ellipse
- Fill
- P5
- Setup