All of the dragging functions (in the mathsfunctions.js file) were taken from this block. I simplified the code somewhat and only kept what is essential to the dragging functionality, then added zoom. It always zooms to the center, never to the sides of the globe. Zoom is bounded between 0.75 and 50.
These are simple circles, flying in circles. I made this a while ago to understand the d3 timer function.
This is a randomly generated (very simple) starry sky. Based on the screen size, I determine the numbers of small, medium and large stars I want, then generate their positions randomly. I used this a couple times as a background for other projects, e.g. my Solar System.
There's a version with a reload button here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| redirect: https://observablehq.com/@sarah37/spinning-globe |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| height: 960 | |
| border: no | |
| redirect: https://observablehq.com/@sarah37/barabasi-albert-simulation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| redirect: https://observablehq.com/@sarah37/pebble-shapes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| height: 960 | |
| redirect: https://observablehq.com/@sarah37/sierpinski-triangles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| height: 960 | |
| redirect: https://observablehq.com/@sarah37/sierpinski-triangles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| height: 960 | |
| redirect: https://observablehq.com/@sarah37/sierpinski-triangles |
OlderNewer