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

              
                <div id="titleBox">
<h1>Wimpy Animation Skills?</h1>
<p>Flex your muscles with TweenMax & MorphSVG from Green<span>Sock</span></p>
<p>This is a 100% steroid free demo. Brought to you by <a href="https://twitter.com/craig_pointc" target="_blank">@Craig_PointC</a></p>
</div>

<div id="controls">
<button id="masterControl">Give Him Muscles</button>
</div>

<svg id="muscleMorph" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500">
  <defs>
  <mask id="lidMask">
   <rect id="eyelidMask" x="179.94" y="83.99" width="141.92" height="31.81" fill="#fff"/>
  </mask>
  </defs>
  
  <title>Muscle Morphing With GSAP and the MorphSVG plugin</title>

  <g id="weak">
    <g id="rtArmMaster">
      <path id="weakRightArm" d="M368.46,213.69c11.18,21,22,43.9,30.23,67.39,8.79,25,11.87,39.08,17.33,74.22,2.59,1.14,9.08.46,11.37-2a404.69,404.69,0,0,0-16-77.4c-7.62-24.25-17-47.9-28.68-69.79Z" fill="#f37a54"/>
      <path id="muscleRightShadow" d="M387.78,181.59c-0.26-30.8-27.09,26-40.77,57.81a84,84,0,0,0,7.24,13.39,45.31,45.31,0,0,0,4,5.25C381.2,233.67,388,212.4,387.78,181.59Z" fill="#3d3838" fill-rule="evenodd"/>
      <path id="weakRightHand" d="M428.89,349.21c13.44,5.46,22.16,29.62,15.7,28.41s-12-11.15-12-11.15c5,9.35,5.26,26.08-.9,22s-9.17-19.29-9.17-19.29c1.8,10.25-.45,24.12-5.71,20.8s-4.41-14.77-4.56-21.7c-6.31,9.62-15.93,12.84-14.12,3.91s11.21-17.87,13.22-19.46C417.94,347.48,424.14,347.28,428.89,349.21Z" fill="#f37a54" fill-rule="evenodd"/>
    </g>
	
	    <g id="ltArmMaster">
      <path id="weakLeftArm" d="M135.53,213.69c-11.18,21-22,43.9-30.23,67.39-8.79,25-11.87,39.08-17.33,74.22-2.59,1.14-9.08.46-11.37-2a404.76,404.76,0,0,1,16-77.4c7.62-24.25,17-47.9,28.68-69.79Z" fill="#f37a54"/>
	  <path id="muscleLeftShadow" d="M141.79,258c-19.16-19.82-30.18-46.93-29.92-76.78,0.24-28,27.44,26.38,41.12,58.16A75.25,75.25,0,0,1,141.79,258Z" fill="#3d3838" fill-rule="evenodd"/>	
      <path id="weakLeftHand" d="M75.11,349.21c-13.44,5.46-22.16,29.62-15.7,28.41s12-11.15,12-11.15c-5,9.35-5.26,26.08.9,22s9.17-19.29,9.17-19.29c-1.8,10.25.45,24.12,5.71,20.8s4.41-14.77,4.56-21.7c6.31,9.62,15.93,12.84,14.12,3.91s-11.21-17.87-13.22-19.46C86.05,347.48,79.86,347.28,75.11,349.21Z" fill="#f37a54" fill-rule="evenodd"/>
    </g>
	
	

   <path id="weakBaseBody" d="M386.53,139.09c5.94,46.2,3.52,96-8.05,139.78-25.93,98.13-237.34,92.06-255.11-3.59-8.14-43.8-13-91.23-8.32-136.14l6.88-39.21C137.65,42.47,189.5,0,250.59,0,312.4,0,363.68,43.52,379.26,100.32Z" fill="#f37a54" fill-rule="evenodd"/> 
	
    <path id="leftEar" d="M116.05,139.14a15.29,15.29,0,0,1-7.07.1c-9.56-2.15-15.24-13.12-12.69-24.5S108.68,95.86,118.25,98a15.17,15.17,0,0,1,4.69,1.92" fill="#f37a54" fill-rule="evenodd"/>
    <path id="rightEar" d="M378.26,100.32A15.16,15.16,0,0,1,383.53,98c9.56-2.15,19.38,5.34,21.94,16.73s-3.12,22.36-12.68,24.5a15.29,15.29,0,0,1-7.26-.15" fill="#f37a54" fill-rule="evenodd"/>
	
	
	<path d="M240,340H217.87c-0.23,35.56-.06,93.24.31,129.55,0.09,9-2.69,9.26-9.84,8.22-42.86-6.23-74.54-1.5-106.18,9-0.93,5.17,1.12,12.74,11.72,13a43.41,43.41,0,0,0,17-3.37c22.19,9.71,55.72-3.94,67.32.45,9.61,3.64,31.76,4.56,34.52.41,4.07-6.14-1.76-10.63-1.82-18.11C230.56,440.54,231.65,373.5,240,340Z" fill="#f37a54" fill-rule="evenodd"/>
    <path id="weakRightLeg" d="M259.8,340h22.09c0.23,35.56.06,93.24-.31,129.55-0.09,9,2.69,9.26,9.84,8.22,42.87-6.23,74.56-1.5,106.2,9,0.93,5.17-1.12,12.74-11.72,13a43.43,43.43,0,0,1-17-3.37c-22.19,9.71-55.74-3.94-67.33.45-9.62,3.64-31.77,4.56-34.52.41-4.07-6.14,1.76-10.63,1.82-18.11C269.21,440.54,268.11,373.5,259.8,340Z" fill="#f37a54" fill-rule="evenodd"/>
    <path id="weakPants" d="M376.15,286.32c-123.17,25-213.06,8.35-250.18-1.5,11.16,32.59,46,53.23,87,61.2v44h24.59s2.26-27.22,8-40.42c2.89,0.09,5.79.09,8.69,0.06,5.68,13.23,7.92,40.36,7.92,40.36H287V346.84C328,339.77,363.37,319.83,376.15,286.32Z" fill="#b8292f" fill-rule="evenodd"/>
    <path d="M121.88,100.15c14.45-1.66,48-16,56-70.27,38.86,44.09,117,36.47,169.88,37.19,3.6,9.93,13.83,28.27,31.43,33.11C363.59,43.45,312.35,0,250.59,0,189.42,0,137.52,42.58,121.88,100.15Z" fill="#3d3838" fill-rule="evenodd"/>
    <polygon points="168.61 33.68 146.21 26.07 163.96 25.23 152.97 7.48 174.52 21.43 178.75 0.72 182.13 22.69 168.61 33.68" fill="#3d3838" fill-rule="evenodd"/>
    <path id="belly" d="M250.08,287.22a3.91,3.91,0,1,1-3.9,3.9A3.9,3.9,0,0,1,250.08,287.22Z" fill="#3d3838" fill-rule="evenodd"/>
    <g>
      <path id="ltWeakPec" d="M187.61,257.19a3.91,3.91,0,1,1-3.9,3.9A3.9,3.9,0,0,1,187.61,257.19Z" fill="#3d3838" fill-rule="evenodd"/>
      <path id="rtWeakPec" d="M310.75,257.19a3.91,3.91,0,1,1-3.9,3.9A3.91,3.91,0,0,1,310.75,257.19Z" fill="#3d3838" fill-rule="evenodd"/>
    </g>
  <g id="face">
  
  <g>
      <ellipse cx="212.43" cy="119.52" rx="27.47" ry="35.07" fill="#fff"/>
      <ellipse cx="287.65" cy="119.52" rx="27.47" ry="35.07" fill="#fff"/>
    </g>
    <path d="M237.84,153.87c-11.24,10.3.12,23.8,12.17,24.25,14.84,0.55,24.67-15.93,12-26.39,15.43,8.48,6.67,30.12-12.19,29.79-10.19-.18-18.37-7.91-18.89-15.83C230.69,161.39,232.35,155.65,237.84,153.87Z" fill="#3d3838"/>
    <g id="weakEyes">
      <path d="M212.43,101.87c7.63,0,13.82,7.9,13.82,17.64s-6.19,17.64-13.82,17.64-13.82-7.9-13.82-17.64a21.88,21.88,0,0,1,1.07-6.81L210,116.35l-6.5-10.26A12.17,12.17,0,0,1,212.43,101.87Z" fill="#3d3838" fill-rule="evenodd"/>
      <path d="M287.65,101.87c7.63,0,13.82,7.9,13.82,17.64s-6.19,17.64-13.82,17.64-13.82-7.9-13.82-17.64a21.84,21.84,0,0,1,1.07-6.81l10.29,3.64-6.5-10.26A12.17,12.17,0,0,1,287.65,101.87Z" fill="#3d3838" fill-rule="evenodd"/>
    </g>

    <path id="frown" d="M280.58,201.2c-16.79-13.87-47-8.21-62.4,5C228.38,184.87,273.06,180.2,280.58,201.2Z" fill="#3d3838"/>
   </g>
	
  </g>
  <g id="muscles">
    <g>
      <path id="muscleRightArm" d="M338.58,209.35c2.59,20.49,16.52,62.52,44.9,61.15-8.91,21.23,11.63,25.57,15.73,52,2.36,1.56,8.87,2,11.54-.07,2.54-22.74,22.68-46,3.59-69.84C420,207,410.29,159,378.5,151.72l-32.41,6.53Z" fill="#f37a54"/>
      <path id="muscleRightHand" d="M412.93,318.63c12.33,7.65,16.86,32.93,10.7,30.65s-10-13-10-13c3.31,10,.79,26.59-4.6,21.54s-5.79-20.56-5.79-20.56c0.05,10.41-4.51,23.7-9.13,19.54s-1.86-15.3-.83-22.16c-7.84,8.42-17.86,10-14.58,1.47s14.06-15.73,16.31-17C402.43,315.09,408.57,315.93,412.93,318.63Z" fill="#f37a54" fill-rule="evenodd"/>
    </g>
    <g>
      <path d="M161.43,209.35c-2.59,20.49-16.52,62.52-44.91,61.15,8.91,21.23-11.63,25.57-15.73,52-2.36,1.56-8.87,2-11.54-.07-2.54-22.74-22.68-46-3.59-69.84C80,207,89.7,159,121.5,151.72l32.41,6.53Z" fill="#f37a54"/>
      <path d="M87.07,318.63c-12.33,7.65-16.86,32.93-10.69,30.65s10-13,10-13c-3.31,10-.79,26.59,4.6,21.54s5.78-20.56,5.78-20.56c-0.05,10.41,4.51,23.7,9.13,19.54s1.85-15.3.83-22.16c7.84,8.42,17.86,10,14.58,1.47s-14.06-15.73-16.31-17C97.57,315.09,91.43,315.93,87.07,318.63Z" fill="#f37a54" fill-rule="evenodd"/>
      <path d="M141.79,258c-19.16-19.82-30.18-46.93-29.92-76.78,0.24-28,27.44,26.38,41.12,58.16A75.25,75.25,0,0,1,141.79,258Z" fill="#3d3838" fill-rule="evenodd"/>
    </g>
    <path id="muscleRightLeg" d="M246.94,339.89c6.65-1.31,34.67-1.57,40-1.57-4.52,23.22-3,46.76-1.65,70.21-4.52,18.32-3.66,41.54-3.36,60.65,0.14,9,1.3,9.6,8.45,8.57,42.86-6.23,74.54-1.5,106.18,9,0.93,5.17-1.12,12.74-11.72,13a43.42,43.42,0,0,1-17-3.37c-22.19,9.71-55.72-3.94-67.32.45-9.61,3.64-31.76,4.56-34.52.41-4.07-6.14,1.75-10.63,1.82-18.11-1.29-36-10.13-32.74-13.19-50.06-1.11-6.31,1.73-11.57,6.39-17.07-1.91-17-3.81-32.47-5.54-44.86C253.66,353.76,251,343.74,246.94,339.89Z" fill="#f37a54" fill-rule="evenodd"/>
        
		

    
      <path id="muscleBaseBody" d="M122.53,99.93C138.25,42.47,190.1,0,251.19,0,313,0,364.27,43.52,379.85,100.32l9.28,39.12c2.41,7.64,3.19,15.5,5.57,34.47-11,91.58-90.23,95.68-107.55,168.34-8.53,2-29.8.82-72.64-2.2-31.18-72.16-99.92-88-107.58-163.31,2.57-17.48,4-28.11,6.36-37.16Z" fill="#f37a54" fill-rule="evenodd"/>	
	
	
	<path d="M250.87,340c-5.17-1.66-32.58-3.32-37.92-3.32,3.21,22.61,1.51,46.74.08,71.87,4.52,18.32,3.66,41.54,3.36,60.65-0.14,9-1.3,9.6-8.45,8.57-42.86-6.23-74.54-1.5-106.18,9-0.93,5.17,1.12,12.74,11.72,13a43.41,43.41,0,0,0,17-3.37c22.19,9.71,55.73-3.94,67.32.45,9.61,3.64,31.76,4.56,34.52.41,4.07-6.14-1.75-10.63-1.82-18.11,1.29-36,10.13-32.74,13.18-50.06,1.12-6.31-1.73-11.57-6.39-17.07,1.92-17.1,3.84-32.71,5.58-45.15C244.7,353.62,247.91,343.54,250.87,340Z" fill="#f37a54" fill-rule="evenodd"/>
      <path id="musclePants" d="M284.33,390.16H258.51c-4.76-44.28-14.38-43.53-18.69,0H214.06c0-24.63-.45-51.46-7-65.28,24.46,6.45,67.9,5.93,85.92,0C288.11,341.91,284.33,368,284.33,390.16Z" fill="#b8292f" fill-rule="evenodd"/>
    <path d="M121.47,100.15c14.45-1.66,48-16,56-70.27,38.86,44.09,117,36.47,169.88,37.19,3.6,9.93,13.83,28.27,31.43,33.11C363.19,43.45,311.95,0,250.19,0,189,0,137.12,42.58,121.47,100.15Z" fill="#3d3838" fill-rule="evenodd"/>
    <polygon points="168.21 33.68 145.81 26.07 163.56 25.23 152.57 7.48 174.12 21.43 178.35 0.72 181.73 22.69 168.21 33.68" fill="#3d3838" fill-rule="evenodd"/>
    <g>
      <path id="ltMusclePec" d="M188.23,233.75a3.9,3.9,0,1,1-3.9,3.9A3.9,3.9,0,0,1,188.23,233.75Z" fill="#3d3838" fill-rule="evenodd"/>
      <path id="rtMusclePec" d="M311.38,233.75a3.9,3.9,0,1,1-3.9,3.9A3.91,3.91,0,0,1,311.38,233.75Z" fill="#3d3838" fill-rule="evenodd"/>
    </g>
    <g>
      <ellipse cx="212.25" cy="119.44" rx="27.47" ry="35.07" fill="#fff"/>
      <ellipse cx="287.5" cy="119.44" rx="27.49" ry="35.07" fill="#fff"/>
    </g>
    <path d="M237.66,153.79c-11.24,10.3.12,23.8,12.18,24.25,14.84,0.55,24.67-15.94,12-26.39,15.43,8.48,6.67,30.12-12.19,29.79-10.19-.18-18.37-7.91-18.89-15.83C230.51,161.32,232.17,155.57,237.66,153.79Z" fill="#3d3838"/>
	
	
        <path id="muscleLeftArm" d="M161.43,209.35c-2.59,20.49-16.52,62.52-44.91,61.15,8.91,21.23-11.63,25.57-15.73,52-2.36,1.56-8.87,2-11.54-.07-2.54-22.74-22.68-46-3.59-69.84C80,207,89.7,159,121.5,151.72l32.41,6.53Z" fill="#f37a54"/>
        <path id="muscleLeftHand" d="M87.07,318.63c-12.33,7.65-16.86,32.93-10.69,30.65s10-13,10-13c-3.31,10-.79,26.59,4.6,21.54s5.78-20.56,5.78-20.56c-0.05,10.41,4.51,23.7,9.13,19.54s1.85-15.3.83-22.16c7.84,8.42,17.86,10,14.58,1.47s-14.06-15.73-16.31-17C97.57,315.09,91.43,315.93,87.07,318.63Z" fill="#f37a54" fill-rule="evenodd"/>
        
	
    <g>
      <path d="M191.65,76.4S215.29,91.17,233,85.81l-0.12-14.7S223.77,82.82,191.65,76.4Z" fill="#3d3838" fill-rule="evenodd"/>
      <path d="M308.12,76.4s-23.66,14.77-41.41,9.41l0.12-14.7S276,82.82,308.12,76.4Z" fill="#3d3838" fill-rule="evenodd"/>
    </g>
    <path id="smirk" d="M189.85,160.61a15.59,15.59,0,0,1,7.7.45c-6-7.11-17.08-4.62-17.61,7.07a21.8,21.8,0,0,1,6.22-6.07c11.09,40.83,83.5,33.74,111.39,20.63C271.72,187,200.58,198,189.85,160.61Z" fill="#3d3838"/>
	  <path id="surprise" d="M251.07,185.7c4.46,0,8.07,4.06,8.07,9.08s-3.61,9.08-8.07,9.08-8.07-4.07-8.07-9.08S246.61,185.7,251.07,185.7Z" fill="#3d3838" fill-rule="evenodd"/>
   
    <path id="sixPack" d="M249.81,293.57c-0.06-4.33-.18-8.65-0.36-12.66,7.82-.2,15.3-0.8,18.28-1.81-3-.72-10.58-1.2-18.43-1.18-0.36-6.46-.89-11.82-1.6-14.6a123.48,123.48,0,0,0-1.14,14.62c-7.77.14-15.38,0.79-18.78,2.21,3.45,0.64,11,.91,18.69.81-0.1,4-.14,8.32-0.11,12.64-7.7.15-15.21,0.8-18.58,2.21,3.44,0.63,10.94.91,18.62,0.81,0.07,3.82.2,7.57,0.41,11.07-7.86.13-15.59,0.78-19,2.22,3.53,0.65,11.34.92,19.23,0.8a63.68,63.68,0,0,0,1.91,12.79c0.39-2.8.67-7.4,0.81-12.85,7.72-.21,15.05-0.81,18-1.8-3-.71-10.26-1.18-17.94-1.18,0.06-3.52.08-7.29,0.05-11.12,7.68-.21,15-0.81,17.89-1.79C264.77,294,257.48,293.57,249.81,293.57Z" fill="#3d3838" fill-rule="evenodd"/>
  </g>
  <g id="theEyes" mask="url(#lidMask)">
    <path d="M214.11,72.79c16.23,0.66,28.69,18,27.85,38.72q-0.07,1.75-.27,3.46l-58.51-2.39c0-1.14,0-2.3,0-3.47C184,88.39,197.89,72.13,214.11,72.79Z" fill="#f37a54" fill-rule="evenodd"/>
    <path d="M285.64,72.79c-16.24.66-28.72,18-27.87,38.72,0,1.17.14,2.32,0.27,3.46l58.56-2.39q0.05-1.72,0-3.47C315.73,88.39,301.88,72.13,285.64,72.79Z" fill="#f37a54" fill-rule="evenodd"/>
  </g>
  <g id="chestLines" >
    <path d="M340.07,257.32c-110.38-29-177.45,1.83-177.65,1.92C196.2,235.7,288.65,234.2,340.07,257.32Z" fill="#3d3838"/>
    <path d="M240.89,242.8c5.51-2.29,3.54-19.94,5.92-32,2.61,10.84,1.39,28.75,6.26,32H240.89Z" fill="#3d3838" fill-rule="evenodd"/>
  </g>
  
  
    <g id="eyeBrows">
      <path id="ltEyebrow" d="M186.11,80.33s27,6.76,42.26-3.8l-4.65-13.95S218.65,76.53,186.11,80.33Z" fill="#3d3838" fill-rule="evenodd"/>
      <path id="rtEyebrow" d="M312.82,80.33s-27.07,6.76-42.3-3.8l4.65-13.95S280.25,76.53,312.82,80.33Z" fill="#3d3838" fill-rule="evenodd"/>
    </g>  

</svg>

              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700);

html, body {
	margin: 0;
	padding: 0;
	overflow: hidden;
	background-color: #EFEFEF;
}

#muscles {
	visibility:hidden;
}

#muscleMorph {
	position: absolute;
	opacity:0;
	
}

#chestLines, #muscleRightShadow, #muscleLeftShadow {
	visibility: hidden;
	opacity:0;
}

#controls {
	width:100%;
	padding: 20px 0;
	position: absolute;
	background: #262626;
	text-align:center;
	left:0;
	z-index: 102;
}

button {
	padding: 16px 30px;
	cursor: pointer;
	font-family: 'Source Sans Pro', sans-serif;
	font-weight: 700;
	font-size: 30px;
}

#titleBox {
	width:100%;
	padding: 20px 0;
	background: #262626;
	color:white;
	text-align:center;
	position: absolute;
	top:0;
	left:0;
	z-index: 101;
}

h1, p {
	font-family: 'Source Sans Pro', sans-serif;
	font-weight: 700;
	margin:0;
	padding: 0;
	line-height:1.2;
}

h1 {
	font-size: 2.5em;
}

h1, p span {
	color: #88ce02;
}

a {
  color: #fff;
}
              
            
!

JS

              
                

// Just having some fun with the morphSVG plugin from GreenSock
// Check me out on Twitter - @Craig_PointC
// I'm also a moderator on the GreenSock forums - 
// stop by and say hi: https://greensock.com/forums/ 









