-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## v1.0.7 | ||
|
||
- feat: sync element's width and height to context ([email protected]) | ||
- test: add test for loadFont, fixes #147 | ||
|
||
## v1.0.6 | ||
|
||
- fix: use encodeURIComponent when saving svg, fixes #176 (save() bug) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ and manipulating existing SVG file without rasterization. | |
|
||
```html | ||
<script src="https://unpkg.com/[email protected]/lib/p5.js"></script> | ||
<script src="https://unpkg.com/[email protected].6"></script> | ||
<script src="https://unpkg.com/[email protected].7"></script> | ||
``` | ||
|
||
Open your sketch.js and edit it: | ||
|
@@ -71,19 +71,8 @@ p5.RendererSVG is a class which extends p5.Renderer2D. | |
A mocked \<canvas\> element and a CanvasRenderingContext2D api are provided using [svgcanvas](https://github.com/zenozeng/svgcanvas), | ||
which is JavaScript Object that syncs proprieties and draws on \<svg\> element. | ||
|
||
## Building dist | ||
|
||
To build dist files after cloning repo, you can run: | ||
|
||
```bash | ||
npm install | ||
npm run build | ||
``` | ||
|
||
## Known issue | ||
|
||
### blendMode is not implemented yet. | ||
|
||
### Too many child elements | ||
|
||
Since SVG is XML-based, every call of the draw function will insert elements into it, and these elements keep existing even if they are not visible. So, long-time running will result in too many child elements. We recommend calling clear() in your draw function, which will trigger internal context.__clearCanvas() to remove elements. | ||
|
@@ -97,6 +86,17 @@ function draw() { | |
|
||
See https://github.com/zenozeng/p5.js-svg/issues/32 | ||
|
||
### blendMode is not implemented yet. | ||
|
||
## Building dist | ||
|
||
To build dist files after cloning repo, you can run: | ||
|
||
```bash | ||
npm install | ||
npm run build | ||
``` | ||
|
||
## Tests | ||
|
||
p5.SVG was driven by tests. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters