Drag the background!
World: rotate

Owner: P5 Editor porting project  
API: P5 (r2)
World type: No Mind

Rotating a square around the Z axis. * To get the results you expect, send the rotate function angle * parameters that are values between 0 and PI*2 (TWO_PI which is * roughly 6.28). If you prefer to think about angles as degrees * (0-360), you can use the radians() method to convert your values. * For example: rotate(radians(90)) is identical to the statement * rotate(PI/2). In this example, every even numbered second a jitter * is added to the rotation. During odd seconds, rotation moves CW and * CCW at the speed determined by the last jitter value.

Created: 16 Jun 2021
Modified: 17 Sep 2023

Type: Public. Plain JS.
View plain JS.

Get Embed code.
Get New window embed code.
Get Autorun embed code.

5 runs

Tweet this World:  

Run
Edit Must be logged in.
Update image Must be logged in.
Clone Must be logged in.
New Mind Only valid for Worlds that use Minds.
Change World type Must be owner.
Change API Must be owner.
Delete Must be owner.
The background is a program, showing the JavaScript graphics used on this site.
The globes light up when you log in.
 
Font:

Users retain ownership of user content.

Platforms      Stats      The name      Terms and conditions

Call for partners      Contact

Call for partners!
Ancient Brain is looking for a partner to co-write a JavaScript coding book for schools, to be used worldwide. This would be a course for students in learning to code from scratch. The book and course will be integrated into the Ancient Brain site. This is an opportunity for someone looking to develop a course and textbook to partner with a site to promote it. Read more.