- docs: examples/vite
- refactor: p5svg -> p5SVG
- feat: TypeScript type declarations
- refactor: rewrite using TypeScript
- fix: clear after resizing should not have unwanted white background, fixes #235
- test: [email protected]
- chore(deps): upgrade deps
- fix: make .image() use the transformation matrix (Michael Elsdörfer) (zenozeng#227)
- fix: add cjs output, fixes #217
- docs: update examples/webpack
- docs: add examples/vite
- update package.main to dist/p5.svg.js, fixes #213
- fix(SVGCanvasElement): addEventListener, fixes zenozeng#202, fixes zenozeng#196
- feat: loadPixels() for zenozeng#203
- fix(graphics): call RendererSVG with this instead of pInst
- fix: _pixelDensity for drawing image created by createGraphics
- refactor: RendererTester
- refactor: use Renderer2D.prototype.line instead of RendererSVG.prototype.line
- refactor: use Proxy instead of _withPixelDensity
- fix: add p5.Color.prototype.indexOf, fixes zenozeng#204
- test: [email protected]
- fix: push/pop, fixes #191, fixes #192
- test: add test for push
- test: [email protected]
- fix: set $this for RendererSVG.prototype.parent, fixes #187
- feat: sync element's width and height to context ([email protected]), calling clear() in your draw function will now trigger internal context.__clearCanvas() to remove elements.
- test: add test for loadFont, fixes #147
- fix: use encodeURIComponent when saving svg, fixes #176 (save() bug)
- feat: implement CanvasTransform Interface, see gliffy/canvas2svg#83, fixes zenozeng#170,
- refactor: support [email protected], see zenozeng#182
- refactor: ESM
- refactor: remove loadGraphics
- fix: keep svgcanvas's root
<g>
when applying filter - fix: call _incrementPreload & _decrementPreload in p5.prototype.loadSVG, fixes zenozeng#168
- test: add test for resetMatrix, for zenozeng#170
- test: diff without converting to png
- test: update IO/saveFrames tests
[email protected] (tests with [email protected])
[email protected] (tests with [email protected])
-
Remove String.prototype.repeat polyfill
Since processing/p5.js#858 already fixed.
-
Replace
this._graphics
withthis._renderer
(for [email protected])
[email protected] (requires [email protected])
- Fix issues with unit tests
[email protected] (requires [email protected])
-
Fix loadSVG in [email protected]
-
RendererSVG.prototype.appendChild(SVGElement)
-
Configure ESLint and make it happy
-
Allow save SVGElement in save() and saveSVG()
-
add p5.prototype.registerSVGFilter
-
add p5.prototype.getDataURL
[email protected] (requires [email protected] with patch#850)
-
Write filter attribute every time filter applied, fixes zenozeng#137
-
Fix SVGElement.unfilter not work when arg not defined
-
Update documentation
-
Add examples for using p5.SVG
-
Use jsdoc3
[email protected] (requires [email protected], with patch#850)
-
add String.prototype.repeat polyfill: fixes zenozeng#126 & zenozeng#127
-
Update Browser Compatibility Info (add Safari 8 on Mac and Safari on iOS 8)
-
mocha.setup({timeout: 10000, slow: 2000})
-
Update documentation
[email protected] (built on top of [email protected], with patch#850)
Fix some issues in IE 10 and Safari (iOS).
-
Update documentation
-
Use Node.childNodes for IE
-
Update test/io/save/canvas's-save, fixes zenozeng#123
-
Use <svg> to display tests, ignore diff, workround for zenozeng#124
-
use devicePixelRatio for diffCanvas in tests, fixes zenozeng#125
-
Use parentNode.removeChild instead of childNode.remove for IE, fixes zenozeng#120
-
Patch for IE's bug: search for a duplicate xmnls, fixes zenozeng#121
-
Use Node.childNodes for IE
[email protected] (built on top of [email protected], with patch#850)
-
SVGFilters.apply(element, filter, arg)
-
filters chain using svg's in and result.
-
SVGElement.prototype.filter = function(filter, arg)
-
SVGElement.prototype.unfilter = function(filter, arg)
Undo the filter applied.
-
SVGFilters.colorMatrix = function(inGraphics, resultGraphics, matrix)
-
SVGFilters.blur using feGaussianBlur
-
SVGFilters.gray using feColorMatrix (CIE luminance)
-
SVGFilters.invert using feColorMatrix
-
SVGFilters.threshold using feColorMatrix and feComponentTransfer (linear feFunc)
-
SVGFilters.opaque using feColorMatrix
-
SVGFilters._discreteTableValues
Generate discrete table values based on the given color map function
-
SVGFilters.posterize using feComponentTransfer (discrete feFunc)
-
SVGFilters.erode using feOffset and feBlend
Will create 4 offset layer and combine them with current layer using darken blend mode.
-
SVGFilters.dilate using feOffset and feBlend
Will create 4 offset layer and combine them with current layer using lighten blend mode.
-
add p5.prototype.querySVG (querySelectorAll and map to SVGElement objects)
-
Extends p5.Element
-
SVGElement.prototype.query (querySelectorAll and map to SVGElement objects)
-
SVGElement.prototype.attribute (setAttributeNS, setAttribute and getAttribute)
-
SVGElement.prototype.append
-
SVGElement.create = function(nodeName, attributes)
-
SVGElement.prototype.parentNode()
Get parent node
-
SVGElement.prototype.parentNode(selector)
Get parent node matching given selector
-
SVGElement.prototype.matches = function(selector)
To tell whether a element matches certain selector
-
SVGElement.prototype._getDefs
Get defs element, or create one if not exists
- image(SVGElement) now supported
-
private method p5.prototype._svg_get that handles dataurl and http requests
-
force request to dataurl to be async so that it won't mess up preload
-
p5.prototype.loadSVG (will return a SVGElement Object)
-
RendererSVG's image() now uses directly instead of drawImage
-
use [email protected] & update tests, fixes #104
-
add testRender.lock and testRender.unlock
-
add testRender.setMaxDiff
-
add testRender.setMaxPixelDiff
-
replace encodeURI with encodeURIComponent in toDataURL
-
use new XMLSerializer().serializeToString(this.svg)
-
remove the buggy Context.prototype.getSerializedSvg
[email protected] (built on top of [email protected])
-
add p5.RendererSVG (extends p5.Renderer2D)
-
add p5.svg constants
-
add loadGraphics
-
patched p5.Graphics for p5.RendererSVG
-
Switch to browserify
-
Fix karma
-
Canvas now will be cleared when resize called
-
add RendererSVG.prototype._applyDefaults, fixes #95 (lineWidth issue)
-
Rendering functions (createCanvas(), resizeCanvas(), noCanvas(), createGraphics()) now covered with unit tests
-
use createCanvas(w, h, SVG) instead of createSVG(w, h)
-
set viewBox attribute when resize, fixes scale issue
-
add RendererSVG.prototype._withPixelDensity (temporally set pixel density to 1), fixes window scaled issue (zenozeng#35)
-
Fix issues in test-render
-
Use div to wrapper svg, fixes zenozeng#84
-
check isNaN for width and height
-
fixes wrong position issue of drawImage
[email protected] (built on top of [email protected])
- save()
- saveFrames()
- saveSVG()
Basic p5.js functions support.