coding please help!

9 views
Skip to first unread message

Kaplash Garg

unread,
Mar 28, 2020, 6:33:05 PM3/28/20
to Processing.js
I am a full blown beginner and i was making a drawing with js processing at khan academy website and wanted to tilt this rectangle at a certain degrees can somebody tell me how to do that??

also i want the rectangle to stop and not kep rotating.

thaank You

and by the way i am 12 years old

Annotation 2020-03-28 134032.png

Lee Brunjes

unread,
Mar 28, 2020, 7:44:17 PM3/28/20
to proces...@googlegroups.com
Howdy,
Welcome to this whole programming thing. It gets easier:)

The code you are looking for uses the rotate function which can be found here: http://processingjs.org/reference/rotate_/

The reference code does what you are looking for. 

You do need to know about about radians for it to make sense so you can check out the part here about that. https://en.wikipedia.org/wiki/Radian

If you have more questions let us know,
-Lee


--
You received this message because you are subscribed to the Google Groups "Processing.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to processingjs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/processingjs/856bd0a9-927c-43d5-a88a-c906878664ed%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages