FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   noBackground
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: noBackground  (Read 302 times)
kevin

WWW
noBackground
« on: Oct 2nd, 2003, 6:40pm »

Hi all,
 
I've not bee keeping up with all the updates lately.
 
bu I see noBackground() is now gone. What's the best way of replicating that 'additive' behaviour now?
 
If there's been threads on this already you can just point me to them.
 
cya
 
toxi

WWW
Re: noBackground
« Reply #1 on: Oct 2nd, 2003, 6:52pm »

having no background refreshes is now the default behaviour, hence the noBackground() function is obsolete. since rev60, you only use background() in side loop() if you want a fresh screen...
 
http://proce55ing.net/reference/background_.html
 

http://toxi.co.uk/
kevin

WWW
Re: noBackground
« Reply #2 on: Oct 2nd, 2003, 7:11pm »

Ah, thank you.
 
Incidentally, what's the best way of replicating that kind of behvaiour with a more controller mannor. for example of you wanted to have a few objects have 'trails' of sorts, but don't want to hold it all in variables.
 
I've seen people applying pixel effects to projects, and assumer there's some kind of buffering going on there.
 
Any pointers appreciated.
 
toxi

WWW
Re: noBackground
« Reply #3 on: Oct 2nd, 2003, 7:25pm »

doing trails for only a few "objects" will be hard as everything is just being drawn into one single pixel buffer. it's possible though when these objects are only in one fixed area, then you can clear the other by drawing a filled rect etc.
 
to create trails which fade out, simply draw a semi transparent rectangle at the beginning of each frame...
 
Code:
void loop() {
  fill(200,200,200,30);
  rect(0,0,width,height);
  fill(0);
  ellipse(random(width),random(height),10,10);
}

 
okay?
 

http://toxi.co.uk/
Pages: 1 

« Previous topic | Next topic »