Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">

<div class="web"><a href="https://www.micelistudios.com" target="_blank"> VISIT MICELI STUDIOS</a></div>

<div class="geo eye-wrapper">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1024 640" style="enable-background:new 0 0 1024 640;" xml:space="preserve">


<g id="bkg-eye_shape">
	<path class="color-eye-purple-1" d="M289.53,561.67L1.34,357.06L286.59,85.52C433.6-49.89,608.15-51.45,755.92,81.33l263.71,236.75L745.46,563.47
		C601.57,689.01,433.1,688.35,289.53,561.67z"/>
	<path class="color-eye-purple-2" d="M334.05,529.27L103.94,352.09l227.77-235.13C449.09-0.29,588.47-1.64,706.46,113.33l210.57,205.01
		L698.11,530.82C583.22,639.53,448.69,638.96,334.05,529.27z"/>
</g>
<g id="eye">
	<path id="outer-dark" class="color-eye-purple-3" d="M350.46,487.9L141.75,345.75l206.59-188.66c106.47-94.08,232.89-95.16,339.9-2.91
		l190.99,164.49L680.66,489.15C576.45,576.38,454.44,575.91,350.46,487.9z"/>
	<path id="eye-white" class="color-eye-white" d="M339.98,447.12c-108.84-83.91-157.6-103.14-157.6-103.14s40.92-89.86,157.6-158.67
		s253.5-60.86,356.14,9.07l183.1,124.13L688.86,448.27C588.9,514.38,453.55,534.68,339.98,447.12z"/>
	<g id="eye-ball">
		<g>
			<radialGradient id="color_gradient_eye" cx="511.7025" cy="320" r="129.03" gradientUnits="userSpaceOnUse">
				<stop  offset="0" style="stop-color:#FFFFFF"/>
				<stop  offset="0.8443" style="stop-color:#5DB7DE"/>
			</radialGradient>
			<circle class="eye-gradient" cx="511.7" cy="320" r="152.73"/>
		</g>
		<circle class="pupil color-eye-purple-3" cx="511.7" cy="320" r="51.05"/>
		<g>
			<path class="color-light-blue" d="M511.7,210.14c29.35,0,56.93,11.43,77.69,32.18c20.75,20.75,32.18,48.34,32.18,77.69
				s-11.43,56.93-32.18,77.69c-20.75,20.75-48.34,32.18-77.69,32.18s-56.93-11.43-77.69-32.18c-20.75-20.75-32.18-48.34-32.18-77.69
				s11.43-56.93,32.18-77.69C454.77,221.56,482.36,210.14,511.7,210.14 M511.7,167.27c-84.35,0-152.73,68.38-152.73,152.73
				s68.38,152.73,152.73,152.73S664.43,404.35,664.43,320S596.05,167.27,511.7,167.27L511.7,167.27z"/>
		</g>
    
    	<g id="white-reflections">
		<circle id="large-circle" class="color-mask-white" cx="601.65" cy="233.92" r="65.63"/>
		<circle id="small-circle" class="color-mask-white" cx="469.71" cy="370.34" r="20.34"/>
		<circle id="stroke-anchor-point" class="eye-die-line" cx="511.7" cy="320" r="205.13"/>
	</g>
    
	</g>

	<g id="eye-lid">
		<path id="lid-bottom" class="color-eye-lid-purple" d="M690.78,420.16c-91.71,47.19-244.16,61.31-352.95-0.45s-153.78-75.44-155.44-75.73
			c0.66,0.25,49.49,21.38,157.6,107.86c113.57,90.85,248.92,69.8,348.88,1.2c0,0,186.18-131.62,189.44-133.93
			C876.69,319.96,782.48,372.98,690.78,420.16z"/>
		<path id="lid-bottom-closed" class="color-eye-lid-purple" d="M689.73,397.26c-96.06,37.54-230.18,45.79-346.6,0
			c-74.51-29.3-159.08-52.99-160.74-53.28c0.66,0.25,49.49,21.38,157.6,107.86c113.57,90.85,248.92,69.8,348.88,1.2
			c0,0,186.18-131.62,189.44-133.93C876.69,319.96,783,360.81,689.73,397.26z"/>
    <path id="lid-bottom-closed-mid" class="color-eye-lid-purple" d="M678.82,413.83c-94.07,42.29-184.48,61.99-308.74,5.03
			c-80.54-36.91-186.04-74.59-187.7-74.88c0.66,0.25,49.49,21.38,157.6,107.86c113.57,90.85,248.92,69.8,348.88,1.2
			c0,0,186.18-131.62,189.44-133.93C876.69,319.96,770.27,372.72,678.82,413.83z"/>
    <path id="lid-top-closed-mid" class="color-eye-lid-purple" d="M386.02,246.04c90.97-20.33,163.6-26.85,272.67,2.52
			c86.86,23.39,152.69,54.53,219.63,69.28c-25.74-17.55-182.19-128.25-182.19-128.25c-102.65-72.55-239.46-80.81-356.14-9.41
			c-110.24,67.46-153.09,153.94-157.46,163.49C207.25,325.47,291.14,267.25,386.02,246.04z"/>
		<path id="lid-top-closed-sm" class="color-eye-lid-purple" d="M397.77,225.06c90.97-20.33,148.5-25.17,257.56,4.19
			c86.86,23.39,156.89,64.6,223.99,88.58c-25.74-17.55-182.19-128.25-182.19-128.25c-102.65-72.55-239.46-80.81-356.14-9.41
			c-110.24,67.46-153.09,153.94-157.46,163.49C210.68,319.03,302.88,246.27,397.77,225.06z"/>
		<path id="lid-top" class="color-eye-lid-purple" d="M349.94,214.95c85.23-37.76,228.16-47.64,338.67,5.95c83.74,40.6,147.59,75.7,189.71,96.94
			c-3.1-2.48-182.19-128.25-182.19-128.25c-102.65-72.55-239.46-80.81-356.14-9.41c-110.24,67.46-153.09,153.94-157.46,163.49
			C199.06,321.04,258.05,255.66,349.94,214.95z"/>
		<path id="lid-top-closed" class="color-eye-lid-purple" d="M366.57,280.05c90.97-20.33,182.62-22.3,303.07,1.67
			c88.22,17.56,130.51,26.41,208.68,36.11c-25.74-17.55-182.19-128.25-182.19-128.25c-102.65-72.55-239.46-80.81-356.14-9.41
			c-110.24,67.46-153.09,153.94-157.46,163.49C207.25,325.47,271.68,301.26,366.57,280.05z"/>
	</g>
  
  <g id="outer-dark-ring">
	  	<path class="color-eye-purple-3" d="M877.34,319.79C852.67,336.14,691,448.68,691,448.68c-99.96,68.6-235.41,89.22-349.36,1.83
		c-108.11-86.49-158.61-106.28-159.27-106.53l0.77-0.32c6.6-10.91,59.95-98.72,159.3-162.01c115.37-73.5,252.03-62.15,354.68,10.4
		c0,0,175.29,121.65,181.4,125.86L691.96,151.68c-107.01-94.2-240.69-93.83-347.16,2.23L141.75,346.3l206.16,146.73
		c103.98,89.87,228.54,88.78,332.75-0.29l198.56-174.09L877.34,319.79z"/>
