Launch the instance and connect with ssh.
##Update the server
sudo yum update
##Install php and MySQL packages
license: gpl-3.0 |
// | |
// returns a list of all elements under the cursor | |
// | |
function elementsFromPoint(x,y) { | |
var elements = [], previousPointerEvents = [], current, i, d; | |
// get all elements via elementFromPoint, and remove them from hit-testing in order | |
while ((current = document.elementFromPoint(x,y)) && elements.indexOf(current)===-1 && current != null) { | |
// push the element and its current style |
Launch the instance and connect with ssh.
##Update the server
sudo yum update
##Install php and MySQL packages
Playing around with Boids-style flocking. Click to add more, coloring by movement colors each boid by a moving average of its acceleration magnitude.
See also: Particle tentacles
More boids:
boids by Hugh Kennedy
boids-canvas by Mike Christensen
boids demo by Anoop Elias
flocking in Processing by Daniel Shiffman
(function() { | |
/* == GLOBAL DECLERATIONS == */ | |
TouchMouseEvent = { | |
DOWN: "touchmousedown", | |
UP: "touchmouseup", | |
MOVE: "touchmousemove" | |
} | |
/* == EVENT LISTENERS == */ |
// Since `overlapArea` function is monotonic increasing, we can perform a | |
// simple bisection search to find the distance that leads to an overlap | |
// area within epsilon of the desired overlap. | |
function distanceForOverlapArea(r1, r2, desiredOverlap) { | |
// Ensure r1 <= r2 | |
if (r1 > r2) { | |
var temp = r2; | |
r2 = r1; | |
r1 = temp; | |
} |
license: gpl-3.0 |
license: gpl-3.0 | |
height: 960 | |
redirect: https://observablehq.com/@mbostock/star-map |
license: gpl-3.0 | |
redirect: https://observablehq.com/@d3/line-with-missing-data |
This demonstrates how to use d3-annotation() with bboxCollide
to procedurally place node labels. After using the nodes data to create a network visualization of the Les Miserables play, we filter the nodes to leave out the side characters and pass that array to d3-annotation
. We then create a second forceSimulation
, this time using the size of the notes as the property in our bounding box collision detection, to move the labels out of each others' way.
d3-annotation
by Susie Lu.