Twisted Particles Effect
Twisted Particles Effect
Setting up Twisted Particles Effect
-
Get the image element and call to pict2pix.animate function
const imagejh = document.getElementById('image-jh'); window.onload = function initialize() { pict2pix.animate({ image: imagejh, particleType: 'twisted-particle', numberOfParticles: 800, horizontalSpeed: -1, verticalSpeed: -1 }); }
-
Options
- image: Required. The html element to apply the effect
- particleType: Required. The effect to apply to the image. In this case is 'twisted-particle'
- numberOfParticles: Optional. Number of particles in the image. Be careful about the perfomance if you add a big number of particles. Default value is 3000.
- horizontalSpeed: Optional. Horizontal speed of the particles. Can be positive or negative. Zero for no Horizontal movement. Default value is 1.
- verticalSpeed: Optional. Vertical speed of the particles. Can be positive or negative. Zero for no vertical movement. Default value is 1.