p5.js | Typography | shearX() Function
The shearX() function in p5.js is used to shear a shape or object around the x-axis. The object is sheared by the amount specified by the angle parameter. For proper functioning of angles should be specified in the current angleMode. The objects are always sheared around their relative position to the origin and in a clockwise direction.
Parameters: This function accepts single parameter angle which stores the value of angle.
Below programs illustrate the shearX() function in p5.js:
Example 1: This example uses shearX() function to shear the object on x-axis.
Example 2: This example uses shearX() function to shear the object on x-axis.