|
Author |
Topic: EXTREMELY simple problem (Read 301 times) |
|
Ride215
|
EXTREMELY simple problem
« on: Apr 6th, 2004, 10:59am » |
|
Ok, I am a very new beginner, so I have no idea why this isn't running, but... I was reading the introductory processing tutorial and the beginning of the "motion" section has this example: int x = 0; void setup(){ noStroke(); } void loop(){ rect(x,0,5,100); x = x+1; } Now I just wanted to see it work so I did it on my own but instead of the line going across as it should, it basically does a wipe over the entire screen, where is the discrepency?
|
|
|
|
TomC
|
Re: EXTREMELY simple problem
« Reply #1 on: Apr 6th, 2004, 12:27pm » |
|
In earlier alpha releases the background was cleared automatically at the start of every frame. Now it must be done explicitly. Add a line like this at the beginning of loop() (before the call to rect()). Code: See the reference for more info on background().
|
« Last Edit: Apr 6th, 2004, 12:28pm by TomC » |
|
|
|
|
|