Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 \\ 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}
Why wont the rectangle move from left to right across the canvas with this code?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started