Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Created July 30, 2012 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roundrobin/3203204 to your computer and use it in GitHub Desktop.
Save roundrobin/3203204 to your computer and use it in GitHub Desktop.
just another inlet to tributary
var offsetX = 6
var offsetY = 5
var blur = 7.6
var color = "#1AA35C"
addTextElement('Halllo 000')
function addTextElement(text){
var textArray = text.split('')
var svgElem = g.append('text')
.attr("dominant-baseline", "text-before-edge")
.attr("fill", "#000000")
.attr("x", 0)
.attr("y", 260)
.attr("font-size", 258)
.attr("font-family", "Arial")
.attr("text-anchor", "start")
.attr('transform','rotate('+(2)+')')
for(char in textArray){
console.log(textArray[char])
svgElem.append('tspan')
.text(textArray[char])
.attr('class','char')
.attr('fill','#'+Math.floor(Math.random()*16777215).toString(16))
.attr('stroke','#'+Math.floor(Math.random()*16777215).toString(16))
.attr('stroke-width',char*2)
.style('text-shadow', (offsetX*char)+'px '+offsetY+'px '+blur+'px '+'#'+Math.floor(Math.random()*16777215).toString(16))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment