Pen Settings

HTML

CSS

CSS Base

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

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

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.

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.

Vue

              
                <template>
  <div id="app">
    <transition @enter="enter" :css="false">
      <svg 
        ref="cloud"
        class="cloud"
        viewBox="0 0 674 313"
        @click="enter"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
      >
        <g>
          <defs>
				<filter id="turb2">
					<feTurbulence id="turb" type="fractalNoise" baseFrequency="0.003, 0.0" numOctaves="1" result="TURB" seed='8' />
					<feDisplacementMap xChannelSelector="R" yChannelSelector="R" in="SourceGraphic" in2="TURB" result="DISP" scale="50" />
					<feGaussianBlur id="blur" in="DISP" stdDeviation="1 2" result="BLUR" />
					<feColorMatrix id="matrix" in="BLUR" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 18 -10" result="GOO" />
				</filter>
			</defs>
          <g ref="sun" fill="#FCCC2E">
            <path
              id="sun swirl"
              d="M390.602 131.147c-24-7.3-53.16 3.34-57.2 31.56a39.87 39.87 0 00-.32 7.79c.81 14.36 9.66 27.87 22.22 34.89 12.56 7.02 28.38 7.56 41.64 2 5.91-2.48 11.44-6.21 15.07-11.48 6.48-9.41 5.54-22.57-.75-31.8-5.46-8-14.57-13.23-24.15-14.76-10.73-1.71-23.24 1.52-29 11.43a22.447 22.447 0 006.621 29.796 22.451 22.451 0 0010.379 3.854c5.12.54 10.67-.93 14.07-4.78 3.4-3.85 4-10.31.45-14.08-1.59-1.7-4.25-2.73-6.27-1.57-2.21 1.28-2.47 4.29-3.53 6.62-2.26 4.94-9.14 6.78-13.9 4.18-4.76-2.6-7-8.72-5.8-14 1.2-5.28 5.47-9.59 10.47-11.62a26.584 26.584 0 0116-.75 29.795 29.795 0 0116.63 10.16c4.08 5.2 5.95 12.27 4.22 18.66a22.15 22.15 0 01-11 13.28 33.003 33.003 0 01-17.16 3.51 44.073 44.073 0 01-29.49-13.45c-5.32-5.55-9.21-12.88-9.1-20.57.11-7.69 4.19-14.85 9.85-20 8.38-7.59 20.05-11 31.35-10.59a63.28 63.28 0 0117.2 3.16 80.2 80.2 0 018.22 3.16c1.53.67 6 3.83 6.43 1.82.64-3.07-7.87-9-9.95-10.39a51.408 51.408 0 00-13.2-6.03z"
            />
            <path
              ref="line_1"
              d="M332.102 103.587l14.11 25c2.37 4.2 8.86.43 6.48-3.79l-14.09-24.96c-2.37-4.21-8.85-.43-6.48 3.78l-.02-.03z"
            />
            <path
              ref="line_2"
              d="M329.602 199.777l-20.94 19.63c-3.53 3.31 1.78 8.6 5.3 5.3l20.94-19.62c3.53-3.31-1.78-8.61-5.3-5.31z"
            />
            <path
              ref="line_3"
              d="M356.022 223.997l-4.77 16.59c-1.34 4.65 5.9 6.63 7.23 2l4.77-16.54c1.34-4.64-5.89-6.63-7.23-2v-.05z"
            />
            <path
              ref="line_4"
              d="M392.982 216.717l14.11 25c2.37 4.2 8.85.43 6.47-3.79l-14.1-25c-2.38-4.2-8.86-.43-6.48 3.78v.01z"
            />
            <path
              ref="line_5"
              d="M422.412 190.197l22.42 6c4.66 1.26 6.66-6 2-7.23l-22.42-6c-4.66-1.25-6.65 6-2 7.23z"
            />
            <path
              ref="line_6"
              d="M436.702 116.007l-15.81 16.73c-3.31 3.51 2 8.82 5.3 5.31l15.81-16.74c3.32-3.51-2-8.82-5.3-5.3z"
            />
            <path
              ref="line_7"
              d="M386.972 100.837l-5.31 14.85c-1.63 4.55 5.61 6.51 7.23 2l5.31-14.85c1.63-4.55-5.61-6.51-7.23-2z"
            />
            <path
              ref="line_8"
              d="M299.652 150.367l22.66 7.22c4.61 1.46 6.59-5.77 2-7.24l-22.71-7.21c-4.61-1.47-6.58 5.77-2 7.23h.05z"
            />
          </g>
          <g id="cloud">
            <path filter="url(#turb2)"
              id="cloud bg"
              d="M539 195.21c-2.33-16.65-13.81-52.07-78.34-40.88-.23-18.74-6.84-39.17-16.27-54.27-16-26.4-61.3-32.06-84.88-17C359.46 34 312.3 2 272.69 1c-63.36-1.51-90.55 50.15-88.51 87.71-34.42-15.71-70.89-5.34-82.74 21-20.73-5.06-44.22-6.4-63 5.12C21.73 125.12 9.55 142.51 4 161.15c-8.64 29.1 1.88 62.39 24.19 83 10 9.2 22.39 16.17 35.85 17.79 13.46 1.62 28-2.67 37-12.78 2.33-2.6 4.73-5.8 8.22-6 2.7-.16 5.1 1.57 7.31 3.12 35.43 24.91 88.43 20.85 119.69-9.22 30.68 23.67 53.09 29.32 75.72 28.06 12.58-.7 34-5 56.59-19.49 55.34 25.78 100.9-9.4 101.45-9.53.55-.13 12.49 8 18.53 10.08 9.95 3.48 21.41 1.81 30.36-3.75 15.64-9.72 22.52-29.43 20.09-47.22z"
              fill="#DCEDF6"
            />
            <path
              ref="swirl_5"
              id="swirl-5"
              d="M410.48 194.65a35.114 35.114 0 008.72-1.15c6.69-1.72 12.85-5 18.93-8.28 25.31-13.57 58.11-33.15 83.24-9.91 19.72 18.23 13.35 54.44-14.43 63.52-7.46 2.44-15.87 2.5-22.79-.79-9.22-4.37-14.59-14-16.23-23.85-.65-3.9-.77-8.08 1-11.72 1.77-3.64 5.92-6.49 10-5.82 6.09 1 8 8.5 7.22 14.43-.78 5.93-3.11 12.21-.66 17.62 3.25 7.18 13.48 8.93 21.38 6.43 10.3-3.27 18.49-12.32 20.39-22.52 2.27-12.21-4.42-22-13.58-29.38-12-9.66-30.16-9-44.59-5-16.45 4.65-29.66 15.7-45.67 20.84-9.23 3-19.06 2.16-26.1-4.5a22.078 22.078 0 01-6.62-18.87c-1.51 6.48 2.53 13.22 8.48 16.36a23.988 23.988 0 0011.31 2.59z"
              fill="#E4F5FD"
            />
            <path
              ref="swirl_4"
              id="swirl-4"
              d="M335.9 117.84c15.59-7.94 26.86-22.31 42.62-29.95C401 77 428 88.86 441.31 108.49a48.693 48.693 0 017.54 32.44c-1.75 14.22-11.59 27-25.19 31.81-15.51 5.46-30.05 4.22-39.21-8.54-3.85-5.37-6.77-13.09-2.6-18.22 7.9-9.7 16.73.37 22.19 7.14 9.3 11.53 20.42 15.65 32.37 4.36 7.3-6.9 9.76-17.93 7.86-27.8a38.872 38.872 0 00-22.33-27.82c-22.08-9.54-41.28 5.64-59.08 16.79-18.08 11.33-37.73 19.72-58.7 10.6-10.4-4.53-19.53-11.48-28.55-18.36 11.94 9.11 25.44 12.8 40.38 12.2a47.239 47.239 0 0019.91-5.25z"
              fill="#E4F5FD"
            />
            <path
              ref="swirl_3"
              id="swirl-3"
              d="M327.06 186.77c-6.8-34.52-27.31-47.18-57.1-53-14.12-2.74-28.37-6.09-39.9-13.82-21.25-14.23-23.94-44.39-8.14-68.21 11.77-17.74 32.37-29.61 52.59-31.65a65.767 65.767 0 0153 18.64c7 7.06 12.57 16 13.84 26.34 1.27 10.34-2.23 22.18-10.52 30-5.26 5-12 8-18.74 9.93-16 4.56-32.87 3.2-46.42-3.76-2.95-1.52-5.83-3.37-7.58-6.16a9.548 9.548 0 01-.23-9.9c2.69-4.4 8.81-5.67 13.28-4.26 4.47 1.41 7.81 4.75 11.37 7.62 9.54 7.69 24 12.16 35.78 4.71 8.95-5.69 13.46-17.06 12.38-26.76-1.08-9.7-6.88-17.79-14.09-23.74-11.61-9.58-27.26-14.42-43.4-13.43-8.87.54-18.08 2.9-25.89 8.13a49.59 49.59 0 00-16.73 19.8c-6.68 13.94-6.92 30.05-.63 42.47 8.62 17.1 26.67 21.28 44.22 26.28 19 5.43 38.54 10.9 51.74 25.59 21.26 23.65 18.61 61-14.18 80.87 7.03-7.11 21.52-14.36 15.35-45.69z"
              fill="#E4F5FD"
            />
            <path
              ref="swirl_2"
              id="swirl-2"
              d="M211.12 118.4a35.994 35.994 0 01-7.13-.81C187.41 114 175 102 159.3 96.52c-23.83-8.25-46.58 11.8-48.34 35.75-1.28 17.54 11.19 35.63 28.46 38.93 17.27 3.3 36.37-10.54 37-28.11.14-4-.64-8.12-3.14-11.19-2.5-3.07-7-4.7-10.59-3.07-4.87 2.22-5.84 8.75-5.07 14 .77 5.25 2.59 10.79.76 15.82-2.44 6.75-10.71 9.76-17.83 8.91-15.77-1.89-27-19.77-23.22-35.21 7.23-29.88 40.34-26.33 61.59-16.29 8.16 3.86 16.56 7.76 25.56 8.42 7.8.57 17.68-1.77 21.93-8.73a47.592 47.592 0 01-15.29 2.65z"
              fill="#E4F5FD"
            />
            <path
              ref="swirl_1"
              class="swirl"
              id="swirl-1"
              d="M121.69 190.32c-20.59-20.22-27.62-58.23-60.18-60-9-.48-17.29 4.23-23.69 10.29-30.41 28.77-33.09 90.63 17.26 102.91 13.09 3.2 30.07-2.22 33.12-16.59.77-3.63.36-7.9-2.32-10.61-3.13-3.16-8.38-3.09-12.12-1-7.87 4.35-14.89 16.67-24.53 17.19C39.22 233 32 221.06 30 212.24c-4.74-20.83 5.89-54.29 30-56.42 8.64-.77 16.78 5 23 11.35 12.74 13 21.23 29.11 38.28 37.07 12.54 5.85 28.22 7.94 41.72 4.81 11.88-2.74 23-10.57 27.49-21.92-13.42 10.5-30.56 18-47.32 14.84a40.867 40.867 0 01-21.48-11.65z"
              fill="#E4F5FD"
            />
          </g>
          <g id="wind" fill="#E4F5FD">
            <path
              id="wind-large"
              d="M524.43 265.62c12.68-6.67 21.76-18.57 34.58-25 18.29-9.16 40.58.25 51.66 16.19a39.897 39.897 0 016.53 26.49c-1.28 11.66-9.2 22.27-20.29 26.33-12.64 4.64-24.57 3.78-32.21-6.57-3.21-4.36-5.68-10.65-2.32-14.89 6.36-8 13.71.11 18.25 5.6 7.74 9.34 16.89 12.6 26.56 3.22 5.91-5.73 7.8-14.79 6.14-22.86a31.801 31.801 0 00-18.6-22.54C576.55 244 561 256.66 546.52 266c-14.68 9.48-30.69 16.56-48 9.32-8.57-3.59-16.12-9.19-23.58-14.73 9.88 7.34 21 10.21 33.21 9.56a38.694 38.694 0 0016.28-4.53z"
            />
            <path
              id="wind-small"
              d="M600 224.9a26.107 26.107 0 014.84 1.86c11 5.52 17.46 16.21 27.46 22.86 15.18 10.1 34.74.2 40.32-16.24 4.08-12-1.36-27-12.85-32.41-11.49-5.41-27.37.77-31 13a12.126 12.126 0 00.17 8.4c1.19 2.6 4 4.56 6.86 4.07 3.81-.67 5.67-5.06 6.09-8.91.42-3.85.15-8 2.34-11.21 2.94-4.28 9.27-4.89 14.1-3 10.7 4.18 15.28 18.73 9.86 28.86-10.49 19.59-33 11.1-46.07.21-5-4.18-10.18-8.44-16.36-10.53-5.35-1.82-12.69-2-16.93 2.13a34.293 34.293 0 0111.17.91z"
            />
          </g>
          <g
            id="answer"
            fill="#231F20"
            font-family="Roboto"
            letter-spacing="0em"
          >
            <text
              id="Relax"
              xml:space="preserve"
              style="white-space: pre;"
              font-size="100"
            >
              <tspan x="145" y="180.68">Relax</tspan>
            </text>
            <text
              id="with me"
              xml:space="preserve"
              style="white-space: pre;"
              font-size="39"
            >
              <tspan x="247.33" y="223.44">with me</tspan>
            </text>
          </g>
        </g>
      </svg>
    </transition>
  </div>
