Bitcoin Forum
October 23, 2017, 01:53:05 PM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Need hep with Processing.JS Questions  (Read 466 times)
duckydonald
Sr. Member
****
Offline Offline

Activity: 350


View Profile
March 18, 2015, 11:02:50 PM
 #1

So I had been learning Processing.JS if anyone can help me with these questions, it would be appreciated.


 
 
           ▄████▄
         ▄████████▄
       ▄████████████▄
     ▄████████████████▄
    ████████████████████      ▄█▄                 ▄███▄                 ▄███▄                 ▄████████████████▀   ▄██████████

  ▄▄▄▀█████▀▄▄▄▄▀█████▀▄▄▄     ▀██▄             ▄██▀ ▀██▄             ▄██▀ ▀██▄             ▄██▀                   ██
▄█████▄▀▀▀▄██████▄▀▀▀▄█████▄     ▀██▄         ▄██▀     ▀██▄         ▄██▀     ▀██▄         ▄██▀        ▄█▄          ▀██████████████▄
████████████████████████████       ▀██▄     ▄██▀         ▀██▄     ▄██▀         ▀██▄     ▄██▀          ▀█▀                        ██
 ▀████████████████████████▀          ▀██▄ ▄██▀             ▀██▄ ▄██▀     ▄█▄     ▀██▄ ▄██▀                                       ██
   ▀████████████████████▀              ▀███▀                 ▀███▀       ▀█▀       ▀███▀      ▄███████████████████████████████████▀
     ▀████████████████▀
       ▀████████████▀
         ▀████████▀
           ▀████▀
║║


║║
.
.

║║
██
║║
.
.

║║
██
║║
.
║║


║║
1508766785
Hero Member
*
Offline Offline

Posts: 1508766785

View Profile Personal Message (Offline)

Ignore
1508766785
Reply with quote  #2

1508766785
Report to moderator
1508766785
Hero Member
*
Offline Offline

Posts: 1508766785

View Profile Personal Message (Offline)

Ignore
1508766785
Reply with quote  #2

1508766785
Report to moderator
1508766785
Hero Member
*
Offline Offline

Posts: 1508766785

View Profile Personal Message (Offline)

Ignore
1508766785
Reply with quote  #2

1508766785
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1508766785
Hero Member
*
Offline Offline

Posts: 1508766785

View Profile Personal Message (Offline)

Ignore
1508766785
Reply with quote  #2

1508766785
Report to moderator
1508766785
Hero Member
*
Offline Offline

Posts: 1508766785

View Profile Personal Message (Offline)

Ignore
1508766785
Reply with quote  #2

1508766785
Report to moderator
1508766785
Hero Member
*
Offline Offline

Posts: 1508766785

View Profile Personal Message (Offline)

Ignore
1508766785
Reply with quote  #2

1508766785
Report to moderator
b!z
Legendary
*
Offline Offline

Activity: 1568



View Profile
March 18, 2015, 11:35:27 PM
 #2

http://en.wikipedia.org/wiki/Processing.js

Quote
Processing.js is a JavaScript port of Processing, a programming language designed to write visualizations, images, and interactive content. It allows web browsers to display animations, visual applications, games and other graphical rich content without the need for a Java applet or Flash plugin.

http://processingjs.org/
duckydonald
Sr. Member
****
Offline Offline

Activity: 350


View Profile
March 19, 2015, 01:54:16 PM
 #3

So I had been learning processing.js from two different sources, first I started using Khan Academy and I also  had been learning from processing.org

Now both had taught two different codes, the once from Khanacademy:

background(252, 255, 214);
noStroke();

// position of the car
var x = 10;

// draw the car body
fill(255, 0, 115);
rect(x, 200, 100, 20);
rect(x + 15, 178, 70, 40);

// draw the wheels
fill(77, 66, 66);
ellipse(x + 25, 221, 24, 24);
ellipse(x + 75, 221, 24, 24);

var draw = function() {
    // this is the draw loop! everything inside these
    // brackets will be run over and over again.
   
};

Then Codes like this from Processing.org:

oid setup() {
  size(500, 400);
  background(10, 80, 100);
}

void draw() {
  if (mousePressed) {
    background(10, 80, 100);
  }

  stroke(255, 255, 255);
  fill(160, 220, 90);
  ellipse(mouseX, 200, 300, 300);

  fill(160, 210, 230);
  rect(245, mouseY, 10, 240);

  fill(255, 255, 255);
  ellipse(mouseX, mouseY, 70, 70);
}

So I used both these codes on a processing app builder and the one from Khan Academy dont work.  They both have different setup, Is the Khanacademy learning outdated?



 
 
           ▄████▄
         ▄████████▄
       ▄████████████▄
     ▄████████████████▄
    ████████████████████      ▄█▄                 ▄███▄                 ▄███▄                 ▄████████████████▀   ▄██████████

  ▄▄▄▀█████▀▄▄▄▄▀█████▀▄▄▄     ▀██▄             ▄██▀ ▀██▄             ▄██▀ ▀██▄             ▄██▀                   ██
▄█████▄▀▀▀▄██████▄▀▀▀▄█████▄     ▀██▄         ▄██▀     ▀██▄         ▄██▀     ▀██▄         ▄██▀        ▄█▄          ▀██████████████▄
████████████████████████████       ▀██▄     ▄██▀         ▀██▄     ▄██▀         ▀██▄     ▄██▀          ▀█▀                        ██
 ▀████████████████████████▀          ▀██▄ ▄██▀             ▀██▄ ▄██▀     ▄█▄     ▀██▄ ▄██▀                                       ██
   ▀████████████████████▀              ▀███▀                 ▀███▀       ▀█▀       ▀███▀      ▄███████████████████████████████████▀
     ▀████████████████▀
       ▀████████████▀
         ▀████████▀
           ▀████▀
║║


║║
.
.

║║
██
║║
.
.

║║
██
║║
.
║║


║║
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!