Author Archives: keith

Linescapes Iteration 5

Move horizon out. Stretch to edge of canvas. Fade lines in distance. Add a fill to cover previous lines. [php lang=”JavaScript”]$(function() { var canvas, context, width, height, x, x1, x2, y, z = 5000, fl = 350, xres = 5, … Continue reading

Posted in JavaScript | Leave a comment

Linescapes Iteration 4

Segmentize and randomize. [php lang=”JavaScript”]$(function() { var canvas, context, width, height, x, x1, x2, y, z = 600, fl = 350, xres = 5, zres = 5, xcenter, ycenter, scale; canvas = $(“#canvas”).get(0); context = canvas.getContext(“2d”); width = canvas.width; height … Continue reading

Posted in JavaScript | 3 Comments

Linescapes Iteration 3

Make it 3D. [php lang=”JavaScript”]$(function() { var canvas, context, width, height, x1, x2, y, z = 600, fl = 350, xcenter, ycenter, scale; canvas = $(“#canvas”).get(0); context = canvas.getContext(“2d”); width = canvas.width; height = canvas.height; xcenter = width / 2; … Continue reading

Posted in JavaScript | Leave a comment

Linescapes Iteration 2

Draw a bunch of lines. [php lang=”JavaScript”]$(function() { var canvas, context, width, height; canvas = $(“#canvas”).get(0); context = canvas.getContext(“2d”); width = canvas.width; height = canvas.height; for(var y = 0; y < height; y += 10) { context.beginPath(); context.moveTo(0, y); context.lineTo(width, … Continue reading

Posted in JavaScript | 8 Comments

Linescapes Iteration 1

Draw a line. [php lang=”JavaScript”]$(function() { var canvas, context, width, height; canvas = $(“#canvas”).get(0); context = canvas.getContext(“2d”); width = canvas.width; height = canvas.height; context.beginPath(); context.moveTo(0, height / 2); context.lineTo(width, height / 2); context.stroke(); });[/php] Result.

Posted in JavaScript | 4 Comments

Beta Culture

Technology has entered a phase where pretty much everything is a beta. Take GMail. The first beta appeared in 2004. It remained in beta status until 2009. In fact, people so missed the “BETA” label on the GMail logo that … Continue reading

Posted in Technology | 15 Comments

Syntax

Doing some Android dev these days. Needed to check if a editable text field was empty or not. I had to dig around to find out how to do this. It turns out that an EditText’s getText() method returns an … Continue reading

Posted in ActionScript, Components, Flash, iPhone | 37 Comments

New MinimalComps Site, and Github

During JavaScript month, there was little time for much else. There were bugs and issues in MinimalComps that had piled up and I was ignoring them. So yesterday I sat down and went through the whole lot. I realized that … Continue reading

Posted in Components | 3 Comments

Lissajous Webs

More JavaScript! I’ve actually started delving into Android, but I’m still tinkering with JS too. I’ve been fleshing out the Verlet System I created last month. Added some cool stuff to it. I’ll be doing a future post on that … Continue reading

Posted in JavaScript | 4 Comments

JavaScript Day 31: The End

Wow, look at that – Day 31! I made it! There were some rough points in the middle there, but I managed to pull off some filler posts until I figured out the next topic. I hope you’ve enjoyed this … Continue reading

Posted in JavaScript | 14 Comments