- Adding
limit()
toRune.Vector
- Fixing bug where updating a color with alpha
0
would keep it opaque (Jorge Moreno)
- Adding
Rune.Node
to inject SVG nodes into the stage. Can be used if Rune.js does not support a specific tag.
fill()
andstroke()
now supportfalse
(which renders no attribute) and'none'
(which renders fill="none").- Smaller filesize by procedurally adding getters and setters.
fill()
andstroke()
will now disable fill if the string 'none' is passed to them.fill()
andstroke()
will no longer insertfile="none"
if set to false.- Replaced
lodash.each
with for loops for speed and size improvements. - Replaced
lodash.map
with nativemap()
for speed and size improvements. - Replaced
lodash.flatten
with customflatten()
for speed and size improvements. - Replaced
lodash.defaults
withlodash.assign
for size improvements. - Replaced
lodash.assign
withobject-assign
for size improvements. - Replaced
lodash.without
with customwithout
for size improvements. - Unminified size went from 215kb to 160kb
Rune.Group
can now acceptfill()
,stroke()
, and all other styling functions. This makes it easy to have a default style for all shapes in a group.- Massive rewrite of tests that tried to be too smart.
Rune.Color
objects now acceptsrgb()
andrgba()
strings.
- Calling
remove
on a group with a shape that is not in the group will not remove another shape in the group. - Adding
viewBox
attribute on resulting SVG.
- Fixed a giant bug with re-rendering of children if they were removed/added to a group.
- The npm package now has a
/dist/rune.js
folder packaged for the browser.
- Actually fixing problem with re-rendering after removing child from group
- Fixing problem with re-rendering after removing child from group
- Renamed
Grid.modules
toGrid.children
and combined functionality withRune.Group
- Added
Rune.map()
function. Thanks to Yining Shi!
- Fixing rendering problem when using
shape.removeParent()
- Fixing toPolygon for ellipse and circle. Now not doubling in size because of radius/diameter shuffling
- Removing ability to use percentage string in constructor. Should be done in CSS.
- Better handling for node and browser if instantiating an object with percentage strings or no values for width and height.
- Added
setStart(x, y)
andsetEnd(x, y)
toLine
. - You can now use percentage strings when instantiating a Rune.js object in a browser.
r.width
andr.height
will be dynamically set to dimensions of the SVG based on browser rendering.
This release changes the existing API. It fixes a number of problems discovered while using Rune.js. Most important, it implements a new React-inspired rendering mechanism that only re-renders changed objects. The library used to loop through every object to generate a virtual DOM patch. This would make the actual DOM change fast, but it still took up a lot of memory to iterate through every object. This new release changes the rendering so only shapes that changes are re-rendered in memory, making the library efficient both in the memory cycles and in the the DOM manipulation phase.
.vars
is now called.state
draw
event is now calledupdate
. This should make it clearer to not to Processing-style overpainting.- Implemented a new rendering strategy. This makes it a no no to change
.state
directly without calling the.changed()
method on a shape..changed()
is automatically called for all shape functions that change the shape. Render time for 10k shapes fell from 12 seconds to 400 milliseconds. Line
methodmove()
now moves the entire line and not just the starting position.- Shape functions no longer accept vectors. Will re-implement soon.
- All mouseevents were off when the window scrolled
- Code is now node modules instead of ES6. This makes a lot of things easier.
- Rendering is now a bit faster.
- Most drawing functions now take vector arguments. Thanks to @philcn.
- Added
Utils.round()
to fix browser inconsistencies. Thanks for @danielmcq.
Polygon
methodcentroid()
now calculates centroid as closed shape.
- Publish failed. Republishing.
- SVG now has correct namespaces
- Rendering is improved drastically by using internal color values
- Debug mode now works in groups too
- Adding
Image
to draw images in a SVG element strokeWidth
is now scaled when calling.scale()
on a shape- Adding
round()
function to rectangles
- Certain shape variables weren't copied when using
copy()
. Now fixed.
- Adding
mousedown
mouse event - Adding
mouseup
mouse event - Adding
click
mouse event
- Adding
scale()
to all shapes - Adding
scale()
to groups
- Removing colorString library to shrink size of library.
Polygon
now has acontains(x,y)
function to know whether a point is inside or outside a polygon- Group and shapes now have a
stagepos()
function that returns their absolute position according to the stage - Removing
Groupable
mixin in favor ofShape
- Replacing underscore with lodash to shrink size of library
- Updated code to use Babel 6
- Removed bezier.js library to shrink size of library
- Text shapes are not copied with all their variables when calling
copy()
.
- Adding
Grid
getModule
to easily access a grid module. - Changing internal represenation of module from array of arrays to a single array of modules.
- Triangle
move()
now moves the entire triangle, not just the starting point.
- Fixing bugs around variables shadowing function names, which makes
Rune.js
work in Safari and most mobile browsers.
- Fixing a bug around
requestAnimationframe
not getting cancelled if used within thedraw
listener. issue
- NPM package now ships
rune.browser.js
for easy of install.
- Quick fix to not break node when checking for window.
- The npm package no longer has a
Rune
global. Require statement has to look likevar Rune = require('rune.js')
- Complete rewrite of test structure and gulpfile used to generate NPM and Github releases. NPM tarball now actually works.
Rune.js
is now tested and working in server-side node. Hurrah!
- Removing
rgba()
fill and stroke values and introducing straight uprgb()
withfill-opacity
andstroke-opacity
, as Illustrator does not recognizergba()
.
- Adding direct access to
Color.Convert
functions.
- Adding
Triangle
andr.triangle()
- Fixing some math in the
Polygon
bounds()
function - Bounds and
bounds()
andcentroid
now return aVector
that hasn't the shape positions added. They now return internal representations.
- Rerelease because I don't understand how GitHub releases work.
Grid
gutterX
andgutterY
has been renamed togutterWidth
andgutterHeight
.- Added
removeParent()
to all shapes to remove them from parent - Added
addParent()
to all shapes to add them to parent
- Initial release!