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, y); context.stroke(); } });[/php] Result.

This entry was posted in JavaScript. Bookmark the permalink.

8 Responses to Linescapes Iteration 2

  1. Matita says:

    You’re very good at programming 😛

    Can’t wait to see the point of it all

  2. Joel P says:

    Hmm… “Result” is an embedded PNG. Could there be something in the HTML that will soon blow our minds? Is K. Peters actually in heaven? Is Hurley an angel?

  3. Ryan P says:

    Will the result look like something in this book? http://amzn.to/qVFjQI

Leave a Reply