d3js-plugins-rails 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/d3js-plugins-rails/version.rb +2 -2
- data/vendor/assets/javascripts/d3/plugins/LICENSE +1 -1
- data/vendor/assets/javascripts/d3/plugins/README.md +0 -14
- data/vendor/assets/javascripts/d3/plugins/geo/projection/README.md +1 -252
- data/vendor/assets/javascripts/d3/plugins/interpolate-zoom/README.md +9 -0
- data/vendor/assets/javascripts/d3/plugins/interpolate-zoom/interpolate-zoom-test.js +27 -0
- data/vendor/assets/javascripts/d3/plugins/interpolate-zoom/interpolate-zoom.js +18 -32
- data.tar.gz.sig +0 -0
- metadata +4 -140
- metadata.gz.sig +2 -5
- data/vendor/assets/javascripts/d3/plugins/.gitignore +0 -1
- data/vendor/assets/javascripts/d3/plugins/Makefile +0 -18
- data/vendor/assets/javascripts/d3/plugins/geo/projection/airy.js +0 -55
- data/vendor/assets/javascripts/d3/plugins/geo/projection/aitoff.js +0 -42
- data/vendor/assets/javascripts/d3/plugins/geo/projection/armadillo.js +0 -81
- data/vendor/assets/javascripts/d3/plugins/geo/projection/august.js +0 -36
- data/vendor/assets/javascripts/d3/plugins/geo/projection/baker.js +0 -30
- data/vendor/assets/javascripts/d3/plugins/geo/projection/berghaus.js +0 -76
- data/vendor/assets/javascripts/d3/plugins/geo/projection/boggs.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/bonne.js +0 -30
- data/vendor/assets/javascripts/d3/plugins/geo/projection/bromley.js +0 -6
- data/vendor/assets/javascripts/d3/plugins/geo/projection/chamberlin.js +0 -116
- data/vendor/assets/javascripts/d3/plugins/geo/projection/collignon.js +0 -19
- data/vendor/assets/javascripts/d3/plugins/geo/projection/craig.js +0 -31
- data/vendor/assets/javascripts/d3/plugins/geo/projection/craster.js +0 -20
- data/vendor/assets/javascripts/d3/plugins/geo/projection/cylindrical-equal-area.js +0 -24
- data/vendor/assets/javascripts/d3/plugins/geo/projection/eckert1.js +0 -20
- data/vendor/assets/javascripts/d3/plugins/geo/projection/eckert2.js +0 -19
- data/vendor/assets/javascripts/d3/plugins/geo/projection/eckert3.js +0 -19
- data/vendor/assets/javascripts/d3/plugins/geo/projection/eckert4.js +0 -26
- data/vendor/assets/javascripts/d3/plugins/geo/projection/eckert5.js +0 -19
- data/vendor/assets/javascripts/d3/plugins/geo/projection/eckert6.js +0 -24
- data/vendor/assets/javascripts/d3/plugins/geo/projection/eisenlohr.js +0 -78
- data/vendor/assets/javascripts/d3/plugins/geo/projection/elliptic.js +0 -118
- data/vendor/assets/javascripts/d3/plugins/geo/projection/end.js +0 -1
- data/vendor/assets/javascripts/d3/plugins/geo/projection/fahey.js +0 -21
- data/vendor/assets/javascripts/d3/plugins/geo/projection/gall-stereographic.js +0 -19
- data/vendor/assets/javascripts/d3/plugins/geo/projection/ginzburg-polyconic.js +0 -56
- data/vendor/assets/javascripts/d3/plugins/geo/projection/ginzburg4.js +0 -6
- data/vendor/assets/javascripts/d3/plugins/geo/projection/ginzburg5.js +0 -6
- data/vendor/assets/javascripts/d3/plugins/geo/projection/ginzburg6.js +0 -6
- data/vendor/assets/javascripts/d3/plugins/geo/projection/ginzburg8.js +0 -29
- data/vendor/assets/javascripts/d3/plugins/geo/projection/ginzburg9.js +0 -6
- data/vendor/assets/javascripts/d3/plugins/geo/projection/gringorten.js +0 -150
- data/vendor/assets/javascripts/d3/plugins/geo/projection/guyou.js +0 -55
- data/vendor/assets/javascripts/d3/plugins/geo/projection/hammer-retroazimuthal.js +0 -106
- data/vendor/assets/javascripts/d3/plugins/geo/projection/hammer.js +0 -53
- data/vendor/assets/javascripts/d3/plugins/geo/projection/hatano.js +0 -27
- data/vendor/assets/javascripts/d3/plugins/geo/projection/healpix.js +0 -85
- data/vendor/assets/javascripts/d3/plugins/geo/projection/hill.js +0 -66
- data/vendor/assets/javascripts/d3/plugins/geo/projection/homolosine.js +0 -18
- data/vendor/assets/javascripts/d3/plugins/geo/projection/hyperbolic.js +0 -22
- data/vendor/assets/javascripts/d3/plugins/geo/projection/index.js +0 -72
- data/vendor/assets/javascripts/d3/plugins/geo/projection/interrupt.js +0 -150
- data/vendor/assets/javascripts/d3/plugins/geo/projection/kavrayskiy7.js +0 -17
- data/vendor/assets/javascripts/d3/plugins/geo/projection/lagrange.js +0 -47
- data/vendor/assets/javascripts/d3/plugins/geo/projection/larrivee.js +0 -41
- data/vendor/assets/javascripts/d3/plugins/geo/projection/laskowski.js +0 -33
- data/vendor/assets/javascripts/d3/plugins/geo/projection/littrow.js +0 -23
- data/vendor/assets/javascripts/d3/plugins/geo/projection/loximuthal.js +0 -30
- data/vendor/assets/javascripts/d3/plugins/geo/projection/math.js +0 -26
- data/vendor/assets/javascripts/d3/plugins/geo/projection/miller.js +0 -17
- data/vendor/assets/javascripts/d3/plugins/geo/projection/modified-stereographic.js +0 -106
- data/vendor/assets/javascripts/d3/plugins/geo/projection/mollweide.js +0 -37
- data/vendor/assets/javascripts/d3/plugins/geo/projection/mt-flat-polar-parabolic.js +0 -23
- data/vendor/assets/javascripts/d3/plugins/geo/projection/mt-flat-polar-quartic.js +0 -25
- data/vendor/assets/javascripts/d3/plugins/geo/projection/mt-flat-polar-sinusoidal.js +0 -27
- data/vendor/assets/javascripts/d3/plugins/geo/projection/natural-earth.js +0 -24
- data/vendor/assets/javascripts/d3/plugins/geo/projection/nell-hammer.js +0 -22
- data/vendor/assets/javascripts/d3/plugins/geo/projection/parallel1.js +0 -14
- data/vendor/assets/javascripts/d3/plugins/geo/projection/parallel2.js +0 -15
- data/vendor/assets/javascripts/d3/plugins/geo/projection/peirce-quincuncial.js +0 -7
- data/vendor/assets/javascripts/d3/plugins/geo/projection/polyconic.js +0 -31
- data/vendor/assets/javascripts/d3/plugins/geo/projection/projection.js +0 -4
- data/vendor/assets/javascripts/d3/plugins/geo/projection/quincuncial.js +0 -73
- data/vendor/assets/javascripts/d3/plugins/geo/projection/rectangular-polyconic.js +0 -41
- data/vendor/assets/javascripts/d3/plugins/geo/projection/robinson.js +0 -85
- data/vendor/assets/javascripts/d3/plugins/geo/projection/satellite.js +0 -70
- data/vendor/assets/javascripts/d3/plugins/geo/projection/sinu-mollweide.js +0 -20
- data/vendor/assets/javascripts/d3/plugins/geo/projection/sinusoidal.js +0 -17
- data/vendor/assets/javascripts/d3/plugins/geo/projection/start.js +0 -1
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/airy-test.js +0 -25
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/aitoff-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/armadillo-test.js +0 -30
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/assert.js +0 -32
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/august-test.js +0 -29
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/baker-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/berghaus-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/boggs-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/bonne-test.js +0 -45
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/craig-test.js +0 -40
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/craster-test.js +0 -27
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/eckert4-test.js +0 -26
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/eisenlohr-test.js +0 -36
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/equirectangular-test.js +0 -96
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/fahey-test.js +0 -27
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/ginzburg4-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/ginzburg5-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/ginzburg6-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/ginzburg8-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/ginzburg9-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/gringorten-test.js +0 -26
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/guyou-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/hammer-retroazimuthal-test.js +0 -39
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/hammer-test.js +0 -29
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/hatano-test.js +0 -27
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/healpix-test.js +0 -26
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/hill-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/lagrange-test.js +0 -59
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/larrivee-test.js +0 -27
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/laskowski-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/littrow-test.js +0 -26
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/load.js +0 -20
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/loximuthal-test.js +0 -27
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/modified-stereographic-test.js +0 -26
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/mollweide-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/mt-flat-polar-parabolic-test.js +0 -27
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/mt-flat-polar-quartic-test.js +0 -27
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/mt-flat-polar-sinusoidal-test.js +0 -27
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/natural-earth-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/peirce-quincuncial-test.js +0 -26
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/polyconic-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/quartic-authalic-test.js +0 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/rectangular-polyconic-test.js +0 -48
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/robinson-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/times-test.js +0 -26
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/two-point-azimuthal-test.js +0 -24
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/two-point-equidistant-test.js +0 -26
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/van-der-grinten2-test.js +0 -26
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/van-der-grinten3-test.js +0 -26
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/van-der-grinten4-test.js +0 -32
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/wagner6-test.js +0 -27
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/wiechel-test.js +0 -26
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/winkel3-test.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/times.js +0 -21
- data/vendor/assets/javascripts/d3/plugins/geo/projection/two-point-azimuthal.js +0 -47
- data/vendor/assets/javascripts/d3/plugins/geo/projection/two-point-equidistant.js +0 -83
- data/vendor/assets/javascripts/d3/plugins/geo/projection/van-der-grinten.js +0 -43
- data/vendor/assets/javascripts/d3/plugins/geo/projection/van-der-grinten2.js +0 -30
- data/vendor/assets/javascripts/d3/plugins/geo/projection/van-der-grinten3.js +0 -26
- data/vendor/assets/javascripts/d3/plugins/geo/projection/van-der-grinten4.js +0 -56
- data/vendor/assets/javascripts/d3/plugins/geo/projection/wagner4.js +0 -10
- data/vendor/assets/javascripts/d3/plugins/geo/projection/wagner6.js +0 -17
- data/vendor/assets/javascripts/d3/plugins/geo/projection/wagner7.js +0 -24
- data/vendor/assets/javascripts/d3/plugins/geo/projection/wiechel.js +0 -28
- data/vendor/assets/javascripts/d3/plugins/geo/projection/winkel3.js +0 -41
- data/vendor/assets/javascripts/d3/plugins/package.json +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5af0dbab238069de8e62ecf46587c0872b739da
|
4
|
+
data.tar.gz: 2f2eaf9f081627b3b1ecc66c3c89022aec2cdf50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5c3db02bd67f1e590d53658359d3682021c12d7179f15914ef5068624a0f02ecf64015941ef5aad91c47c891fc6059b452b88902b18e513c253428e76559517
|
7
|
+
data.tar.gz: 24194ebdcc449a1a6edf309d4cffc2f7a2de8998d34d1694339794f14641aec5e0ebd59dea1c9c14dcbc9b197bd879813a27973f6c36faf09078c131727a0530
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -3,17 +3,3 @@
|
|
3
3
|
This is a repository for sharing D3 plugins.
|
4
4
|
|
5
5
|
Each plugin should live in a directory that matches its name.
|
6
|
-
|
7
|
-
## Running Tests
|
8
|
-
|
9
|
-
The tests use [Vows](http://vowsjs.org), which depends on [Node.js](http://nodejs.org/) and [NPM](http://npmjs.org/). If you are developing on Mac OS X, an easy way to install Node and NPM is using [Homebrew](http://mxcl.github.com/homebrew/):
|
10
|
-
|
11
|
-
brew install node
|
12
|
-
|
13
|
-
Next, from the root directory of this repository, install dependencies:
|
14
|
-
|
15
|
-
npm install
|
16
|
-
|
17
|
-
To run the tests, use:
|
18
|
-
|
19
|
-
npm test
|
@@ -1,252 +1 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<table class="highlight">
|
4
|
-
<tr height="146" valign="top">
|
5
|
-
<td>airy<br><a href="http://bl.ocks.org/mbostock/5620807"><img src="https://raw.github.com/gist/5620807/thumbnail.png" width="202"></a></td>
|
6
|
-
<td>aitoff<br><a href="http://bl.ocks.org/mbostock/3682698"><img src="https://raw.github.com/gist/3682698/thumbnail.png" width="202"></a></td>
|
7
|
-
<td class="gi">albers *<br><a href="http://bl.ocks.org/mbostock/3734308"><img src="https://raw.github.com/gist/3734308/thumbnail.png" width="202"></a></td>
|
8
|
-
<td class="gi">albersUsa *<br><a href="http://bl.ocks.org/mbostock/4090848"><img src="https://raw.github.com/gist/4090848/thumbnail.png" width="202"></a></td>
|
9
|
-
</tr>
|
10
|
-
<tr height="146" valign="top">
|
11
|
-
<td>armadillo<br><a href="http://bl.ocks.org/mbostock/4463127"><img src="https://raw.github.com/gist/4463127/thumbnail.png" width="202"></a></td>
|
12
|
-
<td>august<br><a href="http://bl.ocks.org/mbostock/3797581"><img src="https://raw.github.com/gist/3797581/thumbnail.png" width="202"></a></td>
|
13
|
-
<td class="gi">azimuthalEqualArea *<br><a href="http://bl.ocks.org/mbostock/3757101"><img src="https://raw.github.com/gist/3757101/thumbnail.png" width="202"></a></td>
|
14
|
-
<td class="gi">azimuthalEquidistant *<br><a href="http://bl.ocks.org/mbostock/3757110"><img src="https://raw.github.com/gist/3757110/thumbnail.png" width="202"></a></td>
|
15
|
-
</tr>
|
16
|
-
<tr height="146" valign="top">
|
17
|
-
<td>baker<br><a href="http://bl.ocks.org/mbostock/4476279"><img src="https://raw.github.com/gist/4476279/thumbnail.png" width="202"></a></td>
|
18
|
-
<td>berghaus<br><a href="http://bl.ocks.org/mbostock/4463049"><img src="https://raw.github.com/gist/4463049/thumbnail.png" width="202"></a></td>
|
19
|
-
<td>boggs<br><a href="http://bl.ocks.org/mbostock/4481220"><img src="https://raw.github.com/gist/4481220/thumbnail.png" width="202"></a></td>
|
20
|
-
<td>bonne<br><a href="http://bl.ocks.org/mbostock/3734313"><img src="https://raw.github.com/gist/3734313/thumbnail.png" width="202"></a></td>
|
21
|
-
</tr>
|
22
|
-
<tr height="146" valign="top">
|
23
|
-
<td>bromley<br><a href="http://bl.ocks.org/mbostock/4487695"><img src="https://raw.github.com/gist/4487695/thumbnail.png" width="202"></a></td>
|
24
|
-
<td>chamberlin<br><a href="http://bl.ocks.org/mbostock/5625053"><img src="https://raw.github.com/gist/5625053/thumbnail.png" width="202"></a></td>
|
25
|
-
<td>collignon<br><a href="http://bl.ocks.org/mbostock/3734316"><img src="https://raw.github.com/gist/3734316/thumbnail.png" width="202"></a></td>
|
26
|
-
<td class="gi">conicEqualArea *<br><a href="http://bl.ocks.org/mbostock/3734308"><img src="https://raw.github.com/gist/3734308/thumbnail.png" width="202"></a></td>
|
27
|
-
</tr>
|
28
|
-
<tr height="146" valign="top">
|
29
|
-
<td class="gi">conicConformal *<br><a href="http://bl.ocks.org/mbostock/3734321"><img src="https://raw.github.com/gist/3734321/thumbnail.png" width="202"></a></td>
|
30
|
-
<td class="gi">conicEquidistant *<br><a href="http://bl.ocks.org/mbostock/3734317"><img src="https://raw.github.com/gist/3734317/thumbnail.png" width="202"></a></td>
|
31
|
-
<td>craig<br><a href="http://bl.ocks.org/mbostock/4459466"><img src="https://raw.github.com/gist/4459466/thumbnail.png" width="202"></a></td>
|
32
|
-
<td>craster<br><a href="http://bl.ocks.org/mbostock/4465118"><img src="https://raw.github.com/gist/4465118/thumbnail.png" width="202"></a></td>
|
33
|
-
</tr>
|
34
|
-
<tr height="146" valign="top">
|
35
|
-
<td>cylindricalEqualArea<br><a href="http://bl.ocks.org/mbostock/3712408"><img src="https://raw.github.com/gist/3712408/thumbnail.png" width="202"></a></td>
|
36
|
-
<td>eckert1<br><a href="http://bl.ocks.org/mbostock/3734322"><img src="https://raw.github.com/gist/3734322/thumbnail.png" width="202"></a></td>
|
37
|
-
<td>eckert2<br><a href="http://bl.ocks.org/mbostock/3734324"><img src="https://raw.github.com/gist/3734324/thumbnail.png" width="202"></a></td>
|
38
|
-
<td>eckert3<br><a href="http://bl.ocks.org/mbostock/3734325"><img src="https://raw.github.com/gist/3734325/thumbnail.png" width="202"></a></td>
|
39
|
-
</tr>
|
40
|
-
<tr height="146" valign="top">
|
41
|
-
<td>eckert4<br><a href="http://bl.ocks.org/mbostock/3734327"><img src="https://raw.github.com/gist/3734327/thumbnail.png" width="202"></a></td>
|
42
|
-
<td>eckert5<br><a href="http://bl.ocks.org/mbostock/3734328"><img src="https://raw.github.com/gist/3734328/thumbnail.png" width="202"></a></td>
|
43
|
-
<td>eckert6<br><a href="http://bl.ocks.org/mbostock/3734329"><img src="https://raw.github.com/gist/3734329/thumbnail.png" width="202"></a></td>
|
44
|
-
<td>eisenlohr<br><a href="http://bl.ocks.org/mbostock/3797585"><img src="https://raw.github.com/gist/3797585/thumbnail.png" width="202"></a></td>
|
45
|
-
</tr>
|
46
|
-
<tr height="146" valign="top">
|
47
|
-
<td class="gi">equirectangular *<br><a href="http://bl.ocks.org/mbostock/3757119"><img src="https://raw.github.com/gist/3757119/thumbnail.png" width="202"></a></td>
|
48
|
-
<td>fahey<br><a href="http://bl.ocks.org/mbostock/4731228"><img src="https://raw.github.com/gist/4731228/thumbnail.png" width="202"></a></td>
|
49
|
-
<td>gallStereographic<br><a href="http://bl.ocks.org/mbostock/5234763"><img src="https://raw.github.com/gist/5234763/thumbnail.png" width="202"></a></td>
|
50
|
-
<td>ginzburg4<br><a href="http://bl.ocks.org/mbostock/5288565"><img src="https://raw.github.com/gist/5288565/thumbnail.png" width="202"></a></td>
|
51
|
-
</tr>
|
52
|
-
<tr height="146" valign="top">
|
53
|
-
<td>ginzburg5<br><a href="http://bl.ocks.org/mbostock/5288571"><img src="https://raw.github.com/gist/5288571/thumbnail.png" width="202"></a></td>
|
54
|
-
<td>ginzburg6<br><a href="http://bl.ocks.org/mbostock/5288577"><img src="https://raw.github.com/gist/5288577/thumbnail.png" width="202"></a></td>
|
55
|
-
<td>ginzburg8<br><a href="http://bl.ocks.org/mbostock/5288583"><img src="https://raw.github.com/gist/5288583/thumbnail.png" width="202"></a></td>
|
56
|
-
<td>ginzburg9<br><a href="http://bl.ocks.org/mbostock/5288590"><img src="https://raw.github.com/gist/5288590/thumbnail.png" width="202"></a></td>
|
57
|
-
</tr>
|
58
|
-
<tr height="146" valign="top">
|
59
|
-
<td class="gi">gnomonic *<br><a href="http://bl.ocks.org/mbostock/3757349"><img src="https://raw.github.com/gist/3757349/thumbnail.png" width="202"></a></td>
|
60
|
-
<td>gringorten<br><a href="http://bl.ocks.org/mbostock/4362031"><img src="https://raw.github.com/gist/4362031/thumbnail.png" width="202"></a></td>
|
61
|
-
<td>guyou<br><a href="http://bl.ocks.org/mbostock/3763867"><img src="https://raw.github.com/gist/3763867/thumbnail.png" width="202"></a></td>
|
62
|
-
<td>hammer<br><a href="http://bl.ocks.org/mbostock/3712397"><img src="https://raw.github.com/gist/3712397/thumbnail.png" width="202"></a></td>
|
63
|
-
</tr>
|
64
|
-
<tr height="146" valign="top">
|
65
|
-
<td>hammerRetroazimuthal<br><a href="http://bl.ocks.org/mbostock/4459130"><img src="https://raw.github.com/gist/4459130/thumbnail.png" width="202"></a></td>
|
66
|
-
<td>healpix<br><a href="http://bl.ocks.org/mbostock/4463237"><img src="https://raw.github.com/gist/4463237/thumbnail.png" width="202"></a></td>
|
67
|
-
<td>hill<br><a href="http://bl.ocks.org/mbostock/4479513"><img src="https://raw.github.com/gist/4479513/thumbnail.png" width="202"></a></td>
|
68
|
-
<td>homolosine<br><a href="http://bl.ocks.org/mbostock/3734330"><img src="https://raw.github.com/gist/3734330/thumbnail.png" width="202"></a></td>
|
69
|
-
</tr>
|
70
|
-
<tr height="146" valign="top">
|
71
|
-
<td>kavrayskiy7<br><a href="http://bl.ocks.org/mbostock/3710082"><img src="https://raw.github.com/gist/3710082/thumbnail.png" width="202"></a></td>
|
72
|
-
<td>lagrange<br><a href="http://bl.ocks.org/mbostock/3797591"><img src="https://raw.github.com/gist/3797591/thumbnail.png" width="202"></a></td>
|
73
|
-
<td>larrivee<br><a href="http://bl.ocks.org/mbostock/3719042"><img src="https://raw.github.com/gist/3719042/thumbnail.png" width="202"></a></td>
|
74
|
-
<td>laskowski<br><a href="http://bl.ocks.org/mbostock/4489342"><img src="https://raw.github.com/gist/4489342/thumbnail.png" width="202"></a></td>
|
75
|
-
</tr>
|
76
|
-
<tr height="146" valign="top">
|
77
|
-
<td>littrow<br><a href="http://bl.ocks.org/mbostock/4459071"><img src="https://raw.github.com/gist/4459071/thumbnail.png" width="202"></a></td>
|
78
|
-
<td>loximuthal<br><a href="http://bl.ocks.org/mbostock/3867220"><img src="https://raw.github.com/gist/3867220/thumbnail.png" width="202"></a></td>
|
79
|
-
<td class="gi">mercator *<br><a href="http://bl.ocks.org/mbostock/3757132"><img src="https://raw.github.com/gist/3757132/thumbnail.png" width="202"></a></td>
|
80
|
-
<td>miller<br><a href="http://bl.ocks.org/mbostock/3734333"><img src="https://raw.github.com/gist/3734333/thumbnail.png" width="202"></a></td>
|
81
|
-
</tr>
|
82
|
-
<tr height="146" valign="top">
|
83
|
-
<td>modifiedStereographic<br><a href="http://www.jasondavies.com/maps/modified-stereographic/"><img src="http://www.jasondavies.com/maps/modified-stereographic/gs50/thumb.d3.png" width="202"></a></td>
|
84
|
-
<td>mollweide<br><a href="http://bl.ocks.org/mbostock/3734336"><img src="https://raw.github.com/gist/3734336/thumbnail.png" width="202"></a></td>
|
85
|
-
<td>mtFlatPolarParabolic<br><a href="http://bl.ocks.org/mbostock/4465130"><img src="https://raw.github.com/gist/4465130/thumbnail.png" width="202"></a></td>
|
86
|
-
<td>mtFlatPolarQuartic<br><a href="http://bl.ocks.org/mbostock/4465137"><img src="https://raw.github.com/gist/4465137/thumbnail.png" width="202"></a></td>
|
87
|
-
</tr>
|
88
|
-
<tr height="146" valign="top">
|
89
|
-
<td>mtFlatPolarSinusoidal<br><a href="http://bl.ocks.org/mbostock/4465140"><img src="https://raw.github.com/gist/4465140/thumbnail.png" width="202"></a></td>
|
90
|
-
<td>naturalEarth<br><a href="http://bl.ocks.org/mbostock/4479477"><img src="https://raw.github.com/gist/4479477/thumbnail.png" width="202"></a></td>
|
91
|
-
<td>nellHammer<br><a href="http://bl.ocks.org/mbostock/3734342"><img src="https://raw.github.com/gist/3734342/thumbnail.png" width="202"></a></td>
|
92
|
-
<td class="gi">orthographic *<br><a href="http://bl.ocks.org/mbostock/3757125"><img src="https://raw.github.com/gist/3757125/thumbnail.png" width="202"></a></td>
|
93
|
-
</tr>
|
94
|
-
<tr height="146" valign="top">
|
95
|
-
<td>peirceQuincuncial<br><a href="http://bl.ocks.org/mbostock/4310087"><img src="https://raw.github.com/gist/4310087/thumbnail.png" width="202"></a></td>
|
96
|
-
<td>polyconic<br><a href="http://bl.ocks.org/mbostock/3734343"><img src="https://raw.github.com/gist/3734343/thumbnail.png" width="202"></a></td>
|
97
|
-
<td>polyhedron.butterfly<br><a href="http://bl.ocks.org/mbostock/4458680"><img src="https://raw.github.com/gist/4458680/thumbnail.png" width="202"></a></td>
|
98
|
-
<td>polyhedron.waterman<br><a href="http://bl.ocks.org/mbostock/4458497"><img src="https://raw.github.com/gist/4458497/thumbnail.png" width="202"></a></td>
|
99
|
-
</tr>
|
100
|
-
<tr height="146" valign="top">
|
101
|
-
<td>rectangularPolyconic<br><a href="http://bl.ocks.org/mbostock/5230202"><img src="https://raw.github.com/gist/5230202/thumbnail.png" width="202"></a></td>
|
102
|
-
<td>robinson<br><a href="http://bl.ocks.org/mbostock/3710566"><img src="https://raw.github.com/gist/3710566/thumbnail.png" width="202"></a></td>
|
103
|
-
<td>satellite<br><a href="http://bl.ocks.org/mbostock/3790444"><img src="https://raw.github.com/gist/3790444/thumbnail.png" width="202"></a></td>
|
104
|
-
<td>sinuMollweide<br><a href="http://bl.ocks.org/mbostock/4319903"><img src="https://raw.github.com/gist/4319903/thumbnail.png" width="202"></a></td>
|
105
|
-
</tr>
|
106
|
-
<tr height="146" valign="top">
|
107
|
-
<td>sinusoidal<br><a href="http://bl.ocks.org/mbostock/3712399"><img src="https://raw.github.com/gist/3712399/thumbnail.png" width="202"></a></td>
|
108
|
-
<td class="gi">stereographic *<br><a href="http://bl.ocks.org/mbostock/3757137"><img src="https://raw.github.com/gist/3757137/thumbnail.png" width="202"></a></td>
|
109
|
-
<td>times<br><a href="http://bl.ocks.org/mbostock/5230564"><img src="https://raw.github.com/gist/5230564/thumbnail.png" width="202"></a></td>
|
110
|
-
<td>twoPointAzimuthal<br><a href="http://www.jasondavies.com/maps/two-point-azimuthal/"><img src="http://www.jasondavies.com/maps/two-point-azimuthal/thumb.d3.png" width="202"></a></td>
|
111
|
-
</tr>
|
112
|
-
<tr height="146" valign="top">
|
113
|
-
<td>twoPointEquidistant<br><a href="http://www.jasondavies.com/maps/two-point-equidistant/"><img src="http://www.jasondavies.com/maps/two-point-equidistant/thumb.d3.png" width="202"></a></td>
|
114
|
-
<td class="gi">transverseMercator *<br><a href="http://bl.ocks.org/mbostock/5126418"><img src="https://raw.github.com/gist/5126418/thumbnail.png" width="202"></a></td>
|
115
|
-
<td>vanDerGrinten<br><a href="http://bl.ocks.org/mbostock/3796831"><img src="https://raw.github.com/gist/3796831/thumbnail.png" width="202"></a></td>
|
116
|
-
<td>vanDerGrinten2<br><a href="http://bl.ocks.org/mbostock/5230571"><img src="https://raw.github.com/gist/5230571/thumbnail.png" width="202"></a></td>
|
117
|
-
</tr>
|
118
|
-
<tr height="146" valign="top">
|
119
|
-
<td>vanDerGrinten3<br><a href="http://bl.ocks.org/mbostock/5230580"><img src="https://raw.github.com/gist/5230580/thumbnail.png" width="202"></a></td>
|
120
|
-
<td>vanDerGrinten4<br><a href="http://bl.ocks.org/mbostock/4489365"><img src="https://raw.github.com/gist/4489365/thumbnail.png" width="202"></a></td>
|
121
|
-
<td>wagner4<br><a href="http://bl.ocks.org/mbostock/4487674"><img src="https://raw.github.com/gist/4487674/thumbnail.png" width="202"></a></td>
|
122
|
-
<td>wagner6<br><a href="http://bl.ocks.org/mbostock/3710148"><img src="https://raw.github.com/gist/3710148/thumbnail.png" width="202"></a></td>
|
123
|
-
</tr>
|
124
|
-
<tr height="146" valign="top">
|
125
|
-
<td>wagner7<br><a href="http://bl.ocks.org/mbostock/4465109"><img src="https://raw.github.com/gist/4465109/thumbnail.png" width="202"></a></td>
|
126
|
-
<td>wiechel<br><a href="http://bl.ocks.org/mbostock/4463155"><img src="https://raw.github.com/gist/4463155/thumbnail.png" width="202"></a></td>
|
127
|
-
<td>winkel3<br><a href="http://bl.ocks.org/mbostock/3682676"><img src="https://raw.github.com/gist/3682676/thumbnail.png" width="202"></a></td>
|
128
|
-
</tr>
|
129
|
-
</table>
|
130
|
-
|
131
|
-
Projections:
|
132
|
-
|
133
|
-
* aitoff - [Aitoff](http://bl.ocks.org/mbostock/3682698)
|
134
|
-
* airy - [Airy’s minimum-error azimuthal](http://bl.ocks.org/mbostock/5620807)
|
135
|
-
* albers - [Albers equal-area conic](http://bl.ocks.org/mbostock/3734308)
|
136
|
-
* armadillo - [Armadillo](http://bl.ocks.org/mbostock/4463127)
|
137
|
-
* august - [August conformal](http://bl.ocks.org/mbostock/3797581)
|
138
|
-
* azimuthalEqualArea - [Lambert azimuthal equal-area](http://bl.ocks.org/mbostock/3757101)
|
139
|
-
* azimuthalEquidistant - [azimuthal equidistant](http://bl.ocks.org/mbostock/3757110)
|
140
|
-
* baker - [Baker Dinomic](http://bl.ocks.org/mbostock/4476279)
|
141
|
-
* berghaus - [Berghaus Star](http://bl.ocks.org/mbostock/4463049)
|
142
|
-
* boggs - [Boggs eumorphic](http://bl.ocks.org/mbostock/4481220)
|
143
|
-
* bonne - [Bonne](http://bl.ocks.org/mbostock/3734313)
|
144
|
-
* bromley - [Bromley](http://bl.ocks.org/mbostock/4487695)
|
145
|
-
* chamberlin - [Chamberlin trimetric](http://bl.ocks.org/mbostock/5625053)
|
146
|
-
* collignon - [Collignon](http://bl.ocks.org/mbostock/3734316)
|
147
|
-
* conicConformal - [Lambert conformal conic](http://bl.ocks.org/mbostock/3734321)
|
148
|
-
* conicEquidistant - [conic equidistant](http://bl.ocks.org/mbostock/3734317)
|
149
|
-
* craig - [Craig retroazimuthal](http://bl.ocks.org/mbostock/4459466)
|
150
|
-
* craster - [Craster parabolic](http://bl.ocks.org/mbostock/4465118)
|
151
|
-
* cylindricalEqualArea - [cylindrical equal-area](http://bl.ocks.org/mbostock/3712408), [Gall–Peters](http://bl.ocks.org/mbostock/3946824), [Hobo–Dyer](http://bl.ocks.org/mbostock/4476487), [Tobler world-in-a-square](http://bl.ocks.org/mbostock/4476496)
|
152
|
-
* eckert1 - [Eckert I](http://bl.ocks.org/mbostock/3734322)
|
153
|
-
* eckert2 - [Eckert II](http://bl.ocks.org/mbostock/3734324)
|
154
|
-
* eckert3 - [Eckert III](http://bl.ocks.org/mbostock/3734325)
|
155
|
-
* eckert4 - [Eckert IV](http://bl.ocks.org/mbostock/3734327)
|
156
|
-
* eckert5 - [Eckert V](http://bl.ocks.org/mbostock/3734328)
|
157
|
-
* eckert6 - [Eckert VI](http://bl.ocks.org/mbostock/3734329)
|
158
|
-
* eisenlohr - [Eisenlohr conformal](http://bl.ocks.org/mbostock/3797585)
|
159
|
-
* equirectangular - [Equirectangular (Plate Carrée)](http://bl.ocks.org/mbostock/3757119)
|
160
|
-
* fahey - [Fahey](http://bl.ocks.org/mbostock/4731228)
|
161
|
-
* gallStereographic - [Gall’s stereographic](http://bl.ocks.org/mbostock/5234763)
|
162
|
-
* ginzburg4 - [Ginzburg IV](http://bl.ocks.org/mbostock/5288565)
|
163
|
-
* ginzburg5 - [Ginzburg V](http://bl.ocks.org/mbostock/5288571)
|
164
|
-
* ginzburg6 - [Ginzburg VI](http://bl.ocks.org/mbostock/5288577)
|
165
|
-
* ginzburg8 - [Ginzburg VIII](http://bl.ocks.org/mbostock/5288583)
|
166
|
-
* ginzburg9 - [Ginzburg IX](http://bl.ocks.org/mbostock/5288590)
|
167
|
-
* gnomonic - [gnomonic](http://bl.ocks.org/mbostock/3757349)
|
168
|
-
* gringorten - [Gringorten](http://bl.ocks.org/mbostock/4362031)
|
169
|
-
* guyou - [Guyou hemisphere-in-a-square](http://bl.ocks.org/mbostock/3763867)
|
170
|
-
* hammer - [Hammer](http://bl.ocks.org/mbostock/3712397), [Eckert–Greifendorff](http://bl.ocks.org/mbostock/4496212), [quartic authalic](http://bl.ocks.org/mbostock/4463175), [Briesemeister](http://bl.ocks.org/mbostock/4519926)
|
171
|
-
* hammerRetroazimuthal - [Hammer retroazimuthal](http://bl.ocks.org/mbostock/4459130)
|
172
|
-
* healpix - [HEALPix](http://bl.ocks.org/mbostock/4463237)
|
173
|
-
* hill - [Hill eucyclic](http://bl.ocks.org/mbostock/4479513), [Maurer No. 73](http://bl.ocks.org/mbostock/4479547)
|
174
|
-
* homolosine - [Goode homolosine](http://bl.ocks.org/mbostock/3734330)
|
175
|
-
* kavrayskiy7 - [Kavrayskiy VII](http://bl.ocks.org/mbostock/3710082)
|
176
|
-
* lagrange - [Lagrange conformal](http://bl.ocks.org/mbostock/3797591)
|
177
|
-
* larrivee - [Larrivée](http://bl.ocks.org/mbostock/3719042)
|
178
|
-
* laskowski - [Laskowski tri-optimal](http://bl.ocks.org/mbostock/4489342)
|
179
|
-
* littrow - [Littrow](http://bl.ocks.org/mbostock/4459071)
|
180
|
-
* loximuthal - [loximuthal](http://bl.ocks.org/mbostock/3867220)
|
181
|
-
* mercator - [Mercator](http://bl.ocks.org/mbostock/3757132)
|
182
|
-
* miller - [Miller](http://bl.ocks.org/mbostock/3734333)
|
183
|
-
* modifiedStereographic - [modified stereographic](http://www.jasondavies.com/maps/modified-stereographic/)
|
184
|
-
* mollweide - [Mollweide](http://bl.ocks.org/mbostock/3734336), [Atlantis](http://bl.ocks.org/mbostock/4519975)
|
185
|
-
* mtFlatPolarParabolic - [McBryde–Thomas flat-polar parabolic](http://bl.ocks.org/mbostock/4465130)
|
186
|
-
* mtFlatPolarQuartic - [McBryde–Thomas flat-polar quartic](http://bl.ocks.org/mbostock/4465137)
|
187
|
-
* mtFlatPolarSinusoidal - [McBryde–Thomas flat-polar sinusoidal](http://bl.ocks.org/mbostock/4465140)
|
188
|
-
* naturalEarth - [Natural Earth](http://bl.ocks.org/mbostock/4479477)
|
189
|
-
* nellHammer - [Nell–Hammer](http://bl.ocks.org/mbostock/3734342)
|
190
|
-
* orthographic - [orthographic](http://bl.ocks.org/mbostock/3757125)
|
191
|
-
* peirceQuincuncial - [Pierce quincuncial](http://bl.ocks.org/mbostock/4310087)
|
192
|
-
* polyconic - [polyconic](http://bl.ocks.org/mbostock/3734343)
|
193
|
-
* rectangularPolyconic - [rectangular polyconic](http://bl.ocks.org/mbostock/5230202)
|
194
|
-
* robinson - [Robinson](http://bl.ocks.org/mbostock/3710566)
|
195
|
-
* satellite - [satellite (tilted perpsective)](http://bl.ocks.org/mbostock/3790444)
|
196
|
-
* sinusoidal - [sinusoidal](http://bl.ocks.org/mbostock/3712399)
|
197
|
-
* sinuMollweide - [Sinu-Mollweide](http://bl.ocks.org/mbostock/4319903)
|
198
|
-
* stereographic - [stereographic](http://bl.ocks.org/mbostock/3757137)
|
199
|
-
* times - [Times](http://bl.ocks.org/mbostock/5230564)
|
200
|
-
* transverseMercator - [transverse Mercator](http://bl.ocks.org/mbostock/5126418)
|
201
|
-
* twoPointAzimuthal - [two-point azimuthal](https://www.jasondavies.com/maps/two-point-azimuthal/)
|
202
|
-
* twoPointEquidistant - [two-point equidistant](https://www.jasondavies.com/maps/two-point-equidistant/)
|
203
|
-
* vanDerGrinten - [Van der Grinten](http://bl.ocks.org/mbostock/3796831)
|
204
|
-
* vanDerGrinten2 - [Van der Grinten II](http://bl.ocks.org/mbostock/5230571)
|
205
|
-
* vanDerGrinten3 - [Van der Grinten III](http://bl.ocks.org/mbostock/5230580)
|
206
|
-
* vanDerGrinten4 - [Van der Grinten IV](http://bl.ocks.org/mbostock/4489365)
|
207
|
-
* wagner4 - [Wagner IV, Putniṇš P2´](http://bl.ocks.org/mbostock/4487674)
|
208
|
-
* wagner6 - [Wagner VI](http://bl.ocks.org/mbostock/3710148)
|
209
|
-
* wagner7 - [Wagner VII](http://bl.ocks.org/mbostock/4465109)
|
210
|
-
* wiechel - [Wiechel](http://bl.ocks.org/mbostock/4463155)
|
211
|
-
* winkel3 - [Winkel tripel](http://bl.ocks.org/mbostock/3682676)
|
212
|
-
|
213
|
-
This plugin also provides d3.geo.interrupt, which can be used to create arbitrary interrupted projections from a given raw projection. For example, see [Philbrick’s interrupted Sinu-Mollweide](http://bl.ocks.org/4481520).
|
214
|
-
|
215
|
-
This plugin requires [D3 3.0](https://github.com/mbostock/d3/wiki/Upgrading-to-3.0) or greater. To use the official hosted version, include the projection plugin after including D3:
|
216
|
-
|
217
|
-
```html
|
218
|
-
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
|
219
|
-
<script src="http://d3js.org/d3.geo.projection.v0.min.js" charset="utf-8"></script>
|
220
|
-
```
|
221
|
-
|
222
|
-
Alternatively, you can clone this repo, [download the zipball](http://github.com/d3/d3-plugins/zipball/master), or right-click [d3.geo.projection.v0.min.js](http://d3js.org/d3.geo.projection.v0.min.js) and save.
|
223
|
-
|
224
|
-
## Defining a New Projection
|
225
|
-
|
226
|
-
First define your raw projection function:
|
227
|
-
|
228
|
-
```js
|
229
|
-
function cosinusoidal(λ, φ) {
|
230
|
-
return [λ * Math.sin(φ), φ];
|
231
|
-
}
|
232
|
-
|
233
|
-
cosinusoidal.invert = function(x, y) {
|
234
|
-
return [x / Math.sin(y), y];
|
235
|
-
};
|
236
|
-
```
|
237
|
-
|
238
|
-
Then create a constructor using d3.geo.projection:
|
239
|
-
|
240
|
-
```js
|
241
|
-
d3.geo.cosinusoidal = function() {
|
242
|
-
return d3.geo.projection(cosinusoidal);
|
243
|
-
};
|
244
|
-
```
|
245
|
-
|
246
|
-
You can optionally expose the raw projection to facilitate composite projections:
|
247
|
-
|
248
|
-
```js
|
249
|
-
(d3.geo.cosinusoidal = function() {
|
250
|
-
return d3.geo.projection(cosinusoidal);
|
251
|
-
}).raw = cosinusoidal;
|
252
|
-
```
|
1
|
+
Moved to [d3-geo-projection](https://github.com/d3/d3-geo-projection/).
|
@@ -4,6 +4,15 @@ An interpolator for zooming and panning between two views of a two-dimensional p
|
|
4
4
|
|
5
5
|
Demo: <http://bl.ocks.org/3828981>
|
6
6
|
|
7
|
+
To use this plugin:
|
8
|
+
|
9
|
+
```html
|
10
|
+
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
|
11
|
+
<script src="http://d3js.org/d3.interpolate-zoom.v0.min.js" charset="utf-8"></script>
|
12
|
+
```
|
13
|
+
|
14
|
+
Note that since this script uses UTF-8 characters, the `charset` attribute is required if the page does not have a `<meta charset="utf-8">` in the head. There’s also a [d3.interpolate-zoom.v0.js](http://d3js.org/d3.interpolate-zoom.v0.js) for development, or you can clone this repository.
|
15
|
+
|
7
16
|
<a name="interpolateZoom" href="#interpolateZoom">#</a> d3.<b>interpolateZoom</b>(<i>start</i>, <i>end</i>)
|
8
17
|
|
9
18
|
Returns an [interpolator](https://github.com/mbostock/d3/wiki/Transitions#wiki-_interpolate) between the two points *start* and *end*. Each point should be defined as an array of three numbers in world coordinates: *ux*, *uy* and *w*. The first two coordinates *ux*, *uy* are the center of the viewport. The last coordinate *w* is the size of the viewport.
|
@@ -0,0 +1,27 @@
|
|
1
|
+
var vows = require("vows"),
|
2
|
+
assert = require("assert");
|
3
|
+
|
4
|
+
global.d3 = require("d3");
|
5
|
+
require("./interpolate-zoom");
|
6
|
+
|
7
|
+
var suite = vows.describe("d3.interpolateZoom");
|
8
|
+
|
9
|
+
suite.addBatch({
|
10
|
+
"interpolateZoom": {
|
11
|
+
topic: function() { return d3.interpolateZoom; },
|
12
|
+
"identity": function(interpolate) {
|
13
|
+
var i = interpolate([1, 1, 1], [1, 1, 1]);
|
14
|
+
assert.deepEqual(i(0), [1, 1, 1]);
|
15
|
+
assert.deepEqual(i(.5), [1, 1, 1]);
|
16
|
+
assert.deepEqual(i(1), [1, 1, 1]);
|
17
|
+
},
|
18
|
+
"ux0 almost equal to ux1": function(interpolate) {
|
19
|
+
var i = interpolate([6317.937500000001, 9242.5, 2], [6317.9375, 9242.5, 5]);
|
20
|
+
assert.deepEqual(i(0), [6317.937500000001, 9242.5, 2]);
|
21
|
+
assert.deepEqual(i(.5), [6317.9375, 9242.5, 3.162277660168379]);
|
22
|
+
assert.deepEqual(i(1), [6317.9375, 9242.5, 5]);
|
23
|
+
}
|
24
|
+
}
|
25
|
+
});
|
26
|
+
|
27
|
+
suite.export(module);
|
@@ -9,32 +9,7 @@ var ρ = Math.SQRT2,
|
|
9
9
|
d3.interpolateZoom = function(p0, p1) {
|
10
10
|
var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],
|
11
11
|
ux1 = p1[0], uy1 = p1[1], w1 = p1[2];
|
12
|
-
return ux0 === ux1 && uy0 === uy1
|
13
|
-
? interpolate1(ux0, uy0, w0, w1)
|
14
|
-
: interpolate2(ux0, uy0, ux1, uy1, w0, w1);
|
15
|
-
};
|
16
|
-
|
17
|
-
// Special case for u0 = u1.
|
18
|
-
function interpolate1(ux0, uy0, w0, w1) {
|
19
|
-
var S = Math.abs(Math.log(w1 / w0)) / ρ,
|
20
|
-
k = w1 < w0 ? -1 : 1;
|
21
|
-
|
22
|
-
function interpolate(t) {
|
23
|
-
var s = t * S;
|
24
|
-
return [
|
25
|
-
ux0,
|
26
|
-
uy0,
|
27
|
-
w0 * Math.exp(k * ρ * s)
|
28
|
-
];
|
29
|
-
}
|
30
12
|
|
31
|
-
interpolate.duration = S * 1000;
|
32
|
-
|
33
|
-
return interpolate;
|
34
|
-
};
|
35
|
-
|
36
|
-
// General case.
|
37
|
-
function interpolate2(ux0, uy0, ux1, uy1, w0, w1) {
|
38
13
|
var dx = ux1 - ux0,
|
39
14
|
dy = uy1 - uy0,
|
40
15
|
d2 = dx * dx + dy * dy,
|
@@ -43,17 +18,28 @@ function interpolate2(ux0, uy0, ux1, uy1, w0, w1) {
|
|
43
18
|
b1 = (w1 * w1 - w0 * w0 - ρ4 * d2) / (2 * w1 * ρ2 * d1),
|
44
19
|
r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),
|
45
20
|
r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1),
|
46
|
-
|
21
|
+
dr = r1 - r0,
|
22
|
+
S = (dr || Math.log(w1 / w0)) / ρ;
|
47
23
|
|
48
24
|
function interpolate(t) {
|
49
|
-
var s = t * S
|
50
|
-
|
25
|
+
var s = t * S;
|
26
|
+
if (dr) {
|
27
|
+
// General case.
|
28
|
+
var coshr0 = cosh(r0),
|
29
|
+
u = w0 / (ρ2 * d1) * (coshr0 * tanh(ρ * s + r0) - sinh(r0));
|
30
|
+
return [
|
31
|
+
ux0 + u * dx,
|
32
|
+
uy0 + u * dy,
|
33
|
+
w0 * coshr0 / cosh(ρ * s + r0)
|
34
|
+
];
|
35
|
+
}
|
36
|
+
// Special case for u0 ~= u1.
|
51
37
|
return [
|
52
|
-
ux0 +
|
53
|
-
uy0 +
|
54
|
-
w0 *
|
38
|
+
ux0 + t * dx,
|
39
|
+
uy0 + t * dy,
|
40
|
+
w0 * Math.exp(ρ * s)
|
55
41
|
];
|
56
|
-
}
|
42
|
+
}
|
57
43
|
|
58
44
|
interpolate.duration = S * 1000;
|
59
45
|
|
data.tar.gz.sig
CHANGED
Binary file
|