Skip to content

Releases: zenozeng/p5.js-svg

v0.4.1

15 Aug 13:55
Compare
Choose a tag to compare
v0.4.1 Pre-release
Pre-release

[email protected] (built on top of [email protected], with patch#850)

Fix some issues in IE and Safari.

p5.SVG

  • Update documentation
  • Use Node.childNodes for IE
  • Update test/io/save/canvas's-save, fixes #123
  • Use to display tests, ignore diff, workround for #124
  • use devicePixelRatio for diffCanvas in tests, fixes #125

svgcanvas

  • Use parentNode.removeChild instead of childNode.remove for IE, fixes #120
  • Patch for IE's bug: search for a duplicate xmnls, fixes #121
  • Use Node.childNodes for IE

v0.4.0

14 Aug 14:02
Compare
Choose a tag to compare
v0.4.0 Pre-release
Pre-release

p5.svg

[email protected] (built on top of [email protected], with patch#850)

Filters

  • 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.

p5.SVGElement

  • 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

RendererSVG

  • image(SVGElement) now supported

IO

  • 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)

Etc

  • 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

svgcanvas

  • replace encodeURI with encodeURIComponent in toDataURL
  • use new XMLSerializer().serializeToString(this.svg)
  • remove the buggy Context.prototype.getSerializedSvg

v0.3.0

09 Aug 06:21
Compare
Choose a tag to compare
v0.3.0 Pre-release
Pre-release

[email protected] (built on top of [email protected])

CHANGELOG

p5.svg

  • add p5.RendererSVG (extends p5.Renderer2D)
  • use [email protected]
  • 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 (#35)
  • Fix issues in test-render

svgcanvas

  • Use div to wrapper svg, fixes #84
  • check isNaN for width and height
  • fixes wrong position issue of drawImage

v0.2.0

17 Jun 16:43
Compare
Choose a tag to compare
v0.2.0 Pre-release
Pre-release

[email protected] (built on top of [email protected])

  • save()
  • saveFrames()
  • saveSVG()

v0.1.1

09 Jun 06:17
Compare
Choose a tag to compare
v0.1.1 Pre-release
Pre-release

Basic p5.js functions support.