Led Matrix Effect

Pict2Pix.js library
Led Matrix Effect

Setting up Led Matrix 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: 'led-matrix',
          type: 'random',
          transitionTime: 2000,
          idleTime: 3000,
          ledSize: 4
      });
    }
  • Options
    • image: Required. The html element to apply the effect
    • particleType: Required. The effect to apply to the image. In this case is 'led-matrix'
    • type: Optional. Transition effect type. Default value is random.
      • random
      • point
      • horizontal
      • vertical
    • ledSize: Optional. Led size. Must be greater than 4. Default value 4.
    • transitionTime: Optional. Trasitions time in ms. Default value 2000.
    • idleTime: Optional. Idle time in ms. Default value 5000.