CSS Waves div class waveWrapper waveAnimation div class waveWrapperInner bgTop div class wave waveTop style background image url http front end noobs com jecko img wave top png div div div class waveWrapperInner bgMiddle div class wave waveMiddle style background image url http front end noobs com jecko img wave mid png div div div class waveWrapperInner bgBottom div class wave waveBottom style background image url http front end noobs com jecko img wave bot png div div div style body min height 600px keyframes move_wave 0 transform translateX 0 translateZ 0 scaleY 1 50 transform translateX 25 translateZ 0 scaleY 0 55 100 transform translateX 50 translateZ 0 scaleY 1 waveWrapper overflow hidden position absolute left 0 right 0 bottom 0 top 0 margin auto waveWrapperInner position absolute width 100 overflow hidden height 100 bottom 1px background image linear gradient to top 86377b 20 27273c 80 bgTop z index 15 opacity 0 5 bgMiddle z index 10 opacity 0 75 bgBottom z index 5 wave position absolute left 0 width 200 height 100 background repeat repeat no repeat background position 0 bottom transform origin center bottom waveTop background size 50 100px waveAnimation waveTop animation move wave 3s webkit animation move wave 3s webkit animation delay 1s animation delay 1s waveMiddle background size 50 120px waveAnimation waveMiddle animation move_wave 10s linear infinite waveBottom background size 50 100px waveAnimation waveBottom animation move_wave 15s linear infinite style style body min height 600px background color 193c6d filter progid DXImageTransform Microsoft gradient gradientType 1 startColorstr 003073 endColorstr 029797 background image url var images back01 1900 790 jpg background size 100 background image webkit gradient linear 0 0 100 100 color stop 0 003073 color stop 100 029797 background image webkit linear gradient 135deg 003073 029797 background image moz linear gradient 45deg 003073 029797 background image ms linear gradient 45deg 003073 0 029797 100 background image o linear gradient 45deg 003073 029797 background image linear gradient 135deg 003073 029797 text align center margin 0px overflow hidden style script src https cdnjs cloudflare com ajax libs three js 56 three js script script function var SEPARATION 100 AMOUNTX 100 AMOUNTY 70 var container var camera scene renderer var particles particle count 0 var mouseX 85 mouseY 342 var windowHalfX window innerWidth 2 var windowHalfY window innerHeight 2 init animate function init container document createElement div document body appendChild container camera new THREE PerspectiveCamera 120 window innerWidth window innerHeight 1 10000 camera position z 1000 scene new THREE Scene particles new Array var PI2 Math PI 2 var material new THREE ParticleCanvasMaterial color 0xe1e1e1 program function context context beginPath context arc 0 0 6 0 PI2 true context fill var i 0 for var ix 0 ix AMOUNTX ix for var iy 0 iy AMOUNTY iy particle particles i new THREE Particle material particle position x ix SEPARATION AMOUNTX SEPARATION 2 particle position z iy SEPARATION AMOUNTY SEPARATION 2 scene add particle renderer new THREE CanvasRenderer renderer setSize window innerWidth window innerHeight container appendChild renderer domElement document addEventListener mousemove onDocumentMouseMove false document addEventListener touchstart onDocumentTouchStart false document addEventListener touchmove onDocumentTouchMove false window addEventListener resize onWindowResize false function onWindowResize windowHalfX window innerWidth 2 windowHalfY window innerHeight 2 camera aspect window innerWidth window innerHeight camera updateProjectionMatrix renderer setSize window innerWidth window innerHeight function onDocumentMouseMove event mouseX event clientX windowHalfX mouseY event clientY windowHalfY function onDocumentTouchStart event if event touches length 1 event preventDefault mouseX event touches 0 pageX windowHalfX mouseY event touches 0 pageY windowHalfY function onDocumentTouchMove event if event touches length 1 event preventDefault mouseX event touches 0 pageX windowHalfX mouseY event touches 0 pageY windowHalfY function animate requestAnimationFrame animate render function render camera position x mouseX camera position x 05 camera position y mouseY camera position y 05 camera lookAt scene position var i 0 for var ix 0 ix AMOUNTX ix for var iy 0 iy AMOUNTY iy particle particles i particle position y Math sin ix count 0 3 50 Math sin iy count 0 5 50 particle scale x particle scale y Math sin ix count 0 3 1 2 Math sin iy count 0 5 1 2 renderer render scene camera count 0 1 script style html min height 600px html body width 100 height 100 padding 0px margin 0px overflow hidden background 191d1e Old browsers background moz linear gradient 0deg 191d1e 50 283139 100 FF3 6 background webkit gradient linear left top right bottom color stop 50 191d1e color stop 100 283139 Chrome Safari4 background webkit linear gradient 0deg 191d1e 50 283139 100 Chrome10 Safari5 1 background o linear gradient 0deg 191d1e 50 283139 100 Opera 11 10 background ms linear gradient 0deg 191d1e 50 283139 100 IE10 background linear gradient 0deg 191d1e 50 283139 100 W3C filter progid DXImageTransform Microsoft gradient startColorstr 191d1e endColorstr 283139 GradientType 1 IE6 9 fallback on horizontal gradient background attachment fixed projector position absolute top 0px left 0px width 100 height 100 center div width 580px height 374px position absolute left 50 top 50 margin left 290px margin top 187px preloaderDiv position absolute left 50 top 50 margin left 27px margin top 27px logo opacity 0 filter alpha opacity 0 date2014 position absolute padding left 210px padding top 15px opacity 0 top 303px left 0 filter alpha opacity 0 style canvas id projector Your browser does not support the Canvas element canvas script src https code createjs com 1 0 0 createjs min js script script src https cdnjs cloudflare com ajax libs gsap 3 9 1 gsap min js script script PARTICLE ENGINE var ParticleEngine function use strict function ParticleEngine canvas_id enforces new if this instanceof ParticleEngine return new ParticleEngine args var _ParticleEngine this this canvas_id canvas_id this stage new createjs Stage canvas_id this totalWidth this canvasWidth document getElementById canvas_id width document getElementById canvas_id offsetWidth this totalHeight this canvasHeight document getElementById canvas_id height document getElementById canvas_id offsetHeight this compositeStyle lighter this particleSettings id small num 300 fromX 0 toX this totalWidth ballwidth 3 alphamax 0 4 areaHeight 5 color 0cdbf3 fill false id medium num 100 fromX 0 toX this totalWidth ballwidth 8 alphamax 0 3 areaHeight 1 color 6fd2f3 fill true id large num 10 fromX 0 toX this totalWidth ballwidth 30 alphamax 0 2 areaHeight 1 color 93e9f3 fill true this particleArray this lights ellipseWidth 400 ellipseHeight 100 alpha 0 6 offsetX 0 offsetY 0 color 6ac6e8 ellipseWidth 350 ellipseHeight 250 alpha 0 3 offsetX 50 offsetY 0 color 54d5e8 ellipseWidth 100 ellipseHeight 80 alpha 0 2 offsetX 80 offsetY 50 color 2ae8d8 this stage compositeOperation _ParticleEngine compositeStyle function drawBgLight var light var bounds var blurFilter for var i 0 len _ParticleEngine lights length i len i light new createjs Shape light graphics beginFill _ParticleEngine lights i color drawEllipse 0 0 _ParticleEngine lights i ellipseWidth _ParticleEngine lights i ellipseHeight light regX _ParticleEngine lights i ellipseWidth 2 light regY _ParticleEngine lights i ellipseHeight 2 light y light initY _ParticleEngine totalHeight 2 _ParticleEngine lights i offsetY light x light initX _ParticleEngine totalWidth 2 _ParticleEngine lights i offsetX blurFilter new createjs BlurFilter _ParticleEngine lights i ellipseWidth _ParticleEngine lights i ellipseHeight 1 bounds blurFilter getBounds light filters blurFilter light cache bounds x _ParticleEngine lights i ellipseWidth 2 bounds y _ParticleEngine lights i ellipseHeight 2 bounds width 2 bounds height 2 light alpha _ParticleEngine lights i alpha light compositeOperation screen _ParticleEngine stage addChildAt light 0 _ParticleEngine lights i elem light TweenMax fromTo _ParticleEngine lights 0 elem 10 scaleX 1 5 x _ParticleEngine lights 0 elem initX y _ParticleEngine lights 0 elem initY yoyo true repeat 1 ease Power1 easeInOut scaleX 2 scaleY 0 7 TweenMax fromTo _ParticleEngine lights 1 elem 12 x _ParticleEngine lights 1 elem initX y _ParticleEngine lights 1 elem initY delay 5 yoyo true repeat 1 ease Power1 easeInOut scaleY 2 scaleX 2 y _ParticleEngine totalHeight 2 50 x _ParticleEngine totalWidth 2 100 TweenMax fromTo _ParticleEngine lights 2 elem 8 x _ParticleEngine lights 2 elem initX y _ParticleEngine lights 2 elem initY delay 2 yoyo true repeat 1 ease Power1 easeInOut scaleY 1 5 scaleX 1 5 y _ParticleEngine totalHeight 2 x _ParticleEngine totalWidth 2 200 var blurFilter function drawParticles for var i 0 len _ParticleEngine particleSettings length i len i var ball _ParticleEngine particleSettings i var circle for var s 0 s ball num s circle new createjs Shape if ball fill circle graphics beginFill ball color drawCircle 0 0 ball ballwidth blurFilter new createjs BlurFilter ball ballwidth 2 ball ballwidth 2 1 circle filters blurFilter var bounds blurFilter getBounds circle cache 50 bounds x 50 bounds y 100 bounds width 100 bounds height else circle graphics beginStroke ball color setStrokeStyle 1 drawCircle 0 0 ball ballwidth circle alpha range 0 0 1 circle alphaMax ball alphamax circle distance ball ballwidth 2 circle ballwidth ball ballwidth circle flag ball id _ParticleEngine applySettings circle ball fromX ball toX ball areaHeight circle speed range 2 10 circle y circle initY circle x circle initX circle scaleX circle scaleY range 0 3 1 _ParticleEngine stage addChild circle animateBall circle _ParticleEngine particleArray push circle this applySettings function circle positionX totalWidth areaHeight circle speed range 1 3 circle initY weightedRange 0 _ParticleEngine totalHeight 1 _ParticleEngine totalHeight 2 areaHeight 2 4 _ParticleEngine totalHeight 2 areaHeight 2 4 0 8 circle initX weightedRange positionX totalWidth 1 positionX totalWidth positionX 4 positionX totalWidth positionX 3 4 0 6 function animateBall ball var scale range 0 3 1 var xpos range ball initX ball distance ball initX ball distance var ypos range ball initY ball distance ball initY ball distance var speed ball speed TweenMax to ball speed scaleX scale scaleY scale x xpos y ypos onComplete animateBall onCompleteParams ball ease Cubic easeInOut TweenMax to ball speed 2 alpha range 0 1 ball alphaMax onComplete fadeout onCompleteParams ball speed function fadeout ball speed ball speed range 2 10 TweenMax to ball speed 2 alpha 0 drawBgLight drawParticles ParticleEngine prototype render function this stage update ParticleEngine prototype resize function this totalWidth this canvasWidth document getElementById this canvas_id width document getElementById this canvas_id offsetWidth this totalHeight this canvasHeight document getElementById this canvas_id height document getElementById this canvas_id offsetHeight this render for var i 0 length this particleArray length i length i this applySettings this particleArray i 0 this totalWidth this particleArray i areaHeight for var j 0 len this lights length j len j this lights j elem initY this totalHeight 2 this lights j offsetY this lights j elem initX this totalWidth 2 this lights j offsetX TweenMax to this lights j elem 5 x this lights j elem initX y this lights j elem initY return ParticleEngine UTILS function range min max return min max min Math random function round num precision var decimal Math pow 10 precision return Math round decimal num decimal function weightedRange to from decimalPlaces weightedRange weightStrength if typeof from undefined from null from 0 if typeof decimalPlaces undefined decimalPlaces null decimalPlaces 0 if typeof weightedRange undefined weightedRange null weightedRange 0 if typeof weightStrength undefined weightStrength null weightStrength 0 var ret if to from return to if weightedRange Math random weightStrength ret round Math random weightedRange 1 weightedRange 0 weightedRange 0 decimalPlaces else ret round Math random to from from decimalPlaces return ret RUN CODE var particles function particles new ParticleEngine projector createjs Ticker addEventListener tick updateCanvas window addEventListener resize resizeCanvas false function updateCanvas particles render function resizeCanvas particles resize script style body min height 600px canvas display block width 100vw height 100vh style canvas id c canvas script src https cdnjs cloudflare com ajax libs animejs 3 2 1 anime min js script script var c document getElementById c var ctx c getContext 2d var cH var cW var bgColor FF6138 var animations var circles var colorPicker function var colors FF6138 FFBE53 2980B9 282741 var index 0 function next index index colors length 1 index 0 return colors index function current return colors index return next next current current function removeAnimation animation var index animations indexOf animation if index 1 animations splice index 1 function calcPageFillRadius x y var l Math max x 0 cW x var h Math max y 0 cH y return Math sqrt Math pow l 2 Math pow h 2 function addClickListeners document addEventListener touchstart handleEvent document addEventListener mousedown handleEvent function handleEvent e if e touches e preventDefault e e touches 0 var currentColor colorPicker current var nextColor colorPicker next var targetR calcPageFillRadius e pageX e pageY var rippleSize Math min 200 cW 4 var minCoverDuration 750 var pageFill new Circle x e pageX y e pageY r 0 fill nextColor var fillAnimation anime targets pageFill r targetR duration Math max targetR 2 minCoverDuration easing easeOutQuart complete function bgColor pageFill fill removeAnimation fillAnimation var ripple new Circle x e pageX y e pageY r 0 fill currentColor stroke width 3 color currentColor opacity 1 var rippleAnimation anime targets ripple r rippleSize opacity 0 easing easeOutExpo duration 900 complete removeAnimation var particles for var i 0 i 32 i var particle new Circle x e pageX y e pageY fill currentColor r anime random 24 48 particles push particle var particlesAnimation anime targets particles x function particle return particle x anime random rippleSize rippleSize y function particle return particle y anime random rippleSize 1 15 rippleSize 1 15 r 0 easing easeOutExpo duration anime random 1000 1300 complete removeAnimation animations push fillAnimation rippleAnimation particlesAnimation function extend a b for var key in b if b hasOwnProperty key a key b key return a var Circle function opts extend this opts Circle prototype draw function ctx globalAlpha this opacity 1 ctx beginPath ctx arc this x this y this r 0 2 Math PI false if this stroke ctx strokeStyle this stroke color ctx lineWidth this stroke width ctx stroke if this fill ctx fillStyle this fill ctx fill ctx closePath ctx globalAlpha 1 var animate anime duration Infinity update function ctx fillStyle bgColor ctx fillRect 0 0 cW cH animations forEach function anim anim animatables forEach function animatable animatable target draw var resizeCanvas function cW window innerWidth cH window innerHeight c width cW devicePixelRatio c height cH devicePixelRatio ctx scale devicePixelRatio devicePixelRatio function init resizeCanvas if window CP CodePen s loop detection was causin problems and I have no idea why so window CP PenTimer MAX_TIME_IN_LOOP_WO_EXIT 6000 window addEventListener resize resizeCanvas addClickListeners if window location pathname match fullcpgrid startFauxClicking handleInactiveUser function handleInactiveUser var inactive setTimeout function fauxClick cW 2 cH 2 2000 function clearInactiveTimeout clearTimeout inactive document removeEventListener mousedown clearInactiveTimeout document removeEventListener touchstart clearInactiveTimeout document addEventListener mousedown clearInactiveTimeout document addEventListener touchstart clearInactiveTimeout function startFauxClicking setTimeout function fauxClick anime random cW 2 cW 8 anime random cH 2 cH 8 startFauxClicking anime random 200 900 function fauxClick x y var fauxClick new Event mousedown fauxClick pageX x fauxClick pageY y document dispatchEvent fauxClick console log click script
s i elem light TweenMax fromTo _ParticleEngine lights 0 elem 10 scaleX 1 5 x _ParticleEngine lights 0 elem initX y _ParticleEngine lights 0 elem initY yoyo true repeat 1 ease Power1 easeInOut scaleX 2 scaleY 0 7 TweenMax fromTo _ParticleEngine lights 1 elem 12 x _ParticleEngine lights 1 elem initX y _ParticleEngine lights 1 elem initY delay 5 yoyo true repeat 1 ease Power1 easeInOut scaleY 2 scaleX 2 y _ParticleEngine totalHeight 2 50 x _ParticleEngine totalWidth 2 100 TweenMax fromTo _ParticleEngine lights 2 elem 8 x _ParticleEngine lights 2 elem initX y _ParticleEngine lights 2 elem initY delay 2 yoyo true repeat 1 ease Power1 easeInOut scaleY 1 5 scaleX 1 5 y _ParticleEngine totalHeight 2 x _ParticleEngine totalWidth 2 200 var blurFilter function drawParticles for var i 0 len _ParticleEngine particleSettings length i len i var ball _ParticleEngine particleSettings i var circle for var s 0 s ball num s circle new createjs Shape if ball fill circle graphics beginFill ball color drawCircle 0 0 ball ballwidth blurFilter new createjs BlurFilter ball ballwidth 2 ball ballwidth 2 1 circle filters blurFilter var bounds blurFilter getBounds circle cache 50 bounds x 50 bounds y 100 bounds width 100 bounds height else circle graphics beginStroke ball color setStrokeStyle 1 drawCircle 0 0 ball ballwidth circle alpha range 0 0 1 circle alphaMax ball alphamax circle distance ball ballwidth 2 circle ballwidth ball ballwidth circle flag ball id _ParticleEngine applySettings circle ball fromX ball toX ball areaHeight circle speed range 2 10 circle y circle initY circle x circle initX circle scaleX circle scaleY range 0 3 1 _ParticleEngine stage addChild circle animateBall circle _ParticleEngine particleArray push circle this applySettings function circle positionX totalWidth areaHeight circle speed range 1 3 circle initY weightedRange 0 _ParticleEngine totalHeight 1 _ParticleEngine totalHeight 2 areaHeight 2 4 _ParticleEngine totalHeight 2 areaHeight 2 4 0 8 circle initX weightedRange positionX totalWidth 1 positionX totalWidth positionX 4 positionX totalWidth positionX 3 4 0 6 function animateBall ball var scale range 0 3 1 var xpos range ball initX ball distance ball initX ball distance var ypos range ball initY ball distance ball initY ball distance var speed ball speed TweenMax to ball speed scaleX scale scaleY scale x xpos y ypos onComplete animateBall onCompleteParams ball ease Cubic easeInOut TweenMax to ball speed 2 alpha range 0 1 ball alphaMax onComplete fadeout onCompleteParams ball speed function fadeout ball speed ball speed range 2 10 TweenMax to ball speed 2 alpha 0 drawBgLight drawParticles ParticleEngine prototype render function this stage update ParticleEngine prototype resize function this totalWidth this canvasWidth document getElementById this canvas_id width document getElementById this canvas_id offsetWidth this totalHeight this canvasHeight document getElementById this canvas_id height document getElementById this canvas_id offsetHeight this render for var i 0 length this particleArray length i length i this applySettings this particleArray i 0 this totalWidth this particleArray i areaHeight for var j 0 len this lights length j len j this lights j elem initY this totalHeight 2 this lights j offsetY this lights j elem initX this totalWidth 2 this lights j offsetX TweenMax to this lights j elem 5 x this lights j elem initX y this lights j elem initY return ParticleEngine UTILS function range min max return min max min Math random function round num precision var decimal Math pow 10 precision return Math round decimal num decimal function weightedRange to from decimalPlaces weightedRange weightStrength if typeof from undefined from null from 0 if typeof decimalPlaces undefined decimalPlaces null decimalPlaces 0 if typeof weightedRange undefined weightedRange null weightedRange 0 if typeof weightStrength undefined weightStrength null weightStrength 0 var ret if to from return to if weightedRange Math random weightStrength ret round Math random weightedRange 1 weightedRange 0 weightedRange 0 decimalPlaces else ret round Math random to from from decimalPlaces return ret RUN CODE var particles function particles new ParticleEngine projector createjs Ticker addEventListener tick updateCanvas window addEventListener resize resizeCanvas false function updateCanvas particles render function resizeCanvas particles resize script style body min height 600px canvas display block width 100vw height 100vh style canvas id c canvas script src https cdnjs cloudflare com ajax libs animejs 3 2 1 anime min js script script var c document getElementById c var ctx c getContext 2d var cH var cW var bgColor FF6138 var animations var circles var colorPicker function var colors FF6138 FFBE53 2980B9 282741 var index 0 function next index index colors length 1 index 0 return colors index function current return colors index return next next current current function removeAnimation animation var index animations indexOf animation if index 1 animations splice index 1 function calcPageFillRadius x y var l Math max x 0 cW x var h Math max y 0 cH y return Math sqrt Math pow l 2 Math pow h 2 function addClickListeners document addEventListener touchstart handleEvent document addEventListener mousedown handleEvent function handleEvent e if e touches e preventDefault e e touches 0 var currentColor colorPicker current var nextColor colorPicker next var targetR calcPageFillRadius e pageX e pageY var rippleSize Math min 200 cW 4 var minCoverDuration 750 var pageFill new Circle x e pageX y e pageY r 0 fill nextColor var fillAnimation anime targets pageFill r targetR duration Math max targetR 2 minCoverDuration easing easeOutQuart complete function bgColor pageFill fill removeAnimation fillAnimation var ripple new Circle x e pageX y e pageY r 0 fill currentColor stroke width 3 color currentColor opacity 1 var rippleAnimation anime targets ripple r rippleSize opacity 0 easing easeOutExpo duration 900 complete removeAnimation var particles for var i 0 i 32 i var particle new Circle x e pageX y e pageY fill currentColor r anime random 24 48 particles push particle var particlesAnimation anime targets particles x function particle return particle x anime random rippleSize rippleSize y function particle return particle y anime random rippleSize 1 15 rippleSize 1 15 r 0 easing easeOutExpo duration anime random 1000 1300 complete removeAnimation animations push fillAnimation rippleAnimation particlesAnimation function extend a b for var key in b if b hasOwnProperty key a key b key return a var Circle function opts extend this opts Circle prototype draw function ctx globalAlpha this opacity 1 ctx beginPath ctx arc this x this y this r 0 2 Math PI false if this stroke ctx strokeStyle this stroke color ctx lineWidth this stroke width ctx stroke if this fill ctx fillStyle this fill ctx fill ctx closePath ctx globalAlpha 1 var animate anime duration Infinity update function ctx fillStyle bgColor ctx fillRect 0 0 cW cH animations forEach function anim anim animatables forEach function animatable animatable target draw var resizeCanvas function cW window innerWidth cH window innerHeight c width cW devicePixelRatio c height cH devicePixelRatio ctx scale devicePixelRatio devicePixelRatio function init resizeCanvas if window CP CodePen s loop detection was causin problems and I have no idea why so window CP PenTimer MAX_TIME_IN_LOOP_WO_EXIT 6000 window addEventListener resize resizeCanvas addClickListeners if window location pathname match fullcpgrid startFauxClicking handleInactiveUser function handleInactiveUser var inactive setTimeout function fauxClick cW 2 cH 2 2000 function clearInactiveTimeout clearTimeout inactive document removeEventListener mousedown clearInactiveTimeout document removeEventListener touchstart clearInactiveTimeout document addEventListener mousedown clearInactiveTimeout document addEventListener touchstart clearInactiveTimeout function startFauxClicking setTimeout function fauxClick anime random cW 2 cW 8 anime random cH 2 cH 8 startFauxClicking anime random 200 900 function fauxClick x y var fauxClick new Event mousedown fauxClick pageX x fauxClick pageY y document dispatchEvent fauxClick console log click script