Skip to content

Instantly share code, notes, and snippets.

@cool-Blue
cool-Blue / .block
Created April 1, 2018 07:14 — forked from mbostock/.block
Force-Directed Graph
license: gpl-3.0
height: 600
@cool-Blue
cool-Blue / .gitignore
Last active April 16, 2017 06:05
d2v4 force simulation with velocityJS animation
# Created by .ignore support plugin (hsz.mobi)
### Example user template template
### Example user template
# IntelliJ project files
.idea
*.iml
out
gen
.gitignore
@cool-Blue
cool-Blue / SO30322620 idiomatic v3.js
Last active February 28, 2016 20:59
d3 in webWorkers
// added limit function to keep squares in play
// changed lock management to d3.map on __data__
// delegated data bind to web worker
// data transfer via JSON serialisation
// lock moved off __data__ onto ___locks
// putting it on __data__ is not thread safe because transitions terminate
// during the worker cycle
$(function () {
var rects,
@cool-Blue
cool-Blue / index.html
Last active November 20, 2015 07:32
Using d3 transitions on dummy nodes to transition data
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="https://gitcdn.xyz/repo/cool-Blue/d3-lib/master/inputs/button/style.css">
<link rel="stylesheet" type="text/css" href="https://gitcdn.xyz/repo/cool-Blue/d3-lib/master/plot/fps-histogram.css">
<style>
body {
margin: 0;
@cool-Blue
cool-Blue / index.html
Last active March 31, 2018 08:21
dynamic pie chart with proper label orientation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>http://stackoverflow.com/questions/32510101/d3-why-is-enter-selection-not-showing-any-transition-for-a-donut-chart?noredirect=1#comment52896340_32510101</title>
<style>
.chart text {
font: 16px sans-serif;
}
@cool-Blue
cool-Blue / index.html
Last active September 28, 2015 08:10
d3 Force directed graph with node size transitions - velocity.js transitions
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>http://stackoverflow.com/questions/32521887/animate-objects-in-force-layout-in-d3-js/32523428#32523428</title>
<link rel="stylesheet" type="text/css" href="https://gitcdn.xyz/repo/cool-Blue/d3-lib/master/plot/fps-histogram.css">
<style>
body {
background: black;
margin:0;
@cool-Blue
cool-Blue / index.html
Created September 23, 2015 17:17
pixi.js dragable Graphics object
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:webGL="CB:webGL/dummy/nodes">
<head>
<meta charset="UTF-8">
<title></title>
<style>
canvas {
display: block;
}
@cool-Blue
cool-Blue / bkmklt.js
Last active August 29, 2016 17:38
jQuery and pixi.js solved
/**
* Created by cool.blue on 29-Aug-16.
*/
var load = (function () {
var messageDispatcher, weinre;
function toggleElement(context, n) {
function arrayicate(x) {
@cool-Blue
cool-Blue / index.html
Created September 21, 2015 17:22
pixi test workarround
<!DOCTYPE html>
<html lang="en">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:webGL="CB:webGL/dummy/nodes">
<head>
<meta charset="UTF-8">
<title></title>
<style>
#viz {
display: block;
position: relative;
@cool-Blue
cool-Blue / index.html
Last active September 21, 2015 15:54
pixi.js test case
<!DOCTYPE html>
<html lang="en">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:webGL="CB:webGL/dummy/nodes">
<head>
<meta charset="UTF-8">
<title></title>
<style>
#viz {
display: block;
position: relative;