[ Launch: Grid - Type 1 ] 5019120 by roundrobin
[ Launch: Tributary inlet ] 5018733 by roundrobin
-
-
Save roundrobin/5019120 to your computer and use it in GitHub Desktop.
Grid - Type 2
This file contains 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
{"description":"Grid - Type 2","endpoint":"","display":"svg","public":true,"require":[{"name":"grid.js","url":"https://raw.github.com/roundrobin/tributary-helpers/master/grid.js"},{"name":"pathy","url":"https://raw.github.com/roundrobin/svg-path-generator/master/svg-path-generator.js"}],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/3GEtgKC.png"} |
This file contains 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
var x = 80; | |
var y = 51; | |
var svg = g.append('g') | |
.attr('transform','translate('+[x,y]+')') | |
var factor = 1.10528; | |
var w = 315 * factor; | |
var h = 408 * factor; | |
var rangeX = 5.8; | |
var rangeY = 5.63; | |
var strokeCol = '#FFFFFF'; | |
var background = '#478FF8'; | |
thelp.helpers.grid(svg, w,h,rangeX,rangeY, strokeCol, background); | |
var r3 = ['Q','R','S','T','U','V','W','X','Y','Z']; | |
var r2 = ['I','J','K','L','M','N','O','P']; | |
var r = ['A','B','C','D','E','F','G','H']; | |
var r = ['']; | |
var r2 = ['P']; | |
var col1='#FFFFFF'; | |
var col2='#FFFFFF'; | |
var fontSize = 629; | |
var factor = 451; | |
var val = -47; | |
var t = g.append('g').selectAll('text') | |
.data(r) | |
.enter() | |
.append('text') | |
.text(function(d,i){ return d;}) | |
.attr({ | |
fill: col1, | |
x : x + val, | |
y: y + factor, | |
"font-size": fontSize, | |
"font-family": "Helvetica", | |
"text-anchor": "start", | |
'fill-opacity':'0.6' | |
}); | |
var t = g.append('g').selectAll('text') | |
.data(r2) | |
.enter() | |
.append('text') | |
.text(function(d,i){ return d;}) | |
.attr({ | |
fill: col1, | |
x : x + val, | |
y: y + factor, | |
"font-size": fontSize, | |
"font-family": "Helvetica", | |
"text-anchor": "start", | |
'fill-opacity':'0.6' | |
}); | |
var svg = d3.select("svg"); | |
var path2 = new Path(svg) | |
path2.add(['m',x,y]); | |
var len = 130; | |
var len2 = 144; | |
path2.add(['q',0,0,200,0]); | |
path2.add(['q',len, 0, len2, len]); | |
path2.add(['q',0, len, -len2, len]); | |
path2.add(['q',0, 0, -len, 0]); | |
path2.add(['q',0, 0, 0, 195]); | |
path2.add(['q',0, 0, -70, 0]); | |
path2.add(['q',0, 0, 0, -455]); | |
path2.add(['z']); | |
path2.render(); | |
//path2.showPoints(); | |
var svg = d3.select("svg"); | |
var path = new Path(svg) | |
path.add(['m',x,y]); | |
path.add(['q',0,0,200,0]); | |
path.add(['q',126,0,127,109]); | |
path.add(['q',0,60,-64,99]); | |
path.add(['q',79,12,84,116]); | |
path.add(['q',0,116,-145,126]); | |
path.add(['q',0,0,-200,0]); | |
path.add(['q', 0,0,0,-h]); | |
path.add(['z']); | |
path.render(); | |
//path.showPoints() | |
var delta = path.el().attr('d'); | |
console.log(delta) | |
path2.el().transition() | |
.duration(2000) | |
.attr('d', delta) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment