Skip to content

Tag Archives: JavaScript-p5.js

Phong shading is a specific type of shading technique in 3D computer graphics that is useful for smoothing out multi-surface shapes, approximating surface highlights, and… Read More
In this article, we will see how to create a GeeksforGeeks logo using p5.js. Processing is a flexible software sketchbook and a language for learning… Read More
Animation is a method in which a collection of images is combined in a specific way and processed then they appear as moving images. Building… Read More
p5.Geometry() method is used to represent 3d objects. It is returned by the loadModel() function and also used internally by the 3d primitive drawing functions. … Read More
The p5.js resetShader() method restores the default shaders in WEBGL mode. Code that runs after this method will not be affected by previously defined shaders.… Read More
The turnAxis variable is used to store the axis triggered by the deviceTurned() method. This takes place when a mobile device is rotated in any… Read More
The accelerationY system variable is responsible for the acceleration of the device(tablets or mobile phones) along the y-axis. It can be used with the draw() function… Read More
The accelerationZ system variable is responsible for the acceleration of the device(tablets or mobile phones) along the Z-axis. It can be used in the draw()… Read More
The accelerationX system variable is responsible for the acceleration of the device(tablets or mobile phones) along the x-axis. It can be used with the draw()… Read More
The deviceOrientation variable contains the orientation of the device. The value of this variable in the code will either be set landscape or portrait. It… Read More
The system variable rotationZ in p5.js is responsible for the rotation of mobile devices (smartphones and tablets) always along the z-axis. It can be used… Read More
The system variable rotationY in p5.js is responsible for the rotation of mobile devices (smartphones and tablets) always along the y-axis. It can be used… Read More
The system variable rotationX in p5.js is responsible for the rotation of mobile devices (smartphones and tablets) always along the x-axis. It can be used… Read More
In this article, we will see how to draw 3D geometry (containing length, width, and height) in p5.js. The default rendering in p5.js is used… Read More
The function createShader()  which loads the shaders from strings. it is call  within the function  setup. The easiest way to write shaders as strings in… Read More