cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

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.

            
              <svg id="demo" xmlns="http://www.w3.org/2000/svg" width="1200" height="800" viewBox="0 0 1200 800">
	<title>Pac-Man's Jedi Mind Trick</title>
	<defs>
		<mask id="dotsCover">
			<path id="dotsMask" d="M600,382H314.31V20H885.69V382Z" fill="none" stroke="#fff" stroke-width="16"/>
		</mask>
		<g id="helmet">
			<g>
				<path d="M103.52,59.81V39.87H7.83V59.81s-20.06,13.67,4.05,38.7c0,.39-.07.77-.07,1.17,0,11,9.82,19.93,21.93,19.93s21.93-8.92,21.93-19.93c0,11,9.82,19.93,21.93,19.93s21.93-8.92,21.93-19.93c0-.4,0-.78-.06-1.17C123.58,73.48,103.52,59.81,103.52,59.81Zm-79.75,0c-8,0-8-16-8-16H47.7S31.75,59.81,23.77,59.81Zm63.8,0c-8,0-23.92-16-23.92-16H95.54S95.54,59.81,87.57,59.81Z" fill="#ebebeb"/>
				<path d="M15.31,0H96a7.48,7.48,0,0,1,7.48,7.48V31.9a0,0,0,0,1,0,0H7.83a0,0,0,0,1,0,0V7.48A7.48,7.48,0,0,1,15.31,0Z" fill="#ebebeb"/>
				<circle cx="77.6" cy="105.66" r="5.98" fill="#323232"/>
				<circle cx="33.74" cy="105.66" r="5.98" fill="#323232"/>
				<path d="M59.66,99.68v-4a4,4,0,1,0-8,0v4a4,4,0,0,0-4,4v8a4,4,0,0,0,4,4h0a4,4,0,0,0,8,0h0a4,4,0,0,0,4-4v-8A4,4,0,0,0,59.66,99.68Z" fill="#323232"/>
				<path d="M15.75,35.88A1.87,1.87,0,0,1,13.88,34a28,28,0,0,1,28-28,1.86,1.86,0,0,1,0,3.72A24.27,24.27,0,0,0,17.61,34,1.86,1.86,0,0,1,15.75,35.88Z" fill="#fff" opacity="0.5"/>
				<rect x="7.83" y="31.9" width="95.69" height="7.97" fill="#323232"/>
				<path d="M86.57,77.75a28.4,28.4,0,0,1-6.93-2.2c-2.43-1-5.32-3.12-8.38-5.36s-6.54-4.52-9.84-5.58a20.57,20.57,0,0,0-11.5,0c-3.3,1.06-6.78,3.36-9.84,5.58a48,48,0,0,1-8.37,5.36,28.37,28.37,0,0,1-6.94,2.2,1,1,0,1,0,0,2h3s.75,0,1.59-.12a19.87,19.87,0,0,0,3.73-.76,56.44,56.44,0,0,0,10-4.35A33.2,33.2,0,0,1,52,71.07a23.47,23.47,0,0,1,3.71-.37,23.36,23.36,0,0,1,3.71.37,33,33,0,0,1,8.89,3.44,57.08,57.08,0,0,0,10,4.35,19.94,19.94,0,0,0,3.74.76c.84.08,1.58.12,1.58.12h3a1,1,0,1,0,0-2Z" fill="#505050"/>
				<g>
					<path d="M71.62,76.18c1.35.65,2.69,1.27,4,1.77V73.28c-1.28-.85-2.62-1.82-4-2.83Z" fill="#323232"/>
					<path d="M59.66,71.14a21.13,21.13,0,0,1,4,1.22V65.51a19.63,19.63,0,0,0-2.23-.9,17.53,17.53,0,0,0-1.76-.39Z" fill="#323232"/>
				</g>
				<g>
					<path d="M39.72,76.18c-1.35.65-2.69,1.27-4,1.77V73.28c1.27-.85,2.61-1.82,4-2.83Z" fill="#323232"/>
					<path d="M51.68,71.14a20.84,20.84,0,0,0-4,1.22V65.51a19.5,19.5,0,0,1,2.22-.9c.55-.17,1.16-.27,1.76-.39Z" fill="#323232"/>
				</g>
			</g>
			<path d="M87.57,59.66c-7.89,0-23.65-15.76-23.65-15.76H95.45S95.45,59.66,87.57,59.66Z" fill="#323232" opacity="0.6"/>
			<path d="M23.93,59.79c8,0,23.84-15.89,23.84-15.89H16S16,59.79,23.93,59.79Z" fill="#323232" opacity="0.6"/>
		</g>
	</defs>
	<rect width="1200" height="800"/>
	<g class="ghost">
		<path class="body" d="M642.69,661.19c-.19-16.78-2.86-33.09-13-45.63-8.65-10.7-20.86-16.95-33.42-16.82-11.42.12-22.64,5.39-31.07,14.45-10.19,11-14.4,25.62-14.88,41.6-.27,9.22-.13,18.46-.21,27.68s-.36,18.38.71,27.49c.76,6.47,2,21.59,5.72,26.76,1.43,2,3.4,3.52,5.69,3.25,3.21-.37,5.28-4.32,6.53-7.42,2.4-6,2.5-23.64,7.72-27.46,2.44-1.78,4.91-.72,6.62,1.75s2.06,5.33,2.59,8.41c1,5.48,2.58,19.87,6.87,23,4.5,3.32,8.12-.5,10-5.32,1.38-3.51,1.78-14.79,2.75-18.44s2.93-9.1,6.54-9.73c4.66-.81,6.88,6.44,7.69,10.52,1.13,5.63,2.76,20.86,7.55,23.73s8.94-1.75,11-6.39c2.69-5.9,3.71-20.43,4.2-27,1.09-14.65.57-29.75.36-44.44C642.54,647.79,642.84,672,642.69,661.19Z" fill="#db851c"/>
		<g id="leftEye">
			<ellipse cx="578.04" cy="647.99" rx="11.35" ry="13.37" fill="#fff"/>
			<ellipse class="pupil" cx="581.02" cy="647.99" rx="5.23" ry="6.16"/>
		</g>
		<g id="rightEye">
			<ellipse cx="617.45" cy="647.99" rx="11.35" ry="13.37" fill="#fff"/>
			<ellipse class="pupil" cx="620.44" cy="647.99" rx="5.23" ry="6.16"/>
		</g>
		<use xlink:href="#helmet" x="540" y="598"/>
	</g>
	<g class="ghost">
		<path class="body" data-name="body" d="M502.69,661.19c-.19-16.78-2.86-33.09-13-45.63-8.65-10.7-20.86-16.95-33.42-16.82-11.42.12-22.64,5.39-31.07,14.45-10.19,11-14.4,25.62-14.88,41.6-.27,9.22-.13,18.46-.21,27.68s-.36,18.38.71,27.49c.76,6.47,2,21.59,5.72,26.76,1.43,2,3.4,3.52,5.69,3.25,3.21-.37,5.28-4.32,6.53-7.42,2.4-6,2.5-23.64,7.72-27.46,2.44-1.78,4.91-.72,6.62,1.75s2.06,5.33,2.59,8.41c.95,5.48,2.58,19.87,6.87,23,4.5,3.32,8.12-.5,10-5.32,1.38-3.51,1.78-14.79,2.75-18.44s2.93-9.1,6.54-9.73c4.66-.81,6.88,6.44,7.69,10.52,1.13,5.63,2.76,20.86,7.55,23.73s8.94-1.75,11-6.39c2.69-5.9,3.71-20.43,4.2-27,1.09-14.65.57-29.75.36-44.44C502.54,647.79,502.84,672,502.69,661.19Z" fill="#d03e19"/>
		<g id="leftEye-2" data-name="leftEye">
			<ellipse cx="438.04" cy="647.99" rx="11.35" ry="13.37" fill="#fff"/>
			<ellipse class="pupil" cx="441.02" cy="647.99" rx="5.23" ry="6.16"/>
		</g>
		<g id="rightEye-2">
			<ellipse cx="477.45" cy="647.99" rx="11.35" ry="13.37" fill="#fff"/>
			<ellipse class="pupil" cx="480.44" cy="647.99" rx="5.23" ry="6.16"/>
		</g>
		<use xlink:href="#helmet" x="400" y="598"/>
	</g>
	<g class="ghost">
		<path class="body"  d="M367.69,661.19c-.19-16.78-2.86-33.09-13-45.63-8.65-10.7-20.86-16.95-33.42-16.82-11.42.12-22.64,5.39-31.07,14.45-10.19,11-14.4,25.62-14.88,41.6-.27,9.22-.13,18.46-.21,27.68s-.36,18.38.71,27.49c.76,6.47,2,21.59,5.72,26.76,1.43,2,3.4,3.52,5.69,3.25,3.21-.37,5.28-4.32,6.53-7.42,2.4-6,2.5-23.64,7.72-27.46,2.44-1.78,4.91-.72,6.62,1.75s2.06,5.33,2.59,8.41c.95,5.48,2.58,19.87,6.87,23,4.5,3.32,8.12-.5,10-5.32,1.38-3.51,1.78-14.79,2.75-18.44s2.93-9.1,6.54-9.73c4.66-.81,6.88,6.44,7.69,10.52,1.13,5.63,2.76,20.86,7.55,23.73s8.94-1.75,11-6.39c2.69-5.9,3.71-20.43,4.2-27,1.09-14.65.57-29.75.36-44.44C367.54,647.79,367.84,672,367.69,661.19Z" fill="#46bfee"/>
		<g id="leftEye-3" data-name="leftEye">
			<ellipse cx="303.04" cy="647.99" rx="11.35" ry="13.37" fill="#fff"/>
			<ellipse class="pupil" cx="306.02" cy="647.99" rx="5.23" ry="6.16"/>
		</g>
		<g id="rightEye-3" >
			<ellipse cx="342.45" cy="647.99" rx="11.35" ry="13.37" fill="#fff"/>
			<ellipse class="pupil" cx="345.44" cy="647.99" rx="5.23" ry="6.16"/>
		</g>
		<use xlink:href="#helmet" x="265" y="598"/>
	</g>
	<g class="ghost">
		<path class="body" d="M222.69,661.19c-.19-16.78-2.86-33.09-13-45.63-8.65-10.7-20.86-16.95-33.42-16.82-11.42.12-22.64,5.39-31.07,14.45-10.19,11-14.4,25.62-14.88,41.6-.27,9.22-.13,18.46-.21,27.68s-.36,18.38.71,27.49c.76,6.47,2,21.59,5.72,26.76,1.43,2,3.4,3.52,5.69,3.25,3.21-.37,5.28-4.32,6.53-7.42,2.4-6,2.5-23.64,7.72-27.46,2.44-1.78,4.91-.72,6.62,1.75s2.06,5.33,2.59,8.41c.95,5.48,2.58,19.87,6.87,23,4.5,3.32,8.12-.5,10-5.32,1.38-3.51,1.78-14.79,2.75-18.44s2.93-9.1,6.54-9.73c4.66-.81,6.88,6.44,7.69,10.52,1.13,5.63,2.76,20.86,7.55,23.73s8.94-1.75,11-6.39c2.69-5.9,3.71-20.43,4.2-27,1.09-14.65.57-29.75.36-44.44C222.54,647.79,222.84,672,222.69,661.19Z" fill="#ea82e5"/>
		<g id="leftEye-4" data-name="leftEye">
			<ellipse cx="158.04" cy="647.99" rx="11.35" ry="13.37" fill="#fff"/>
			<ellipse class="pupil" cx="161.02" cy="647.99" rx="5.23" ry="6.16"/>
		</g>
		<g id="rightEye-4" >
			<ellipse cx="197.45" cy="647.99" rx="11.35" ry="13.37" fill="#fff"/>
			<ellipse class="pupil" cx="200.44" cy="647.99" rx="5.23" ry="6.16"/>
		</g>
		<use xlink:href="#helmet" x="120" y="598"/>
	</g>
	<g id="pacMaster" transform="translate(85 0)">
		<path id="pacUpper" d="M929,590a75,75,0,0,0-75,75h150A75,75,0,0,0,929,590Z" stroke="#fdff00" stroke-width="2" fill="#fdff00"/>
		<path id="pacLower" d="M929,740a75,75,0,0,0,75-75H854A75,75,0,0,0,929,740Z" stroke="#fdff00" stroke-width="2" fill="#fdff00"/>
		<path id="belt" d="M855,677s28.88,2.9,36.76,2.94c8.3,0,32.74-2.45,32.74-2.45v19.58a159.45,159.45,0,0,1-32.74,3.43c-15.1,0-28.92-1.21-30.26-3C858.5,693.5,855,677,855,677Z" fill="#754c24" stroke="#5b391d" stroke-miterlimit="10" stroke-width="4"/>
		<g id="sabre">
			<rect x="896.37" y="680" width="8.21" height="24.63" transform="translate(1800.95 1384.63) rotate(180)" fill="#bebebe"/>
			<rect x="896.37" y="721.05" width="6.84" height="8.21" transform="translate(1799.58 1450.32) rotate(180)" fill="#8c8c8c"/>
			<rect x="895" y="704.63" width="10.95" height="16.42" transform="translate(1800.95 1425.68) rotate(180)" fill="#bebebe"/>
			<rect x="903.21" y="681.37" width="2.74" height="23.26" transform="translate(1809.16 1386) rotate(180)" fill="#8c8c8c"/>
			<rect x="895" y="681.37" width="2.74" height="23.26" transform="translate(1792.74 1386) rotate(180)" fill="#8c8c8c"/>
			<rect x="899.11" y="681.37" width="2.74" height="23.26" transform="translate(1800.95 1386) rotate(180)" fill="#8c8c8c"/>
			<rect x="905.95" y="706" width="1.37" height="5.47" fill="#cbcbcb"/>
			<rect x="905.95" y="721.05" width="1.37" height="2.74" fill="#bebebe"/>
			<path d="M906,719.68V732h0a4.43,4.43,0,0,1-4-2.45l-1.52-3L895,723.79v-4.11Z" fill="#bebebe"/>
			<circle cx="899.11" cy="722.42" r="1.37" fill="#8c8c8c"/>
		</g>
	</g>
	<g id="Text">
		<path id="bubble1" class="bubble" d="M966,479.05c0-39.18-78.13-70.94-174.5-70.94S617,439.87,617,479.05,695.13,550,791.5,550c14,0,27.71-.68,40.8-2l23.08,9.82,42.89,18.24-23.55-34.67C929.09,529.41,966,506,966,479.05Z" fill="#fff"/>
		<path id="bubble2" class="bubble" d="M422,483.05c0-39.18,78.13-70.94,174.5-70.94S771,443.87,771,483.05,692.87,554,596.5,554c-14,0-27.71-.68-40.8-2l-23.08,9.82L489.73,580.1l23.55-34.67C458.91,533.41,422,510,422,483.05Z" fill="#fff"/>
		<path id="bubble3" class="bubble" d="M967,486.79c0-34.36-61.78-62.22-138-62.22s-138,27.86-138,62.22S752.78,549,829,549a300.29,300.29,0,0,0,34.25-1.93l15.14,11.12,20.22,14.86-8.25-23.7L888.15,543C934.77,533,967,511.6,967,486.79Z" fill="#fff"/>
		<path id="bubble4" class="bubble" d="M443,491.79c0-34.36,61.78-62.22,138-62.22s138,27.86,138,62.22S657.22,554,581,554a300.29,300.29,0,0,1-34.25-1.93l-15.14,11.12-20.22,14.86,8.25-23.7,2.21-6.34C475.23,538,443,516.6,443,491.79Z" fill="#fff"/>
		<g id="captions" fill="#247591">
			<text id="text1" class="caption" transform="translate(655 469)" font-size="29"  >I'm not the PAC-MAN
				<tspan x="0" y="35" >you're looking for.</tspan>
			</text>
			<text id="text2" class="caption" transform="translate(453.55 476)" font-size="29"  >He's not the PAC-MAN
				<tspan x="53.85" y="34.8">we're looking for.</tspan>
			</text>
			<text id="text3" class="caption" transform="translate(734 476)" font-size="29"  >I can go about
				<tspan x="0" y="35">my business.</tspan>
			</text>
			<text id="text4" class="caption" transform="translate(465 486)" font-size="29"  >He can go about
				<tspan x="49" y="30">his business.</tspan>
			</text>
		</g>
	</g>
	<g id="Title">
		<path d="M448.85,304.82l-11.11,41H409.93l-38.71-96.7h34.36l14.47,41.79,12.57-41.79H464.2l14.69,41.79,9.79-41.79H523l-32.95,96.7H462.22Z" stroke="#fdff00" stroke-miterlimit="10" stroke-width="5"/>
		<path d="M508.5,345.8l31.81-96.7h48l32.35,96.7H584.11L578,328.39H549.28l-6.09,17.41Zm55.92-75.27-13.86,38.31h26.65Z" stroke="#fdff00" stroke-miterlimit="10" stroke-width="5"/>
		<path d="M733.12,317h21.33q19,.54,4.83-10.58Q736,285,739.45,267.05t22-18H837.5v28.8H790.62q-17.22-.54-5.09,9.51,21.69,19,21.29,37T785.53,345.8H701.38a12.81,12.81,0,0,1-9.23-3.93l-26.89-28V345.8h-35V249.1h63q11.65,1.08,19.15,6.16a29.62,29.62,0,0,1,11,13.66q2.68,12.87.27,19.83a24.84,24.84,0,0,1-8.44,11.65q-5.65,4.39-15.92,7a.91.91,0,0,0-.48,1.45l6.36,8.12h28" stroke="#fdff00" stroke-miterlimit="10" stroke-width="5"/>
		<path d="M665.26,273.21V291h24.37a8,8,0,0,0,4.22-1.44q2.28-1.44,2.41-7.26c-.22-3.71-1.13-6.15-2.71-7.34a7.27,7.27,0,0,0-4-1.77Z" stroke="#fdff00" stroke-miterlimit="10" stroke-width="5"/>
		<g id="Pac">
			<path d="M649.58,47.9H362.88V91.11H393V193h52.45V145.07h45.43q18.07-2.72,28.94-12t13.26-16.28a66.92,66.92,0,0,0,3.22-15.07,43.05,43.05,0,0,0-.61-10.65h27.54L529.8,193h52.05L591,166.88H634.1L643.25,193h54.86ZM488.39,108.64a12,12,0,0,1-6.33,2.16H445.48V84.07H482q2.42,0,6,2.67t4.07,11Q491.82,106.48,488.39,108.64ZM592.9,137.53l20.8-57.48,19.2,57.48Z" stroke="#fdff00" stroke-width="5"/>
			<path d="M738.11,118.84q.79,12.06,5.22,18.09a34.1,34.1,0,0,0,10.56,9.55Q760,150,772.48,151.6q12.85-.79,18.49-3.41a61.81,61.81,0,0,0,12.86-8.65l28.54,31.76Q819.91,183,807.65,187.38T772.07,193q-22.5-1.2-34.06-6.58a116.18,116.18,0,0,1-22.86-14.27,61.5,61.5,0,0,1-17.69-22.31q-6.37-13.41-6.38-31.1,0-17.47,6.38-30.9a61.58,61.58,0,0,1,17.69-22.31A116.65,116.65,0,0,1,738,51.26q11.55-5.37,34.06-6.58,23.32,1.22,35.58,5.63t24.72,16.08L803.83,98.14A61.32,61.32,0,0,0,791,89.5q-5.64-2.61-18.49-3.42Q760,87.7,753.89,91.21a34.07,34.07,0,0,0-10.56,9.54Q738.92,106.78,738.11,118.84Z" stroke="#fdff00" stroke-width="5"/>
		</g>
		<text transform="translate(600 232)" font-size="36" fill="#fff" text-anchor="middle" >PAC-MAN'S JEDI MIND TRICK</text>
		<text transform="translate(600 782)" text-anchor="middle" opacity="0.25" font-size="30" fill="#fff">The ultimate entertainment crossover event you didn't know you needed.</text>
		<g id="maskReveal" mask="url(#dotsCover)">
			<path id="dots" d="M600,20H885.69V382H314.31V20Z" fill="none" stroke="#f2f2f2" stroke-dasharray="0,25" stroke-linecap="round" stroke-width="6" />
		</g>
	</g>
</svg>
            
          
!
            
              #demo {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  opacity: 0;
}

body {
  height: 100vh;
  width: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  display: flex;
  align-content: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #000;
}

            
          
!
            
              var mouthAnim = new TimelineMax({repeat:-1, yoyo:true, repeatDelay:0.05});
var master = new TimelineMax({onComplete:function() { master.play("chase"); } });
var mt = 0.2;
var stg = 2.5;

// initial setup
TweenMax.set("#bubble1, #bubble3", {transformOrigin:"bottom right", scale:0});
TweenMax.set("#bubble2, #bubble4", {transformOrigin:"bottom left", scale:0});
TweenMax.set("#sabre, .caption", {autoAlpha:0});
TweenMax.set("#pacUpper", {transformOrigin:"center bottom"});
TweenMax.set("#pacLower", {transformOrigin:"center top"});
	
// master timeline
master.to("#demo", 1.25, {autoAlpha:1, ease:Linear.easeNone});
master.from("#dotsMask", 2, {drawSVG:"50% 50%", rotation:0.01, ease:Linear.easeNone});
master.add("chase");
master.from("#pacMaster", 3.6, {x:"-=1500"}, "chase");
master.staggerFrom(".ghost", 3.25, {x:"-=1500"}, 0.25, "chase" );
master.add("flip", "-=0.9");
master.set("#pacMaster", {scaleX:-1, transformOrigin:"center center"}, "flip");
master.set("#sabre", {autoAlpha:1},  "flip");
master.add("captions");
master.staggerTo(".bubble", 0.4, {scale:1}, stg, "captions");
master.staggerTo(".caption", 0.25, {autoAlpha:1}, stg, "captions+=0.4");
master.staggerTo(".caption", 0.15, {autoAlpha:0}, stg, "captions+=2.25");
master.staggerTo(".bubble", 0.15, {autoAlpha:0}, stg, "captions+=2.25");
master.to(".body", 0.75, {fill:"#1919b2"}, "captions+=3");
master.add("flipBack");
master.set("#pacMaster", {scaleX:1, transformOrigin:"center center"}, "flipBack");
master.set("#sabre", {autoAlpha:0}, "flipBack");
master.add("chaseEnd");
master.to("#pacMaster", 2, {x:"+=900"}, "chaseEnd");
master.to(".pupil", 0.1, {x:"-=6"}, "chaseEnd");
master.staggerTo(".ghost", 2, {x:"-=1500"}, -0.25, "chaseEnd" );
	
// mouth repeating timeline	
mouthAnim.to("#pacUpper", mt, {rotation:-45, ease:Power2.easeInOut});
mouthAnim.to("#pacLower", mt, {rotation:45,  ease:Power2.easeInOut}, 0);
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console