Question: Why wont the rectangle move from left to right across the canvas with this code? begin{tabular}{l|l} 1 & let x=250 2 & let y=250
\begin{tabular}{l|l} 1 & let x=250 \\ 2 & let y=250 \\ 37 function setup() \{ \\ 4 & createCanvas (500,500); \\ 5 & rectMode(CENTER); \\ 6 & \\ 7 & x=x+250; \\ 8 & j \\ 9 & \\ 10 function draw(){ \\ 11 & background(220); \\ 12 & fill(255,0,0) \\ 13 & translate(width/2, height/2) \\ 14 & rect (100,100,100,100) \\ 15 & \\ 16 & ) \end{tabular}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
