Klouds

Simple JavaScript library that generates animated clouds using WebGL

Code:

Code using jQuery:

Full code example

              <!-- html code -->
              <!doctype html>
              <html>
              <head>
                <title>Klouds Example</title>
                <link href="your-style.css" rel="stylesheet">
              </head>
              <body>
                <div id="myCanvasContainer">
                    <canvas id="myCanvas"></canvas>
                </div>

                <script src="klouds.min.js"></script>
                <script src="your-script.js"></script>
              </body>
              </html>
            
              // your-script.js
              new Klouds({
                selector: '#myCanvas',
                layerCount: 5,
                speed: 1,
                cloudColor1: '#1ab3cc',
                cloudColor2: '#ffffff',
                bgColor: '#06680'
              })
            
              /* your-style.css */
              
#myCanvasContainer {
                width:100%;
                height:240px;
              }