</g>
</g>
</svg>
</div>

              
            
!

CSS

              
                body{background-color:#2A2E3C;}
*{box-sizing:border-box; margin:0; padding:0;}

.web{position:fixed; right:40px; bottom:40px;}
.web a{color:#EDE0C8; font-family: 'Poppins', sans-serif; text-decoration:none; font-size:12px; letter-spacing:.5px;}
.web a:hover{color:#72C4E9;}
.eye-wrapper{display:flex; align-content:center; justify-content:center; width:100%; height:100%;}
.eye-wrapper svg{width:100%; max-height:100vh;}
.geo{background:url("https://www.micelistudios.com/imgs/geo-slow.gif") repeat;}

.color-dark-purple-bkg{fill:#2A2E3C;}
.color-mask-white{fill:#ffffff;}
.color-light-blue{fill:#72C4E9;}
.color-eye-lid-purple{fill:#272537;}
.color-eye-white{fill:#EDE0C8;}
			
.color-eye-purple-1{fill:#232530; opacity:0.75;}
.color-eye-purple-2{fill:#1F232B;}
.color-eye-purple-3{fill:#1b1d23;}
	
.eye-die-line{visibility:hidden; fill:none;stroke:#16191E;stroke-miterlimit:10;}
		
#lid-top-closed, #lid-top-closed-mid, #lid-top-closed-sm, #lid-bottom-closed, #lid-bottom-closed-mid{visibility:hidden;}

.eye-gradient{fill:url(#color_gradient_eye);}

              
            
!

JS

              
                
gsap.set('#white-reflections, .pupil', {transformOrigin: "center center"});

/* Eye Lid Bottom */
function eyeBottom1() {
  let eyeBottomTl1 = gsap.timeline();
    eyeBottomTl1.to('#lid-bottom', {duration:1, morphSVG: '#lid-bottom-closed', ease: "sine.inOut"})
               .to('#lid-bottom', {duration:1, delay:.8, morphSVG: '#lid-bottom', ease: "sine.inOut"});
  
return eyeBottomTl1;
}

/* Eye Lid Bottom Mid range */
function eyeBottomMid() {
  let eyeBottomMidTl = gsap.timeline();
    eyeBottomMidTl.to('#lid-bottom', {duration:1, morphSVG: '#lid-bottom-closed-mid', ease: "sine.inOut"})
               .to('#lid-bottom', {duration:1, delay:.8, morphSVG: '#lid-bottom', ease: "sine.inOut"});
  
return eyeBottomMidTl;
}

/* Eye Lid Top */
function eyeTop1() {
  let eyeTopTl1 = gsap.timeline();
   eyeTopTl1.to('#lid-top', {duration:1, morphSVG: '#lid-top-closed', ease: "sine.inOut"})
            .to('#lid-top', {duration:1, delay:.8, morphSVG: '#lid-top', ease: "sine.inOut"});

  return eyeTopTl1;
}

/* Eye Lid Top Small Move*/
function eyeTopSm() {
  let eyeTopSmTl = gsap.timeline();
   eyeTopSmTl.to('#lid-top', {duration:1, morphSVG: '#lid-top-closed-sm', ease: "sine.inOut"})
            .to('#lid-top', {duration:1, delay:.8, morphSVG: '#lid-top', ease: "sine.inOut"});

  return eyeTopSmTl;
}

/* Eye Lid Top Medium Move */
function eyeTopMid() {
  let eyeTopMidTl = gsap.timeline();
   eyeTopMidTl.to('#lid-top', {duration:1, morphSVG: '#lid-top-closed-mid', ease: "sine.inOut"})
            .to('#lid-top', {duration:1, delay:.8, morphSVG: '#lid-top', ease: "sine.inOut"});

  return eyeTopMidTl;
}

/* Move Eye Ball Down 20 */
function eyeBallDown20() {
let eyeBallDown20Tl1 = gsap.timeline();
  eyeBallDown20Tl1.to('#eye-ball', {duration:1, y:20, ease: "sine.inOut"})
                      .to('#eye-ball', {duration:1, delay:.8, y:0, ease: "sine.inOut"});
  
  return eyeBallDown20Tl1;
}

/* Move Eye Ball Side to side */
function eyeBallSide() {
let eyeBallSideTl1 = gsap.timeline({repeat:-1, repeatDelay:2});
  eyeBallSideTl1.to('#eye-ball', {duration:1.2, x:60, ease: "expo.inOut"})
                .to('.pupil', {duration:1.2, scale:1.15, ease: "expo.inOut"}, "<")
  
                    .to('#eye-ball', {duration:1.5, delay:.3,x:-40, ease: "expo.inOut"})
                    .to('#eye-ball', {duration:4, delay:.8, x:80, ease: "expo.inOut"})
                    .to('.pupil', {duration:4, scale:.8, ease: "expo.inOut"}, "<")
                    .to('#eye-ball', {duration:3, delay:.5, x:-20, ease: "expo.inOut"})
                 .to('.pupil', {duration:3, scale:1, ease: "expo.inOut"}, "<")
                    .to('#eye-ball', {duration:.75, delay:.2, x:0, ease: "sine.inOut"});
  
  return eyeBallSideTl1;
}

/* Eye Ball reflection */
function eyeBallReflection() {
  let eyeBallReflectionTl1 = gsap.timeline({yoyo:true, repeat:-1, repeatDelay:.4});
      eyeBallReflectionTl1.to('#white-reflections', {duration:8, rotation:-40, ease: "sine.out"});

  return eyeBallReflectionTl1;
}



var masterEyeBall = gsap.timeline();
   masterEyeBall
   .add(eyeBallSide(), "0")
    .add(eyeBallReflection(), "0")


var masterEyeLids = gsap.timeline({delay:1.5, repeat:-1, repeatDelay:4});
   masterEyeLids
   .add(eyeBottom1(), "0")
.add(eyeTop1(), "0")
.add(eyeBallDown20(), "0")
.add(eyeBottomMid(), ">")
.add(eyeTopSm(), "<")
.add(eyeBallDown20(), "<")
.add(eyeBottomMid(), ">")
.add(eyeTopMid(), "<")
.add(eyeBallDown20(), "<")


// then tween the progress of the timeline
//gsap.to(eyeTl1, {progress:0.6})
              
            
!
999px

Console