Граф коммитов

296 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock 2236488f22 Am I bowering rite? Fixes #1251 #1338. 2013-06-27 11:32:08 -07:00
Mike Bostock abda353ae6 Remove spurious dependency. 2013-06-03 13:23:41 -07:00
Jason Davies 29252d53a1 Custom UglifyJS script to warn about leaking globals. 2013-05-24 20:37:58 +01:00
Jason Davies 22b744b7e6 Tweak version generation.
Instead of relying on sed to replace a VERSION token, we generate
src/start.js, which defines the internal `d3` variable with the current
version derived from package.json.

In addition, all file generators (component, locale, start) have been
moved to bin/.
2013-05-07 19:47:44 +01:00
Mike Bostock 7add1117cf Add package.json prerequisites. 2013-04-30 15:52:32 -07:00
Mike Bostock d8c14b9c2a Safer clean. 2013-04-25 12:33:06 -07:00
Mike Bostock 8e5b974f87 Don't build package.json. Fixes #1213. 2013-04-25 11:48:02 -07:00
Mike Bostock c696b8c846 Add PHONY targets. 2013-03-15 17:15:07 -07:00
Mike Bostock ba7bbe61df Upgrade jsdom & uglify-js. 2013-03-15 08:27:24 -07:00
Mike Bostock 133011f608 Use npm test in the Makefile. 2013-03-14 14:32:13 -07:00
Mike Bostock ada94766f3 No longer intermediate. 2013-03-13 02:01:49 -07:00
Mike Bostock d392331412 Simplify Makefile. 2013-03-13 01:59:36 -07:00
Mike Bostock 48e449ba94 Smash dependencies! 2013-03-12 21:31:15 -07:00
Mike Bostock 86e8f88c3f Smash! 2013-03-12 21:01:49 -07:00
Jason Davies 63a95a390a Fix for running `make clean && make -j all`.
This can fail due to a missing d3.js file, which is required for
`node src/package.js` and `node src/component.js`.
2013-03-11 22:55:29 +00:00
Mike Bostock 09f6c76329 Add conic projections. Fixes #1133. 2013-03-11 13:43:05 -07:00
Mike Bostock 28c7b46b5a Add transverseMercator; remove custom scales.
This adds d3.geo.transverseMercator and removes the custom default scales from
the mercator and equirectangular projections. Also, this commit removes the
built-in 2π scale factor from the mercator projection, simplifying the
implementation and making it consistent with transverseMercator and GDAL. This
is a partial fix for #1133; see also d3/d3-plugins#55.
2013-03-11 12:58:00 -07:00
Jason Davies 600666e8c1 Reuse Greiner–Hormann for 2D polygon clipping.
Greiner–Hormann is preferable to Sutherland-Hodgman, because it doesn't
add extraneous lines along the clip edge, and can even handle
self-intersecting polygons.  The line segments are generated via the
efficient Liang–Barsky line clipping algorithm, and Greiner–Hormann
rejoins them appropriately along the clip edge.

Still in progress: correct marking of whether an intersection is an
entry or exit point, and detection of points that lie exactly on the
clip edge, which should be jittered.
2013-03-06 08:57:28 +00:00
Mike Bostock d80cc86287 Merge branch 'clip-view' of git://github.com/jasondavies/d3 into 3.1.0 2013-03-05 20:50:19 -08:00
Mike Bostock 01f681213f Merge branch 'voronoi-layout' into 3.1.0 2013-03-05 20:49:22 -08:00
Mike Bostock e8d8b13498 Merge branch 'geo-length' into 3.1.0 2013-03-05 20:45:25 -08:00
Mike Bostock a7294db376 Merge branch 'd3.set' of git://github.com/jfirebaugh/d3 into 3.1.0 2013-03-05 20:42:53 -08:00
Mike Bostock f6668a804b Use the local node_modules/.bin.
This ensures that executables are consistent with the local package.json and
not affected by any globally-installed packages.
2013-03-05 20:41:35 -08:00
Mike Bostock 48f3fa8716 Merge branch 'minor-graticule' into 3.1.0
Conflicts:
	src/geo/interpolate.js
