figure and filling colorshading and shapes

var x = 0

function setup ()
{
    createCanvas( displayWidth, displayHeight )
    background("black")

}

function draw()
{
    translate( x += 1, 0 )
    fill("red")
    cube = rect( 0, 0, 100, 100 )
    fill("green")
    cube1 = rect( 200, 200, 100, 100 )
    fill("orange")
    circle = ellipse( 500, 500, 100, 100 )
}

Question 1: why is the circle reflects the plume when driving ?

Question 2: why if the background is white, it is erased to black ? How to make not to reinstall ??

Answers

  • edited July 2017

    since this is your first post: Try to format your code better (this is no answer to your question, just a prereq to get answers here...):

    var x = 0;
    
    function setup () { 
      createCanvas( displayWidth, displayHeight ) ;
      background("black");
    }
    
    function draw() { 
      translate( x += 1, 0 ) ;
      fill("red") ;
      cube = rect( 0, 0, 100, 100 ) ;
      fill("green");
      cube1 = rect( 200, 200, 100, 100 ) ;
      fill("orange") ;
      circle = ellipse( 500, 500, 100, 100 );
    }
    
  • Мог бы и помочь сразу, а не только замечания делать : /

  • Пишите кто может помочь. Вопросов реально много. Заранее спасибо.

  • English please.... ;-)

  • on the forum there is no one to tell ?

Sign In or Register to comment.