Commit Graph

45 Commits

Author SHA1 Message Date
Eric Rowell
76a399bfc0 major refactor of directory structure. Killed Util directory. Created Util.js file instead. Moved general purpose methods from Global to Util 2013-05-07 23:51:02 -07:00
Eric Rowell
8f06f1eb67 heavily updated documentation 2013-05-07 10:19:54 -07:00
Eric Rowell
69f9374c8e first pass at removing setDefaultAttrs logic to speed up node instantation performance 2013-03-15 08:33:05 -07:00
Eric Rowell
b1038e99bf pulled Node config params and Shape config params into a textfile, and now using token replacement to auto fill Node and Shape config params throughout the code base. In this way, if I need to make changes to the Node or Shape configs, those changes are propagated to all of the other constructors 2013-01-26 20:42:19 -08:00
Eric Rowell
bba5c7b101 really cool new feature that... wait, no, just more docmentation 2013-01-02 23:55:56 -08:00
Eric Rowell
e9d56dafba added new Blob shape. removed double quotes from all shapes. made it easier for shapes to extend other shapes 2013-01-01 00:41:13 -08:00
Eric Rowell
36584a3ce2 cleaned up docs, and beefed up individual shape docs. moved corner radius attr to Rect shape 2012-12-22 23:08:03 -08:00
Eric Rowell
291583148b moved all rendering logic into the Canvas renderer modules. Shape draw funcs are now passed a renderer object, not a canvas context. The context is accessible via canvas.getContext() 2012-12-09 09:52:33 -08:00
Eric Rowell
ab19b442a0 wrapped all modules with anonymous func. moved Canvas to root dir because it's now coupled to KineticJS logic. removed whitelisting arrays from Global. Did some prep work for AMD and Node support 2012-12-01 12:04:10 -08:00
Eric Rowell
047e26382e added new wedge shape. cleaned up shape comments. added degToRad and radToDeg helper in Type utility 2012-11-29 20:15:01 -08:00
Eric Rowell
b67cc4b589 Text shape now depends on Rect for rect drawing func 2012-11-23 22:21:19 -08:00
Eric Rowell
318d03feb7 finished up new Scene and Hit Renderers. added new textShadow attrs for more flexibility. Added new fillStroke() method which encapsulates shadow application logic 2012-11-23 14:54:32 -08:00
Eric Rowell
144e95ad42 preparation work for new Renderer inheritance pattern 2012-11-20 23:03:24 -08:00
Eric Rowell
c121e4b941 you can now pass in custom drawFuncs and drawHitFuncs via shape constructors 2012-11-18 20:28:55 -08:00
Eric Rowell
0ae50ba523 merge trunk 2012-10-10 19:25:50 -07:00
Eric Rowell
2426c2bd2c moved width and height attrs to node level. This enables us to get and set shape dimensions via width and height. For example, if you have a circle with radius 50, getWidth() will return 100. Not all shapes width and height methods have been implemented yet 2012-10-10 18:48:08 -07:00
ericdrowell
b025767a27 updated jsdocs. TextPath setText() now calls Text setText(). Polygon setPoints() method now has data conversion logic similar to Line 2012-10-07 21:12:45 -07:00
ericdrowell
fcd4b345fc moved cornerRadius proprty to Shape level 2012-10-06 15:55:10 -07:00
ericdrowell
0353214fb6 first pass at rewriting the setAttrs logic in Node. In order to have a cleaner OO design, the data type logic needs to exist within each respective module, such that the setter methods are the source of truth.
the setAttrs method now simply calls setter methods.  Also added _clone
and _merge utility methods in Type.  The refactor greatly improves
decoupling and will enable much cleaner OO design in the near future.
2012-09-24 20:34:23 -07:00
Eric Rowell
1ad2530889 removed john resig's Class class because it was really slowing down node instantiations. Created a custom solution that's much lighter weight, and about 50% faster 2012-08-22 23:35:21 -07:00
Eric Rowell
d48aa321f4 removed resig's Class dependency to test performance gain 2012-08-22 23:13:09 -07:00
Eric Rowell
ce3b98ee9c added some performance tweaks and polished up code here and there 2012-07-26 22:58:38 -07:00
Eric Rowell
d8bbbf6353 new Canvas class to decouple layer and canvas, providing more flexibility. drawing operations now require a canvas object rather than an optional layer which contained a canvas. fixed some transformation issues introduced with a pull request that I pulled in last week 2012-07-18 23:28:45 -07:00
Eric Rowell
780d5568db updated the documentation for all methods to reflect the new inhertiance changes. And yes, if you're curious, it took forever. 2012-07-08 21:56:52 -07:00
Eric Rowell
6126c73a84 moved data type logic into new utility files Type.js and renamed GlobalObject to Global 2012-07-03 22:08:59 -07:00
Eric Rowell
3d4d2d20c0 now utilizing John Resig's mashup of Base.js and protototype.js inheritiance Class so that it's easy for developers to extend KineticJS objects with extend() or to simply tack on new methods and properties that's available to all children classes. Moved getter and setter logic to Node. Moved transition class to root directory and created Tween class 2012-07-03 12:07:27 -07:00
Eric Rowell
c1a08d8073 created new addSettersGetters method, further enhanced dynamic getters and setters 2012-06-23 18:09:10 -07:00
Eric Rowell
5765ab749b converting arguments object into true array for setters, restored the original underscore.js methods, and moved radius conversion logic from the setAttrs method to a radiusChange event listener in Ellipse 2012-06-20 12:55:34 -07:00
Eric Rowell
73ad904de6 updated jsdocs 2012-06-14 02:19:51 -07:00
Eric Rowell
6d4738cd2b all simple getters and setters are now dynamically created. This is the first step towards creating a code base that can unpack at run time to reduce file size 2012-06-10 13:07:09 -07:00
Eric Rowell
6b70e1b18f now using setAttrs for all Shape and shapes setters 2012-06-10 00:02:16 -07:00
Eric Rowell
89370bfee7 fixed bug with setScale method and _isNumber method. Added unit tests 2012-05-28 23:46:40 -07:00
Eric Rowell
e075a725a1 rewrote shadow logic. Shadows can now be applied to images and sprites, even if they have transparent pixels 2012-05-26 20:34:36 -07:00
Eric Rowell
07edfbc765 hooked setAttrs into setCrop() method and made the _getSize() method more flexibile by accepting more variations of input. added unit tests 2012-05-26 16:37:37 -07:00
Eric Rowell
28f7fc246d changed shadowFillStroke() to applyStyles(). Took applyLineJoin() out of shape draw functions and moved it to the Shape._draw() method. 2012-05-09 22:31:55 -07:00
Eric Rowell
a27741ce03 added shadow support. changed fillStroke method to shadowFillStroke 2012-05-08 23:06:13 -07:00
Eric Rowell
8dce92c2fd introduced new setDefaultAttrs() method which greatly simplifies the logic required inside node constructors. This will also make plugin creation much easier 2012-04-28 12:55:18 -07:00
Eric Rowell
508bfb7a9b rewrote cropping logic from last pull request, fixed serialization issue in unit test, added new unit tests, and added getX() and getY() methods 2012-04-27 19:08:45 -07:00
Lewis Peckover
d3eac4d5f9 added rounded corners to Rect 2012-04-19 23:27:04 +01:00
Eric Rowell
6d618b97b5 first phase of new attrs architecture to better represent Node states 2012-04-05 23:48:58 -07:00
Eric Rowell
350f7b7496 implemented stage.load() which allows you to deserialize a json string 2012-04-05 00:06:00 -07:00
Eric Rowell
9994e8a37e added getSize() method to Stage, Rect, and Image. Also updated unit tests 2012-03-31 00:08:50 -07:00
Eric Rowell
69c27de7df added line join property to Shape along with getter and setter 2012-03-30 23:57:10 -07:00
Eric Rowell
68db5bf7c1 minor code cleanup discovered by Wappworks 2012-03-11 23:01:23 -07:00
Eric Rowell
ed347c3641 changes geometries directory to shapes 2012-03-10 20:22:27 -08:00