var tl = new TimelineMax({paused:true, onComplete: function() {$("#masterControl").html("Make Him Wimpy");} }),
	  tl2 = new TimelineMax({paused:true, onComplete: function() {$("#masterControl").html("Give Him Muscles");} }),
	  st = 1.25,
	  muscles = "weak",
	  eyes = $("#weakEyes"),
	  demo = $("#muscleMorph"),
	  controls = document.getElementById("controls"),
	  titleBox = document.getElementById("titleBox");

TweenMax.set("#weakPants",{transformOrigin:"center"})
TweenMax.set("#chestLines",{transformOrigin:"center", scale:0})
TweenMax.set("#ltEyebrow, #rtEyebrow", {transformOrigin:"center"})
TweenMax.set("#theEyes path", {y:-50})
TweenMax.set(eyes, {rotation:0.01})
TweenMax.set(demo, {xPercent:-50, left:"50%", autoAlpha:1});

// make some muscles timeline
tl
.to(eyes, 0.35, {x:8, y:12, ease:Power2.easeInOut})
.add("rtArm","+=0.35")
.to("#weakRightArm", 0.4, {morphSVG:"#muscleRightArm", ease:Back.easeOut},"rtArm")
.to("#weakRightHand", 0.4, {morphSVG:"#muscleRightHand", ease:Back.easeOut},"rtArm")
.to(eyes, 0.35, {x:-8, y:12, ease:Power2.easeInOut},"+=.3")
.add("ltArm","+=0.35")
.to("#weakLeftArm", 0.4, {morphSVG:"#muscleLeftArm", ease:Back.easeOut},"ltArm")
.to("#weakLeftHand", 0.4, {morphSVG:"#muscleLeftHand", ease:Back.easeOut},"ltArm")
.to(eyes, 0.35, {x:0, y:5,  ease:Power2.easeInOut},"+=.3")
.to(eyes, 0.25, {x:0, y:15,  yoyo:true, repeat:1, repeatDelay:1.5, ease:Power2.easeInOut},"+=1")
.to("#ltArmMaster, #rtArmMaster", 0.2, {y:-10, yoyo:true, repeat:1, ease:Power2.easeInOut, repeatDelay:0.3},"+=1")
.to(eyes, 0.25, {x:0, y:15, ease:Power2.easeInOut},"+=1")
.add("body","+=1")
.to("#weakBaseBody", 0.25, {morphSVG:"#muscleBaseBody", ease:Back.easeOut},"body")
.to("#muscleRightShadow, #muscleLeftShadow", 0.25, {autoAlpha:.6},"body+=0.15")
.to("#chestLines",0.3, {scale:1,autoAlpha:.6}, "body")
.to("#rtWeakPec",0.3,{morphSVG:"#rtMusclePec"},"body")
.to("#ltWeakPec",0.3,{morphSVG:"#ltMusclePec"},"body")
.to("#belly", 0.2, {morphSVG:"#sixPack", autoAlpha:0.6, ease:Back.easeOut},"body+=0.10")
.to("#weakPants", 0.25, {morphSVG:"#musclePants", ease:Back.easeOut, fill:"#88ce02"},"body")
.to(eyes, 1.25, {x:0, y:0, ease:Power1.easeInOut},"+=1")
.add("smile","+=1")
.to("#frown", st, {morphSVG:"#smirk"},"smile")
.to("#ltEyebrow",st , {rotation:10, y:10}, "smile")
.to("#rtEyebrow",st, {rotation:-10, y:10 }, "smile")
.to("#theEyes path", st, {y:0},"smile")
.to("#rtEyebrow, #ltEyebrow",0.1, {y:"-=10", yoyo:true, repeat:3 },"+=1");

