Grow your CSS skills. Land your dream job.

Which Language is this?

  • # March 20, 2013 at 8:58 am

    I saw these codes somewhere, and the demo showed a moving circle.
    I copied the codes and quickly created an html document and pasted the codes inside thinking it is js, but it didnt run. Which language was used to do that?

    var x = 20;
    var speed = 3;

    var draw = function() {
    background(202, 255, 97);

    fill(66, 66, 66);
    ellipse(x, 200, 50, 50);

    x = x + speed;
    };

    # March 20, 2013 at 9:03 am

    It looks like JS, you’re probably missing some library that defined those functions.

    # March 20, 2013 at 11:34 am

    It could be:

    http://processingjs.org/reference/ellipse_/

    # March 20, 2013 at 4:11 pm

    I believe it is JS, but it’s not all of it. It would be easier to say for sure if the entire code was there. Yes, this is only a part, not the full script. It’s the size and speed of an oval being filled with color, however there is no mention of an event behavior, so maybe a possible animation of some sort…

    # March 20, 2013 at 4:12 pm

    It won’t do anything because there is no trigger, listener, event of any sort specified.

    # March 21, 2013 at 7:00 am

    Here is the [source](http://www.khanacademy.org/cs/if-statements/836708402 “”)

    # March 21, 2013 at 7:09 am

    Looks like it’s a series. It’d probably make more sense if you start from the first tutorial, where ever that is.

    # March 21, 2013 at 7:56 am

    There are using this: http://processingjs.org/, as explained in some hard to find [introduction video](http://www.khanacademy.org/cs/welcome-to-computer-science/882454257)

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".