</template>

<script>
export default {
  name: "App",
  data: function () {
    return {
      initialTL: gsap.timeline(),
      clickTL: gsap.timeline(),
    }
  },
  methods: {
    enter(el, done) {
      this.initialTL.pause();
      let sun = this.$refs.sun;
      let lines = [this.$refs.line_1, this.$refs.line_2, this.$refs.line_3, this.$refs.line_4, this.$refs.line_5,
                  this.$refs.line_6,
                  this.$refs.line_7,
                  this.$refs.line_8];  this.clickTL.add("s");
      this.clickTL.to(sun, {
        x:50,
        y:-100,
        duration: 1
      },"s")
      .to(sun, {
        transformOrigin: "center center",
        rotate: 270,
        duration: 4
      },"s")
      .to(lines, {
        stagger: {
          each: 0.05,
          ease: "none",
          from: "center"
        },
        y:gsap.utils.wrap([-4,4]),
        opacity: gsap.utils.wrap([0.1,0.2,0.4,0.5]),
        yoyo: true,
        repeat: 5
      },"s")
    }
  },
  mounted: function (done) {
    let cloud = this.$refs.cloud;
let swirl = [this.$refs.swirl_1, this.$refs.swirl_2, this.$refs.swirl_3, this.$refs.swirl_4, this.$refs.swirl_5];

this.initialTL.add("s");
this.initialTL.timeScale(1.5);
this.initialTL
  .to("#turb",{
  duration: 4,
  repeat: -1,
  yoyo: true,
    attr: { baseFrequency: "0, 0",       ease: "back.out(1.7)" }
  },"s")
    .to(cloud, {
     duration: 5,
     x: -10,
     repeat: -1,
     yoyo: true,
},"s")
    .to(swirl, {
    stagger: {
          each: 0.1,
          ease: "none",
          from: "center"
        },
    ease: "none",
strokeDashoffset: gsap.utils.wrap([150, 250]),
    repeat: -1,
},"s")
    
  }
};
</script>

<style>
/* CSS reset */
*,
*::after,
*::before {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
}

body {
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
}

svg {
  position: relative;
  width: 400px;
}
text {
  font-family: zubilo-black, sans-serif;

}
 .swirl {
    stroke: #DCEDF6;
    stroke-width: 3;
    stroke-linejoin: round;
    stroke-dasharray: 100;
  }
</style>

              
            
!
999px

Console