2013-03-05 19:28:39 -08:00
Jason Davies c1a02e06f7 First stab at d3.geo.clipView.
This is a simple stream transformation for the moment.  Note that the
clip region points should be specified in counterclockwise order as
required by d3.geom.polygon, and unlike GeoJSON, the first and last
points should not be coincident.
2013-03-04 15:08:38 +00:00
Mike Bostock 88c4a86e71 Add d3.layout.voronoi.
A more user-friendly version of d3.geom.voronoi. Fixes #1100.
2013-03-02 14:46:45 -08:00
Mike Bostock 2c019c300c Merge branch 'geo-length' of https://github.com/jasondavies/d3 into geo-length 2013-03-01 13:59:47 -08:00
Jason Davies 889aacc43d Fix d3.geo.interpolate for coincident points.
This also improves accuracy for small distances, using the haversine
distance formula instead of the law of cosines.

Fixes #1080.
2013-02-18 13:06:29 +00:00
John Firebaugh 1e8a579810 Add d3.set
Taking inspiration from d3.map, d3.set is a simple shim for ES6 sets.
2013-02-09 14:42:04 -08:00
Jason Davies 4917fa86ca Add d3.geo.length. 2013-02-05 23:08:20 +00:00
Mike Bostock 0991f3b010 Use captured references for document and window.
This avoids an inconsistency (discussed in #1044) when using D3 inside Node.js,
where D3 internally creates a JSDOM document during initialization, but then
subsequently depends on the current global document, which is not exposed. D3
now always refers to the global document at the time of initialization, and
does not depend on the current global document or window.
2013-01-31 15:11:40 -08:00
Mike Bostock 6b06c4526b Deprecate d3.geo.greatArc; add d3.geo.distance.
Now that D3 supports great-arc interpolation automatically for projections,
there is no need for a great arc feature generator, as a simple LineString
geometry object is equivalent. For the same reason, d3.geo.graticule does not
need to use supersampling on meridians, since meridians are great arcs.

This commit also adds d3.geo.distance(a, b) for computing the length of the
great arc between points a and b in radians, as a replacement for the
deprecated d3.geo.greatArc method, and a faster alternative to constructing a
d3.geo.interpolate solely to measure distance.

Fixes #1021 #1024.
2013-01-23 15:46:34 -08:00
Mike Bostock 75be0ab272 Rename for clarity.
d3_geo_cut is now d3_geo_clipAntimeridian.
d3_geo_circleClip is now d3_geo_clipCircle.
2012-12-15 12:42:00 -08:00
Mike Bostock ec1c7cfe04 Fix for UglifyJS 2.x. 2012-12-13 09:34:02 -08:00
Jason Davies b87bcbc22a Implement d3.geo.centroid via d3.geo.stream. 2012-12-13 12:22:41 +00:00
Jason Davies 37f64b74f2 Fix streaming polygon clipping. 2012-12-13 02:01:04 +00:00
Mike Bostock 6ca6d3ea07 Return undefined for empty buffers. 2012-12-12 16:42:07 -08:00
Mike Bostock 1a779c6f4d Implement d3.geo.path centroid via d3.geo.stream. 2012-12-12 16:17:02 -08:00
Jason Davies 33e24962be Refactor clipping to use streams.
Work in progress: everything is treated as lines at the moment.
2012-12-12 21:33:59 +00:00
Mike Bostock e06a279d62 Remove unused d3.geo.streamListener. 2012-12-12 10:17:52 -08:00
Mike Bostock 6994640f32 Add d3.geo.stream.
This will replace d3_geo_type and make projection faster.
2012-12-12 09:09:21 -08:00
Jason Davies c0f9ae7ad1 Extract d3_geo_resample. 2012-12-12 09:25:22 +00:00
Jason Davies bc06b2ec57 Refactor d3.geo.projection to be more data-driven. 2012-12-11 21:43:14 +00:00
Jason Davies 75520ecb46 Refactor cutting/clipping into separate files. 2012-12-11 12:53:01 +00:00
Mike Bostock 881e0e5fcf Extract simple vector math from d3_geo_circle. 2012-12-10 14:49:20 -08:00
Mike Bostock 1c8bff5d1d Add d3.geo.interpolate.
Refactor of d3_geo_greatArcInterpolate.
2012-12-10 12:05:43 -08:00
Jason Davies 7860b0d31e Add d3.geo.area.
See #941.
2012-12-09 19:42:05 +00:00
Jason Davies 2467834ec2 Add d3.geo.centroid.
Polygons are temporarily treated as lines while I work on adding area
weighting.

See #941.
2012-12-09 11:29:29 -08:00
Mike Bostock 09094cf342 Add d3.shuffle. Fixes #948. 2012-12-07 12:44:21 -08:00
Mike Bostock d5e3add1f3 Add placeholder d3.geo.centroid. 2012-12-06 19:50:36 -08:00