Commit Graph

57 Commits

Author SHA1 Message Date
Eric Rowell
5c590bb88f moved TextPath, RegularPolygon, and Star shapes to the plugins directory. updated all tests 2013-03-13 22:24:55 -07:00
Eric Rowell
26943f8245 implemented new pixel ratio logic, which covers all drawing cases using a canvas context. The new logic also has better performance than the previous 2013-02-12 09:58:47 -08:00
Eric Rowell
5e65b4c596 refactored pixel ratio scale logic 2013-02-12 00:20:24 -08:00
Eric Rowell
79fecd2c13 dynamic drag layer setup now does deep copy of Groups and Layers when reconstructing ancestors 2013-01-28 21:27:08 -08:00
Eric Rowell
be295992e0 when parent and children are both draggable, the lowest level child draggable property now has priority over ancestors. Refactored dependency order in thorfile 2013-01-27 21:29:22 -08:00
Eric Rowell
6cd7ab135f moved some manual tests to unit tests and greatly refactored the manual test suite 2013-01-27 16:27:17 -08:00
Eric Rowell
abbaef1cc6 refactored drag and drop a bit and fixed a dependency bug 2013-01-13 22:32:08 -08:00
Eric Rowell
8ed84f474a fixed several memory issues with transition logic. Heavily refactored Transition module. New Animation isRunning method. destroy() method now correctly stops currently running transitions. added several transition and destroy related unit tests 2013-01-13 19:59:35 -08:00
Eric Rowell
b6ba1a503c ids and names hashes used for node selection via get() has moved to Global in order to greatly simplify the selection logic. This means that node ids and names are shared across all stages. If two stages each have a node with the same id, only the last id set will be accessibile (similar to DOM) 2013-01-13 11:10:49 -08:00
Eric Rowell
ffaa108830 removed animations length cached variable because the length can change while the for loop is running 2013-01-09 08:27:57 -08:00
Eric Rowell
d0148a50ac a small bit of animation code cleanup 2013-01-07 19:38:16 -08:00
Eric Rowell
590889f898 optimized animation code 2013-01-07 19:36:12 -08:00
Eric Rowell
ae103710d3 fixed flickering issue with dd on mobile. removed static framerate logic for dd 2013-01-06 23:31:14 -08:00
Eric Rowell
7cb4c4269f huge changes to Text shape. Skinnied it up by removing rectangle rendering component. textFill is now fill, textStroke is now stroke, textShadow is now shadow, and textStrokeWidth is now strokeWidth 2012-12-31 12:45:32 -08:00
Eric Rowell
7ba40a6a68 drag and drop operatons now dynamically generate a temporary top layer for high performance drag and drop. When completed, the top layer is removed. Also cleaned up a bit of drag and drop logic 2012-12-30 23:14:23 -08:00
Eric Rowell
3fb9576672 each animation now has its own frame object. This fixes issues that were seen when using multiple animations simultaneously 2012-12-11 22:34:58 -08:00
Eric Rowell
e6eb647462 fix #164 prepend # to colorKey so that events work again in non webit browsers 2012-11-27 19:43:33 -08:00
Eric Rowell
27d5031665 further decoupled scene, hit, and buffer graph drawing. To define a custom hit draw function, you now need to set the drawHitFunc attr. 2012-11-18 19:50:50 -08:00
Eric Rowell
e04b979063 improved drag and drop performance by skipping buffer redraws on drag move 2012-11-17 22:29:07 -08:00
Eric Rowell
1913fed33b Kinetic.Animation constructor now just requires a function and optional node. No more config object 2012-11-15 21:30:58 -08:00
Eric Rowell
a5e23c426d restructured unit tests and created a unit test build target which concatenates source test files 2012-11-13 21:37:28 -08:00
Eric Rowell
5be1802729 fix #149 began decoupling scene graph draw and buffer graph draw logic. This will enable more flexibility for developers to define custom buffer draw functions, and it also improves draw performance for both the scene and buffer graphs, because each function can be optimized for its purpose. Also moved text drawing logic to the Text shape 2012-11-12 19:59:19 -08:00
Eric Rowell
78668b0d38 greatly improved animation, transition, and drag and drop performance by dynamically switching between fixed and dynamic frame rates, and also created a single source of truth for the animation frame object 2012-11-03 11:16:33 -07:00
Eric Rowell
fb90709b3a greatly improved transition performance by directly setting attr properties for each frame, and also removing unecessary redraws when transition finishes 2012-10-28 22:41:13 -07:00
ericdrowell
900f02f912 merged pull request #65 and updated manual tests. Also removed dragConstraint and dragBounds as they are now redundant. I may introduce a set of dragBounds helper functions, similar to filters, that provide common functions out of the box, such as Horizontal and Vertical 2012-09-25 21:23:35 -07:00
Eric Rowell
8883e80bfe cleaned up _getContentPosition() method and fixed event detections for stages below the fold on mobile devices 2012-08-26 22:42:54 -07:00
Eric Rowell
6eda6d2607 decided to split Circle and Ellipse shapes because it was causing too many issues related to the mixed data type of radius, which could be a number or object with x and y properties 2012-08-25 23:56:39 -07:00
Eric Rowell
9093d9a512 refactored draw, _draw, and _drawChildren methods in such a way that isVisible and getListening logic resides in one place, therefore improving code quality 2012-08-19 20:44:45 -07:00
Eric Rowell
e19dae3402 rewrote intersects method, which now leverages the new getIntersection method. fixed up unit tests. also fixed bug with getIntersection method 2012-08-18 22:42:37 -07:00
Eric Rowell
f944409a1e new hit detection algo works with images that contain transparent pixels. Devs will need to use the createImageBuffer() method to create a higher precision buffer image 2012-08-18 22:02:16 -07:00
Eric Rowell
6a58830df3 draw methods now draw on both the front and back buffer by default, unless a canvas is passed as an argument. continued fixing up unit tests. Image width and height are now synced whenever the image object changes. 2012-08-15 23:13:50 -07:00
Eric Rowell
468f8ef2d3 checking in first phase of new hit detection algo, which enables high performance event detections even if there are hundreds of thousands of shapes. This is a giant improvement over the previous algo, and is a fairly big architectural change. Since the Animation architecture and API is also changing, I feel that these changes are big enough to warrant a new major version, v4.0.0 2012-08-11 16:22:01 -07:00
Eric Rowell
0f1a424840 prototyping back buffer hit detection algo 2012-08-10 22:33:22 -07:00
Eric Rowell
66ba99f9bc hooked drag and drop into animation engine 2012-08-09 00:01:21 -07:00
Eric Rowell
b6db65301c rewrote Animation API to improve flexibility. Animations are no longer tied to the stage. You can now instantiate as many individual animations as you like, and manage them however you like 2012-08-04 00:23:56 -07:00
Eric Rowell
75b20573cd removed plugins directory because Kinetic will be using a configurator in the near future 2012-07-31 20:36:36 -07:00
Eric Rowell
5b323bea40 merged with jfollas's TextPath updates, fixed remaining unit, manual, and performance tests, and fixed stroking logic 2012-07-28 09:55:21 -07:00
Eric Rowell
eccd8b7e64 silky smooth animations. got rid of layer and event throttling, and instead created dragThrottling. The dynamic animation frame rates already handles optimized animation drawing, we just needed to add manual throttling to drag and drop. Animations are now very smooth, and drag and drop is still smooth 2012-07-26 23:26:58 -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
d74ec8ab06 fixed new bug with stage toDataURL that was introduced with the new Canvas class, and added new filter unit tests 2012-07-21 13:29:22 -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
384a686740 worked through some synchronous / asynchronous issues with toDataURL and toImage(). stage toDataURL() is now asynchronous, and all other node toDataURLs is still synchronous. toImage() is now asynchronous. Kinetic.Image once again only accepts image objects, and can no longer be instantiated with a data URL or image data due to asynchronous issues. It's much cleaner for the developer to load an image however they like, and then instantiate a Kinetic.Image shape synchronously 2012-07-15 20:12:18 -07:00
Eric Rowell
4692c51c74 toDataURL() is now synchronous, and works with all nodes, including the stage, layers, groups, and shapes. This also sets things up nicely for node caching. You can now cache anything, including the whole stage, layers, groups, or shapes, manifested as Kinetic Images that were instantiated with data urls 2012-07-14 18:10:37 -07:00
Eric Rowell
d62df7ba5c setup filters. saveImageData can now work for any nodes, including shapes, groups, layers, and the stage. images can now take image data as a parameter. This enables shape caching. New beforeAttrChange event which fires before an attr is changed 2012-07-14 16:25:56 -07:00
Eric Rowell
d0f37f7c88 rewrote text array algo in Text. added newline support. now handling edge case in which the text box width is smaller than a character width. if a line is not able to wrap via space or dash, the word itself is wrapped. 2012-07-08 13:59:43 -07:00
Eric Rowell
9baaee2440 getIntersections no longer returns visible shapes in the result set, and can also be called from any container 2012-07-06 21:45:18 -07:00
Eric Rowell
014d4f198f fixed mouseover / mouseout incorrectly firing when moving from one node to another node inside the same container 2012-07-06 00:27:55 -07:00
Eric Rowell
31566bff13 transition attr updates now fire the attr change event. Fixed problem with root level attrs not being fired when child level attr changed 2012-07-01 00:19:56 -07:00
Eric Rowell
422791a99a cleaned up undefined, null, 0, and '' comparison operators. To unset a attribute, you can now set it to null, 0, or ''. Setting an attribute to undefined will have no effect 2012-06-22 13:15:29 -07:00
Eric Rowell
ac3f512ab8 updated global object utilities 2012-06-21 12:47:15 -07:00