Commit graph

853 commits

Author SHA1 Message Date
Jürg Lehni
66465541c6 Clean up code (if() -> if ()). 2011-05-03 08:55:01 +01:00
Jürg Lehni
52a73e86ce Clean up code (for() -> for ()). 2011-05-03 08:54:13 +01:00
Jürg Lehni
3af24e6178 Replace hidden getter call with direct access of internal property. 2011-05-03 08:47:52 +01:00
Jürg Lehni
a0e211c691 Big refactoring of how curves are kept in sync with segments (direct references rather than indices), along with various tests. 2011-05-03 00:25:23 +01:00
Jürg Lehni
47c88a1252 Compress math functions in Size the same way as in Point. 2011-05-02 23:09:59 +01:00
Jonathan Puckey
2ee7081c14 Merge remote branch 'origin/master' 2011-05-02 12:25:32 +02:00
Jonathan Puckey
41120cf4d9 Various small code cleanups. 2011-05-02 12:23:42 +02:00
Jürg Lehni
3917d9c110 Change case of Item.js test file. 2011-05-02 09:07:41 +01:00
Jürg Lehni
98ab342235 Shorten #_transformCoordinates() a bit. 2011-05-02 08:59:51 +01:00
Jürg Lehni
26b70309a8 Improve various #toString() functions. 2011-05-02 08:57:55 +01:00
Jürg Lehni
0a4150a5c9 Add beginning of value caching (_length, _bounds) and change tracking to invalidate cached values. 2011-05-02 00:17:21 +01:00
Jürg Lehni
4bac4b89f6 Clean up other Point.create() calls. 2011-05-01 23:37:15 +01:00
Jürg Lehni
51e5a29a9d Change Point#set() calls back to clearer multi-line notation. 2011-05-01 23:36:08 +01:00
Jürg Lehni
756c4f37c5 Compress Point#getQuadrant() to one line. 2011-05-01 23:34:00 +01:00
Jürg Lehni
77c19601ff Improve Point#normalize(). 2011-05-01 23:32:37 +01:00
Jürg Lehni
2cdb15f2d6 Fix recently renamed functions in commented out code. 2011-05-01 23:29:15 +01:00
Jürg Lehni
4b832e0ea9 Simplify Point#setLength(). 2011-05-01 23:28:57 +01:00
Jürg Lehni
b0282b9bd4 Change Segment to be aware of its index in the segment list and have the curves list update automatically on each change to segments. 2011-05-01 13:27:53 +01:00
Jürg Lehni
0680a50fd2 Fix yet another two bugs in CurveLocation. 2011-05-01 13:18:36 +01:00
Jürg Lehni
08e779d560 Fix two bugs in CurveLocation. 2011-05-01 13:16:25 +01:00
Jürg Lehni
6bbfd55240 Clean up Path#setSegments and begin moving of logic to keep Path#curves in sync away from Path#getCurves() to Path#setClosed(). Requires more work, e.g. Path#_add(). 2011-04-30 23:44:37 +01:00
Jürg Lehni
6cca355e20 Add Curve.create() as faster internal constructor. 2011-04-30 23:29:10 +01:00
Jürg Lehni
053fb2d955 Move Path#get/setSegments back to top and remove test-code for array object extension. 2011-04-30 23:24:39 +01:00
Jürg Lehni
781b315808 Add getter/setter for Path#closed. 2011-04-30 23:22:29 +01:00
Jürg Lehni
bf3bd13540 Simplify Path#cubicCurveTo(). 2011-04-30 23:17:19 +01:00
Jürg Lehni
dd442bf960 Correct comment. 2011-04-30 23:06:41 +01:00
Jürg Lehni
13dca647c3 Simplify Point#rotate(). 2011-04-30 23:06:21 +01:00
Jürg Lehni
2b5e9296f7 Simplify Point#getDirectedAngle(). 2011-04-30 23:05:31 +01:00
Jürg Lehni
ab634f2391 Remove unneeded Point#getDistanceSquared(). 2011-04-30 23:04:23 +01:00
Jürg Lehni
cd58351864 Add comment about porting chainable calls back to Sg. 2011-04-30 22:30:54 +01:00
Jonathan Puckey
511eef50f6 Flock example: move the onresize function to the top, and resize the document before creating the boids. 2011-04-28 21:23:30 +02:00
Jonathan Puckey
be7ccdbe17 Flock example: fix small bug. 2011-04-28 21:18:10 +02:00
Jonathan Puckey
c0febab6c1 Flock example: remove unused variable. 2011-04-28 21:16:05 +02:00
Jonathan Puckey
3751dd0a38 Small change to Flock example. 2011-04-28 21:13:51 +02:00
Jonathan Puckey
de466edc23 Flock example: space bar toggles selection state of items in the document. 2011-04-28 20:57:04 +02:00
Jonathan Puckey
b1d8922fd1 Merge remote branch 'origin/master' 2011-04-28 20:46:39 +02:00
Jonathan Puckey
1781b53b55 Flock example: resize the document whenever the browser window is resized. 2011-04-28 20:46:24 +02:00
Jonathan Puckey
c14ea8f7b5 Document: resize canvas element when Document#setSize is called. 2011-04-28 20:42:20 +02:00
Jürg Lehni
6d84dc3351 Segment#isSelected() only checks for selection state of point. We need to check _selectionState instead to mirror behaviour in #_setSelected(). 2011-04-28 19:04:00 +01:00
Jürg Lehni
d098c6e8b2 Fix index issue in #removeSegments(). 2011-04-28 19:03:05 +01:00
Jürg Lehni
121ec5a93f Allow #removeSegments() to be called without arguments, in which case all segments are removed. 2011-04-28 19:02:34 +01:00
Jürg Lehni
ea510c2403 Separate Path#remove(), #remove(index) & #remove(from, to) into #removeSegment(index) and #removeSegments(from, to). 2011-04-28 15:42:16 +01:00
Jürg Lehni
5211e86e3a Rename Point#isParallel() to #isColinear(), reimplement it using #cross() and add #isOrthogonal() as well, using #dot(). 2011-04-28 15:12:58 +01:00
Jonathan Puckey
4b4e092f90 Undo previous compressing of Rectangle functions. 2011-04-28 15:44:05 +02:00
Jürg Lehni
3916db4eb8 Fix location of browser related files in load.js. 2011-04-28 13:25:34 +01:00
Jürg Lehni
037adc074d Merge remote-tracking branch 'origin/master' 2011-04-28 13:23:27 +01:00
Jürg Lehni
4d999d57e2 Replace all type converting string compares with ===, !==. 2011-04-28 13:23:17 +01:00
Jonathan Puckey
dd2b546914 Merge remote branch 'origin/master' 2011-04-28 14:22:44 +02:00
Jonathan Puckey
8f2bc422dd Point: compress round, ceil, floor and abs functions. 2011-04-28 14:22:25 +02:00
Jonathan Puckey
b4ee975cfb Rectangle: minor changes. 2011-04-28 14:15:12 +02:00