The scale() function scales the current coordinate system by the specified factor.
The push() and pop() functions save and restore the coordinate system, respectively.
In this example, a square size 200 is drawn at the origin, with three different scaling factors.
Green and blue geometric shapes on a black background.
Translate
Move the coordinate system origin.
Line segments rotated around center of canvas.
Rotate
Rotate the coordinate system.
Solid rectangles stacked on top of one another.
Scale
Modify the coordinate system scale.
旧バージョンのp5.js日本語サイトをお探しですか?こちらです!