// make him wimpy again
tl2
.add("uhoh")
.to("#frown", 0.25, {morphSVG:"#surprise"},"uhoh")
.to("#theEyes path", 0.25, {y:-50},"uhoh")
.to("#ltEyebrow",0.25 , {rotation:0, y:0}, "uhoh")
.to("#rtEyebrow",0.25, {rotation:0, y:0 }, "uhoh")
.add("shrink","+=0.5")
.to("#weakRightArm", 0.4, {morphSVG:"#weakRightArm", ease:Elastic.easeOut},"shrink")
.to("#weakRightHand", 0.4, {morphSVG:"#weakRightHand", ease:Elastic.easeOut},"shrink")
.to("#weakLeftArm", 0.4, {morphSVG:"#weakLeftArm", ease:Elastic.easeOut},"shrink")
.to("#weakLeftHand", 0.4, {morphSVG:"#weakLeftHand", ease:Elastic.easeOut},"shrink")
.to("#weakBaseBody", 0.5, {morphSVG:"#weakBaseBody", ease:Elastic.easeOut},"shrink")
.to("#muscleRightShadow, #muscleLeftShadow", 0.25, {autoAlpha:0},"shrink")
.to("#rtWeakPec",0.2,{morphSVG:"#rtWeakPec"},"shrink")
.to("#ltWeakPec",0.2,{morphSVG:"#ltWeakPec"},"shrink")
.to("#chestLines",0.25, {scale:0,autoAlpha:0}, "shrink")
.to("#belly", 0.25, {morphSVG:"#belly", autoAlpha:1},"shrink")
.to("#weakPants", 0.25, {morphSVG:"#weakPants", ease:Elastic.easeOut, fill:"#b8292f"},"shrink")
.add("sad","+=0.5")
.to(eyes, 0.25, {x:0, y:15, ease:Power2.easeInOut},"sad")
.to(eyes, 0.25, {x:-6, y:15, ease:Power2.easeInOut},"+=0.5")
.to(eyes, 0.25, {x:6, y:15, ease:Power2.easeInOut},"+=0.5")
.to(eyes, 0.45, {x:0, y:0, ease:Power2.easeInOut},"+=0.5")
.to("#frown", 0.5, {morphSVG:"#frown"},"+=0.75")


// master control - won't work if any timeline is active
$("#masterControl").click(function(e) {
    if (!tl.isActive() && !tl2.isActive()) {
		if (muscles == "weak") {
			muscles = "strong";
			tl.seek(0).play();
			} else {
			muscles = "weak";
			tl2.seek(0).play();
			}
		
	}
});

// size the SVG to fit with the title and control panel
function sizeAll() {
  var h = window.innerHeight,
		  w = window.innerWidth,
		  th = titleBox.clientHeight,
		  ch = controls.clientHeight;
		
	if ( w > (h-ch-th)) {
		TweenMax.set(demo, {height:h-ch-th-10, width:(h-ch-th-10),top:th+10});
		TweenMax.set(controls, {y:h-ch});	
		} 
		
	else {
		TweenMax.set(demo, {y:0, width:w-10, height:w-10, top:th+10});
		TweenMax.set(controls, {y:w+th});	
		}
}

$(window).resize(sizeAll);

sizeAll();

              
            
!
999px

Console