Answered step by step
Verified Expert Solution
Link Copied!

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? image text in transcribed
\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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions