HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URL's 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 it's URL and the proper URL extention.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<body>
<div class="warning">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/590856/icon.svg">
<h1>Seasons</h1>
<p>Screen size must be wider than 768px.</p>
<p>Please consider trying this demo on a larger screen.</p>
</div>
<div class="loader">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 28 40">
<line fill="none" stroke="#FFFFFF" stroke-width="5" stroke-linecap="round" stroke-miterlimit="10" x1="13.643" y1="32.618" x2="13.643" y2="12.854" />
<path fill="#FFFFFF" d="M27,0c0,0-17.641,4.397-13.334,19.975C13.666,19.975,30.839,16.97,27,0z" />
<path fill="#FFFFFF" d="M1,0c0,0-5.185,15.382,12.674,19.975C13.674,19.975,20.027,5.638,1,0z" />
<path fill="#FFFFFF" d="M21.543,30.805c-0.257-2.371-2.242-4.224-4.681-4.224c-1.255,0-2.389,0.497-3.236,1.295
c-0.947-0.806-2.172-1.295-3.513-1.295c-2.677,0-4.895,1.94-5.339,4.49c-1.766,0.912-2.906,2.333-2.906,3.935
c0,2.753,3.356,4.984,7.497,4.984c1.498,0,2.891-0.295,4.062-0.799c1.191,0.576,2.639,0.917,4.205,0.917
c4.047,0,7.327-2.258,7.327-5.043C24.959,33.27,23.593,31.699,21.543,30.805z" />
</svg>
<span class="loader-bar"><span></span></span>
</div>
<progress class="progress-bar" max="100" value="0"></progress>
<main>
<div id="animation-container">
<svg version="1.1" id="drawing" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 800 600">
<filter id="blurFilter" x="-20%" y="-20%" width="140%" height="140%" filterUnits="objectBoundingBox" primitiveUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="2" x="0%" y="0%" width="100%" height="100%" in="SourceGraphic" edgeMode="none" result="blur2" />
</filter>
<g id="cloudGroup">
<g id="sun">
<circle fill="#FFD97D" cx="488.987" cy="67.053" r="13.817" />
<g>
<line fill="none" stroke="#FFDB8C" stroke-width="2" stroke-linecap="round" stroke-miterlimit="10" x1="501.352" y1="54.175" x2="505.405" y2="50.122" />
<line fill="none" stroke="#FFDB8C" stroke-width="2" stroke-linecap="round" stroke-miterlimit="10" x1="489.001" y1="43.39" x2="489.001" y2="49.766" />
<line fill="none" stroke="#FFDB8C" stroke-width="2" stroke-linecap="round" stroke-miterlimit="10" x1="502.31" y1="79.984" x2="506.363" y2="84.037" />
<line fill="none" stroke="#FFDB8C" stroke-width="2" stroke-linecap="round" stroke-miterlimit="10" x1="511.861" y1="66.967" x2="506.385" y2="66.967" />
<line fill="none" stroke="#FFDB8C" stroke-width="2" stroke-linecap="round" stroke-miterlimit="10" x1="476.209" y1="54.466" x2="472.156" y2="50.413" />
<line fill="none" stroke="#FFDB8C" stroke-width="2" stroke-linecap="round" stroke-miterlimit="10" x1="465.992" y1="67.151" x2="471.468" y2="67.151" />
<line fill="none" stroke="#FFDB8C" stroke-width="2" stroke-linecap="round" stroke-miterlimit="10" x1="475.878" y1="80.276" x2="471.825" y2="84.329" />
<line fill="none" stroke="#FFDB8C" stroke-width="2" stroke-linecap="round" stroke-miterlimit="10" x1="488.895" y1="90.229" x2="488.895" y2="84.351" />
</g>
</g>
<defs>
<filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="200.535" y="41.98" width="403.077" height="70.625">
<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0" />
</filter>
</defs>
<mask maskUnits="userSpaceOnUse" x="200.535" y="41.98" width="403.077" height="70.625" id="clouds_1_">
<g filter="url(#Adobe_OpacityMaskFilter)">
<g id="cloudsMasked_2_">
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="238.1267" y1="43.1481" x2="238.1267" y2="76.0047">
<stop offset="0" style="stop-color:#FFFFFF" />
<stop offset="0.6006" style="stop-color:#FCFCFC;stop-opacity:0.9967" />
<stop offset="0.7103" style="stop-color:#A8A8A8;stop-opacity:0.9152" />
<stop offset="0.8145" style="stop-color:#606060;stop-opacity:0.8378" />
<stop offset="0.9003" style="stop-color:#2C2C2C;stop-opacity:0.7741" />
<stop offset="0.9646" style="stop-color:#0C0C0C;stop-opacity:0.7263" />
<stop offset="1" style="stop-color:#000000;stop-opacity:0.7" />
</linearGradient>
<path fill="url(#SVGID_1_)" d="M203.003,76.005h70.247c0-17.182-15.088-32.857-33.7-32.857
C220.938,43.148,203.003,58.822,203.003,76.005z" />
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="568.7192" y1="41.9797" x2="568.7192" y2="79.5105">
<stop offset="0" style="stop-color:#FFFFFF" />
<stop offset="0.6006" style="stop-color:#FCFCFC;stop-opacity:0.9967" />
<stop offset="0.7103" style="stop-color:#A8A8A8;stop-opacity:0.9152" />
<stop offset="0.8145" style="stop-color:#606060;stop-opacity:0.8378" />
<stop offset="0.9003" style="stop-color:#2C2C2C;stop-opacity:0.7741" />
<stop offset="0.9646" style="stop-color:#0C0C0C;stop-opacity:0.7263" />
<stop offset="1" style="stop-color:#000000;stop-opacity:0.7" />
</linearGradient>
<path fill="url(#SVGID_2_)" d="M603.612,79.51h-69.786c0-17.701,19.754-37.531,37.455-37.531
C595.982,41.98,603.612,61.809,603.612,79.51z" />
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="301.0073" y1="50.2381" x2="301.0073" y2="112.4006">
<stop offset="0" style="stop-color:#FFFFFF" />
<stop offset="0.6006" style="stop-color:#FCFCFC;stop-opacity:0.9967" />
<stop offset="0.7103" style="stop-color:#A8A8A8;stop-opacity:0.9152" />
<stop offset="0.8145" style="stop-color:#606060;stop-opacity:0.8378" />
<stop offset="0.9003" style="stop-color:#2C2C2C;stop-opacity:0.7741" />
<stop offset="0.9646" style="stop-color:#0C0C0C;stop-opacity:0.7263" />
<stop offset="1" style="stop-color:#000000;stop-opacity:0.7" />
</linearGradient>
<path fill="url(#SVGID_3_)" d="M401.48,112.336c0,0-2.375-19.349-26.825-17.842c-5.075,0.313-10.143-1.114-14.214-4.161
c-2.796-2.093-5.661-5.158-7.807-9.681c-5.723-12.062-27.795-6.135-27.795-6.135s-8.993,2.453-18.803-9.401
c-9.81-11.854-23.095-13.08-28.204-13.08c-4.881,0-16.104,0-28.144,7.84c-1.437,0.936-3.034,1.612-4.723,1.91
c-2.316,0.408-5.678,0.65-9.074-0.335c-2.576-0.747-4.834-2.295-6.643-4.275c-1.831-2.003-4.61-6.933-19.013-6.936
c-5.091-0.001-9.699,4.157-9.699,4.157v58.005L401.48,112.336z" />
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="502.546" y1="49.458" x2="502.546" y2="112.3355">
<stop offset="0" style="stop-color:#FFFFFF" />
<stop offset="0.6006" style="stop-color:#FCFCFC;stop-opacity:0.9967" />
<stop offset="0.7103" style="stop-color:#A8A8A8;stop-opacity:0.9152" />
<stop offset="0.8145" style="stop-color:#606060;stop-opacity:0.8378" />
<stop offset="0.9003" style="stop-color:#2C2C2C;stop-opacity:0.7741" />
<stop offset="0.9646" style="stop-color:#0C0C0C;stop-opacity:0.7263" />
<stop offset="1" style="stop-color:#000000;stop-opacity:0.7" />
</linearGradient>
<path fill="url(#SVGID_4_)" d="M401.48,112.336c0,0,3.563-20.157,28.012-18.65c5.075,0.313,10.143-1.114,14.214-4.161
c2.796-2.093,5.661-5.158,7.807-9.681c5.723-12.062,27.795-6.135,27.795-6.135s8.993,2.453,18.803-9.401
c9.81-11.854,23.095-13.08,28.204-13.08c4.881,0,16.104,0,28.144,7.84c1.437,0.936,3.034,1.612,4.723,1.91
c2.316,0.408,5.678,0.65,9.074-0.335c2.576-0.747,4.834-2.295,6.643-4.275c1.795-1.964,5.071-7.16,16.042-6.899
c6.662-0.001,12.671,6.598,12.671,6.598v56.27H401.48z" />
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="406.6246" y1="69.3636" x2="406.6246" y2="112.4006">
<stop offset="0" style="stop-color:#FFFFFF" />
<stop offset="0.6006" style="stop-color:#FCFCFC;stop-opacity:0.9967" />
<stop offset="0.7103" style="stop-color:#A8A8A8;stop-opacity:0.9152" />
<stop offset="0.8145" style="stop-color:#606060;stop-opacity:0.8378" />
<stop offset="0.9003" style="stop-color:#2C2C2C;stop-opacity:0.7741" />
<stop offset="0.9646" style="stop-color:#0C0C0C;stop-opacity:0.7263" />
<stop offset="1" style="stop-color:#000000;stop-opacity:0.7" />
</linearGradient>
<path fill="url(#SVGID_5_)" d="M523.288,112.401c0-11.685-10.101-23.904-19.543-29.822l-0.046-0.029
c0.046,0.029-17.471-13.036-33.273-13.036c-7.242,0-13.518,2.76-20.278,9.02c-1.532,1.419-3.357,2.512-5.365,3.088
c-0.773,0.222-1.545,0.38-2.303,0.488c-4.334,0.616-8.751-0.428-12.477-2.727c-2.519-1.554-4.994-2.769-7.376-3.724
c-6.521-3.007-12.637-3.464-15.739-3.464c-0.58,0-1.252,0-2.001,0.014c-0.749-0.013-1.421-0.014-2.001-0.014
c-3.102,0-9.217,0.457-15.739,3.464c-2.705,1.085-5.53,2.505-8.403,4.376c-1.437,0.936-3.034,1.612-4.723,1.91
c-2.79,0.492-7.099,0.741-11.154-1.102c-1.753-0.797-3.246-2.051-4.537-3.479c-1.339-1.481-8.669-6.627-16.119-7.773
c-0.341-0.052-0.688-0.137-1.049-0.152c-14.272-0.59-22.708,2.335-33.854,9.068l-2.093,1.383
c-1.147,0.617-2.212,1.76-3.259,2.533c-9.284,6.851-10.942,18.361-11.995,29.979H523.288z" />
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="404.8875" y1="112.6043" x2="404.8875" y2="112.6043">
<stop offset="0" style="stop-color:#FFFFFF" />
<stop offset="0.6006" style="stop-color:#FCFCFC;stop-opacity:0.9967" />
<stop offset="0.7103" style="stop-color:#A8A8A8;stop-opacity:0.9152" />
<stop offset="0.8145" style="stop-color:#606060;stop-opacity:0.8378" />
<stop offset="0.9003" style="stop-color:#2C2C2C;stop-opacity:0.7741" />
<stop offset="0.9646" style="stop-color:#0C0C0C;stop-opacity:0.7263" />
<stop offset="1" style="stop-color:#000000;stop-opacity:0.7" />
</linearGradient>
<polyline fill="url(#SVGID_6_)" points="329.68,112.604 355.88,112.604 453.895,112.604 480.095,112.604 " />
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="528.9133" y1="72.1609" x2="528.9133" y2="112.6043">
<stop offset="0" style="stop-color:#FFFFFF" />
<stop offset="0.6006" style="stop-color:#FCFCFC;stop-opacity:0.9967" />
<stop offset="0.7103" style="stop-color:#A8A8A8;stop-opacity:0.9152" />
<stop offset="0.8145" style="stop-color:#606060;stop-opacity:0.8378" />
<stop offset="0.9003" style="stop-color:#2C2C2C;stop-opacity:0.7741" />
<stop offset="0.9646" style="stop-color:#0C0C0C;stop-opacity:0.7263" />
<stop offset="1" style="stop-color:#000000;stop-opacity:0.7" />
</linearGradient>
<path fill="url(#SVGID_7_)" d="M454.214,112.604c0,0,4.039-6.539,14.833-6.405l4.524-0.004c0,0,7.256-0.31,11.063-5.998
c3.278-4.898,10.243-8.136,13.573-8.941c0.65-0.157,1.324-0.187,1.99-0.121c3.644,0.362,20.614,1.616,25.644-5.763
c4.212-6.18,16.662-10.526,24.679-10.436c7.127,0.08,13.389,0.541,22.176,5.229c3.797,2.026,8.252,2.529,12.337,1.177
c1.975-0.654,4.134-1.698,6.321-3.338c7.791-5.843,12.259-5.843,12.259-5.843v40.443H454.214z" />
<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="275.2411" y1="71.9573" x2="275.2411" y2="112.4006">
<stop offset="0" style="stop-color:#FFFFFF" />
<stop offset="0.6006" style="stop-color:#FCFCFC;stop-opacity:0.9967" />
<stop offset="0.7103" style="stop-color:#A8A8A8;stop-opacity:0.9152" />
<stop offset="0.8145" style="stop-color:#606060;stop-opacity:0.8378" />
<stop offset="0.9003" style="stop-color:#2C2C2C;stop-opacity:0.7741" />
<stop offset="0.9646" style="stop-color:#0C0C0C;stop-opacity:0.7263" />
<stop offset="1" style="stop-color:#000000;stop-opacity:0.7" />
</linearGradient>
<path fill="url(#SVGID_8_)" d="M349.947,112.336c0,0-4.054-6.474-14.848-6.34l-4.524-0.004c0,0-7.256-0.31-11.063-5.998
c-3.278-4.898-10.243-8.136-13.573-8.941c-0.65-0.157-1.324-0.187-1.99-0.121c-3.644,0.362-20.614,1.616-25.644-5.763
c-4.212-6.18-16.662-10.526-24.679-10.436c-7.127,0.08-13.389,0.541-22.176,5.229c-3.797,2.026-8.252,2.529-12.337,1.177
c-1.975-0.654-4.134-1.698-6.321-3.338c-7.791-5.843-12.259-5.843-12.259-5.843v40.443L349.947,112.336z" />
</g>
</g>
</mask>
<g id="clouds" mask="url(#clouds_1_)">
<path fill="#FFFFFF" d="M203.003,76.005h70.247c0-17.182-15.088-32.857-33.7-32.857C220.938,43.148,203.003,58.822,203.003,76.005
z" />
<path fill="#FFFFFF" d="M603.612,79.51h-69.786c0-17.701,19.754-37.531,37.455-37.531C595.982,41.98,603.612,61.809,603.612,79.51
z" />
<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="301.0073" y1="112.4006" x2="301.0073" y2="50.2381">
<stop offset="0" style="stop-color:#EDF0FF" />
<stop offset="1" style="stop-color:#FFFFFF" />
</linearGradient>
<path fill="url(#SVGID_9_)" d="M401.48,112.336c0,0-2.375-19.349-26.825-17.842c-5.075,0.313-10.143-1.114-14.214-4.161
c-2.796-2.093-5.661-5.158-7.807-9.681c-5.723-12.062-27.795-6.135-27.795-6.135s-8.993,2.453-18.803-9.401
c-9.81-11.854-23.095-13.08-28.204-13.08c-4.881,0-16.104,0-28.144,7.84c-1.437,0.936-3.034,1.612-4.723,1.91
c-2.316,0.408-5.678,0.65-9.074-0.335c-2.576-0.747-4.834-2.295-6.643-4.275c-1.831-2.003-4.61-6.933-19.013-6.936
c-5.091-0.001-9.699,4.157-9.699,4.157v58.005L401.48,112.336z" />
<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="502.546" y1="112.3355" x2="502.546" y2="49.458">
<stop offset="0" style="stop-color:#EDF0FF" />
<stop offset="1" style="stop-color:#FFFFFF" />
</linearGradient>
<path fill="url(#SVGID_10_)" d="M401.48,112.336c0,0,3.563-20.157,28.012-18.65c5.075,0.313,10.143-1.114,14.214-4.161
c2.796-2.093,5.661-5.158,7.807-9.681c5.723-12.062,27.795-6.135,27.795-6.135s8.993,2.453,18.803-9.401
c9.81-11.854,23.095-13.08,28.204-13.08c4.881,0,16.104,0,28.144,7.84c1.437,0.936,3.034,1.612,4.723,1.91
c2.316,0.408,5.678,0.65,9.074-0.335c2.576-0.747,4.834-2.295,6.643-4.275c1.795-1.964,5.071-7.16,16.042-6.899
c6.662-0.001,12.671,6.598,12.671,6.598v56.27H401.48z" />
<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="406.6246" y1="112.4006" x2="406.6246" y2="69.3636">
<stop offset="0" style="stop-color:#EDF0FF" />
<stop offset="0.4545" style="stop-color:#F7F9FF" />
<stop offset="1" style="stop-color:#FFFFFF" />
</linearGradient>
<path fill="url(#SVGID_11_)" d="M523.288,112.401c0-11.685-10.101-23.904-19.543-29.822l-0.046-0.029
c0.046,0.029-17.471-13.036-33.273-13.036c-7.242,0-13.518,2.76-20.278,9.02c-1.532,1.419-3.357,2.512-5.365,3.088
c-0.773,0.222-1.545,0.38-2.303,0.488c-4.334,0.616-8.751-0.428-12.477-2.727c-2.519-1.554-4.994-2.769-7.376-3.724
c-6.521-3.007-12.637-3.464-15.739-3.464c-0.58,0-1.252,0-2.001,0.014c-0.749-0.013-1.421-0.014-2.001-0.014
c-3.102,0-9.217,0.457-15.739,3.464c-2.705,1.085-5.53,2.505-8.403,4.376c-1.437,0.936-3.034,1.612-4.723,1.91
c-2.79,0.492-7.099,0.741-11.154-1.102c-1.753-0.797-3.246-2.051-4.537-3.479c-1.339-1.481-8.669-6.627-16.119-7.773
c-0.341-0.052-0.688-0.137-1.049-0.152c-14.272-0.59-22.708,2.335-33.854,9.068l-2.093,1.383c-1.147,0.617-2.212,1.76-3.259,2.533
c-9.284,6.851-10.942,18.361-11.995,29.979H523.288z" />
<linearGradient id="SVGID_12_" gradientUnits="userSpaceOnUse" x1="404.8875" y1="112.6043" x2="404.8875" y2="112.6043">
<stop offset="0" style="stop-color:#EDF0FF" />
<stop offset="0.4545" style="stop-color:#F7F9FF" />
<stop offset="1" style="stop-color:#FFFFFF" />
</linearGradient>
<polyline fill="url(#SVGID_12_)" points="329.68,112.604 355.88,112.604 453.895,112.604 480.095,112.604 " />
<linearGradient id="SVGID_13_" gradientUnits="userSpaceOnUse" x1="528.9133" y1="112.6043" x2="528.9133" y2="72.1609">
<stop offset="0" style="stop-color:#EDF0FF" />
<stop offset="0.0471" style="stop-color:#EFF2FF" />
<stop offset="0.2993" style="stop-color:#F4F9FF" />
<stop offset="1" style="stop-color:#F5FBFF" />
</linearGradient>
<path fill="url(#SVGID_13_)" d="M454.214,112.604c0,0,4.039-6.539,14.833-6.405l4.524-0.004c0,0,7.256-0.31,11.063-5.998
c3.278-4.898,10.243-8.136,13.573-8.941c0.65-0.157,1.324-0.187,1.99-0.121c3.644,0.362,20.614,1.616,25.644-5.763
c4.212-6.18,16.662-10.526,24.679-10.436c7.127,0.08,13.389,0.541,22.176,5.229c3.797,2.026,8.252,2.529,12.337,1.177
c1.975-0.654,4.134-1.698,6.321-3.338c7.791-5.843,12.259-5.843,12.259-5.843v40.443H454.214z" />
<linearGradient id="SVGID_14_" gradientUnits="userSpaceOnUse" x1="275.2411" y1="112.4006" x2="275.2411" y2="71.9573">
<stop offset="0" style="stop-color:#EDF0FF" />
<stop offset="0.0471" style="stop-color:#EFF2FF" />
<stop offset="0.2993" style="stop-color:#F4F9FF" />
<stop offset="1" style="stop-color:#F5FBFF" />
</linearGradient>
<path fill="url(#SVGID_14_)" d="M349.947,112.336c0,0-4.054-6.474-14.848-6.34l-4.524-0.004c0,0-7.256-0.31-11.063-5.998
c-3.278-4.898-10.243-8.136-13.573-8.941c-0.65-0.157-1.324-0.187-1.99-0.121c-3.644,0.362-20.614,1.616-25.644-5.763
c-4.212-6.18-16.662-10.526-24.679-10.436c-7.127,0.08-13.389,0.541-22.176,5.229c-3.797,2.026-8.252,2.529-12.337,1.177
c-1.975-0.654-4.134-1.698-6.321-3.338c-7.791-5.843-12.259-5.843-12.259-5.843v40.443L349.947,112.336z" />
</g>
</g>
<g id="tree">
<g id="trunkTopGroup">
<path id="trunkTop" fill="none" stroke="#7E665E" stroke-width="5" stroke-linecap="round" stroke-miterlimit="10" d="
M400.4,281.1v-44.3c0,0,0-18.1-0.4-65.4c0,0,0-20.7,12-33.2c3-3.1,6.7-5.3,10.7-6.8c7.4-2.7,25.7-10.8,38.1-28.5" />
<path id="top_snow" fill="#FFFFFF" d="M458.7,95.5c-3.8,1.2-5.4,5.6-3.6,9.1c1.7,3.3,4.8,7.4,8.7,6.3c3.1-0.9,4.2-3.9,4.4-6.7
c0.3-4-2.2-7.9-6.2-8.8C461,95.2,459.9,95.1,458.7,95.5C458.8,95.5,458.7,95.5,458.7,95.5z" />
<g id="lm_one">
<g id="lm_one_right">
<path fill="#6BDE84" d="M420,134.5c0,0,8.8-2.9,8.4,7.5C428.5,142,421,141.2,420,134.5z" />
</g>
<g id="lm_one_left">
<path fill="#6BDE84" d="M420.1,130.5c0,0-6.6-3.3-0.6-11.1C419.4,119.4,425.8,125.3,420.1,130.5z" />
</g>
</g>
<g id="lm_five">
<g id="lm_five_down">
<path fill="#6BDE84" d="M443.3,121.1c0,0,4,8.3,11.1,0.9C454.4,122,449.7,115.3,443.3,121.1z" />
<path fill="#6BDE84" d="M460.3,103.3c0,0,10.4,10.8,17.7-4.4C478,98.9,466.8,94.4,460.3,103.3z" />
</g>
<g id="lm_five_up">
<path fill="#6BDE84" d="M460.3,103.3c0,0,14.5-4.1,4.5-17.7C464.8,85.6,455.5,93.4,460.3,103.3z" />
</g>
</g>
</g>
<line id="trunkBot" fill="none" stroke="#7E665E" stroke-width="5" stroke-linecap="round" stroke-miterlimit="10" x1="400.4" y1="459.2" x2="400.4" y2="281.1" />
<g id="branches">
<g id="tm">
<g id="branchestm">
<g id="tm_three_g">
<path id="tm_three" fill="none" stroke="#7E665E" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" d="
M416.4,134.1c0,0,29.9-20.5,32-40.5c0,0,0.8-6.2-2.2-13.6" />
<g id="tm_snow_right">
<path fill="#FFFFFF" d="M440.5,105.9c0.1-0.1,0.3,0,0.3,0.1c0,0.7-0.1,2.5-1.5,5.3c-1.6,3.2-6.4,7.1-8.4,7.5
c-0.2,0.1-0.5-0.3-0.5-0.5c0.7-3.2,5.2-6.7,5.2-6.7c0.2-0.3,0.4-0.6,0.7-0.9L440.5,105.9z" />
<path fill="#FFFFFF" d="M444.7,84.8c0,0,6,2.3,6.8,0s-3.7-9.5-6.1-9.6c-0.8,0-1.5,0.7-1.9,1.8c-1,2.5-0.6,5.4,1,7.5
L444.7,84.8z" />
</g>
</g>
<g id="tm_two_g">
<path id="tm_two" fill="none" stroke="#7E665E" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" d="
M408,144.1c0,0-24.9-17.8-27.3-37.7" />
<g id="tm_snow_left">
<path fill="#FFFFFF" d="M389.945,121.344L389.9,121.4c-0.2,0.7-0.1,5.1,4.5,8.8s5.515,3.388,5.815,3.288l0,0
c-0.2-0.2-0.415-1.788-1.615-3.088c-0.8-0.9-1.5-2.5-2.5-3.7c-0.8-0.9-2-1.3-2.8-2.2
C392.2,123.1,390.645,122.344,389.945,121.344z" />
<path fill="#FFFFFF" d="M379.7,101.2c0.6-0.3,1.3-0.3,1.8,0c0.9,0.6,2.2,1.6,2.4,2.7c0.2,1.2-0.8,2.6-1.3,3.2
c-0.2,0.2-0.4,0.4-0.7,0.5c-0.9,0.4-3.3,1.5-4,0.8C377.1,107.7,375.4,103.8,379.7,101.2z" />
</g>
</g>
</g>
<g id="lMid">
<g id="lm_three">
<g id="lm_three_right">
<path fill="#6BDE84" d="M398.1,133.2c0,0-3.5-4.4,1.7-7.9C399.7,125.4,403.7,130.7,398.1,133.2L398.1,133.2z" />
<path fill="#6BDE84" d="M387.9,121.9c0,0-3.1-4.5,1.7-7.9C389.5,114,393.3,119,387.9,121.9L387.9,121.9z" />
<path fill="#6BDE84" d="M379,106.6c0,0-0.2-7.3,7.6-7.7c0,0,1,8.8-7.2,8L379,106.6z" />
</g>
<g id="lm_three_left">
<path fill="#6BDE84" d="M398.4,137.6c0,0-0.5,3.9-5.2,3.3c0,0-1.6-0.2-3-1.6C390.3,139.3,393.8,134.4,398.4,137.6z" />
<path fill="#6BDE84" d="M383.7,116.3c0,0-7.3,2.5-10.2-5.2C373.5,111,381.8,107.8,383.7,116.3L383.7,116.3z" />
<path fill="#6BDE84" d="M379.5,107c0,0-9.4-6.8-1.7-16.2C377.7,90.7,388.1,98.1,379.5,107L379.5,107z" />
</g>
</g>
<g id="lm_four">
<g id="lm_four_right">
<path fill="#6BDE84" d="M447.1,100.1c0,0,1.8-5,7.6-2.6C454.7,97.5,452.6,103.4,447.1,100.1L447.1,100.1z" />
<path fill="#6BDE84" d="M448.7,90.9c0,0-0.8-6.9,6.5-8C455.2,82.9,456.9,91,448.7,90.9L448.7,90.9z" />
<path fill="#6BDE84" d="M454.3,70.4c0,0-1.1,12.1-9.4,10.3C444.9,80.8,444.4,71.2,454.3,70.4z" />
</g>
<g id="lm_four_left">
<path fill="#6BDE84" d="M424.6,109.3c0,0,10.4,1.1,7.6,9.7C432.2,119,422.5,119.4,424.6,109.3L424.6,109.3z" />
<path fill="#6BDE84" d="M443.3,105.7c0,0-3.5,0.8-4.5-2.8c-0.2-0.7-0.3-1.2-0.3-2c0-1.3,0.7-2.4,0.7-2.4
S446.1,100.8,443.3,105.7z" />
<path fill="#6BDE84" d="M447.1,95.9c0,0-7.8-0.3-7.8-8.6C439.4,87.3,448.7,87.3,447.1,95.9L447.1,95.9z" />
<path fill="#6BDE84" d="M436.2,71.5c0,0,12.1,1.1,10.3,9.4C446.5,80.9,437,81.5,436.2,71.5z" />
</g>
</g>
</g>
</g>
<g id="treeRight">
<g id="br">
<g id="branchesRightBot">
<path id="br_root" fill="none" stroke="#7E665E" stroke-width="8" stroke-linecap="round" stroke-miterlimit="10" d="
M400.7,268.4c0,0,6-14.9,14.1-21.8c11.8-10,32.4-18.5,42.2-18.8c15.8-0.5,49.1,5,71.8-17.9" />
</g>
<g id="br_snow">
<path fill="#FFFFFF" d="M479.2,223.8c1.3-0.8,7.8-4.6,20.7-2.5c0.1,0,0.186,0.158,0.1,0.2c-1.2,0.8-6.5,4.2-9.9,4.2
c-4.5,0-9.6-1.4-10.8-1.7C479.2,224,479.106,223.864,479.2,223.8z" />
</g>
<g id="leavesRightBot">
<g id="br_root_leaves">
<g id="br_root_leaves_g2">
<path fill="#6BDE84" d="M529.7,208.1c0,0,10-5,11.4,7.5C541,215.6,532,216,529.7,208.1z" />
<path fill="#6BDE84" d="M530.5,209.1c0,0-9.2-6.4,1.1-13.6C531.7,195.5,536.3,203.3,530.5,209.1z" />
<path fill="#6BDE84" d="M488,228.5c0,0-1.4,5.6,5.3,6.6c0,0,3.8,0.1,4.6-0.8C497.9,234.4,492.7,226.6,488,228.5z" />
<path fill="#6BDE84" d="M506.6,224.2c0,0,1,5.7,7.5,4c0,0,3.5-1.4,3.9-2.5C518,225.7,510.1,220.6,506.6,224.2z" />
</g>
<g id="br_root_leaves_g1">
<path fill="#6BDE84" d="M433.6,233.6c0,0,11.2-5,12.1,8.7C445.7,242.3,435.9,242.3,433.6,233.6z" />
<path fill="#6BDE84" d="M433.9,234.6c0,0-5.6-8.3,5.3-10.9C439.1,223.6,440.5,231.5,433.9,234.6z" />
<path fill="#6BDE84" d="M460.8,229.3c0,0,9.3-5.8,11.8,6.2C472.6,235.4,463.9,236.6,460.8,229.3z" />
</g>
</g>
</g>
</g>
<g id="tr">
<g id="branchesRightTop">
<path id="tr_root" fill="none" stroke="#7E665E" stroke-width="8" stroke-linecap="round" stroke-miterlimit="10" d="
M400.4,252.6c0,0,22.8-54.4,41.3-72c0,0,14.3-15.4,37-22.4s42.4,2.6,42.4,2.6" />
<path id="tr_two" fill="none" stroke="#7E665E" stroke-width="7" stroke-linecap="round" stroke-miterlimit="10" d="
M416.5,218.7c0,0,5.8-17.2,43.3-19s43.8,1.5,63.3-15" />
<g id="tr_three">
<path id="tr_three_root" fill="none" stroke="#7E665E" stroke-width="5" stroke-linecap="round" stroke-miterlimit="10" d="
M417.2,213.9c0,0,2.3-9.7,0.1-17.4c-1.4-4.8-5.1-20.1,0.7-35.5c3.4-9,10-18.1,22.1-25.1c0,0,12-7,18.9-8" />
</g>
<g id="tr_four">
<path id="tr_four_root" fill="none" stroke="#7E665E" stroke-width="5" stroke-linecap="round" stroke-miterlimit="10" d="
M474.6,159.6c0,0-5-19.8,5.1-28.4s25.7-14.9,25.7-14.9" />
</g>
</g>
<g id="tr_snow">
<path display="none" fill="#FFFFFF" d="M498.2,134.2c-0.1,0,0,0.1,0,0.1c0.9,0.1,4,0.1,7.9-1.1c4.1-1.3,5.6-4.4,5.8-5.1
c0-0.1,0-0.1-0.1-0.1c-0.8,0.4-4.6,2.3-6.2,3C503.9,131.9,499.4,133.8,498.2,134.2z" />
<path fill="#FFFFFF" d="M437.5,133.9c-0.1,0.1-0.1,0.3,0.1,0.3c1.5,0.1,6.5,0.1,10.9-2.4c4.3-2.4,5.4-4.6,5.7-5.3
c0-0.1-0.1-0.2-0.2-0.2l-7.3,2.7c-1.1,0.4-2.2,0.9-3.3,1.5L437.5,133.9z" />
<path display="none" fill="#FFFFFF" d="M462.2,162.1c0.4,0.1,1.4,0.2,2.7,0.1c1-0.1,1.3-1.4,0.5-2s-1.7-1.1-2.5-1
c-1.5,0-1.2,1.9-1,2.6C461.9,161.9,462,162,462.2,162.1z" />
<path display="none" fill="#FFFFFF" d="M522,125.7c0.8,0.2,2.4-0.7,3.5-1.7c0.7-0.6,1.2-1.7,1.6-2.6c0.3-0.8,0.5-1.6,0.5-2.4
s-0.3-1.7-1.1-2.1c-0.6-0.3-4.5,1-5.8,2.8c-0.7,1-1.3,2.2-1.3,2.7C519.5,124,520.8,125.4,522,125.7L522,125.7z" />
<path fill="#FFFFFF" d="M487.286,152.223c0.8,0.3,5.037,1.721,16.837-0.079l0,0
C503.423,151.845,497.386,149.523,487.286,152.223L487.286,152.223z" />
<path fill="#FFFFFF" d="M418.5,195.8c0.1-0.3,0.4-0.6,0.7-0.7c1.6-0.6,6.6-2.4,8.4-1.1c2.2,1.6-6.5,11.1-6.5,11.1
S416.4,202.3,418.5,195.8z" />
<path fill="#FFFFFF" d="M490.9,194.9c1.7-0.8,8-3.3,19.8-5.5c0.1,0,0.2,0.2,0.1,0.3c-1.7,1.1-6.7,4.4-9.9,5.1
c-3.2,0.7-9.9,0.5-9.9,0.5C490.725,195.21,490.794,194.937,490.9,194.9z" />
<path fill="#FFFFFF" d="M519.7,183.4c-0.2-0.1-0.3-0.3-0.2-0.5c0.4-0.9,1.4-3.2,2.8-3.2c0.8,0,1.7,0.3,2.5,0.5
c0.9,0.3,1.5,1.2,1.5,2.1c0,0.4,0,0.7,0,0.7S524.7,185.5,519.7,183.4z" />
<path fill="#FFFFFF" d="M502.4,115.2c-0.1-0.2,0-0.5,0.1-0.7c0.6-0.9,2.3-2.9,4.9-1.9c3.2,1.3,1,7.1-2,6.4
C505.4,119,503.2,118,502.4,115.2z" />
<path fill="#FFFFFF" d="M443.8,172.8c1.2-2.4,5.7-9.7,16.9-11.5c0.2,0,0.3,0.2,0.2,0.4c-1.7,1.5-4.7,5-8.2,7.4
c-1.3,0.9-6.6,3.1-8.5,4.1C444,173.3,443.7,173,443.8,172.8z" />
</g>
<g id="leavesRightTop">
<g id="tr_four_root_leaves">
<g id="tr_four_root_leaves_g1">
<path fill="#6BDE84" d="M472.9,149.8c0,0,2.4-8.7-7.7-7.9C465.2,141.9,464.5,149.3,472.9,149.8z" />
</g>
<g id="tr_four_root_leaves_g2">
<path fill="#6BDE84" d="M505.4,115.3c0,0,10.1-5.9,11.9,6.6C517.3,121.9,508.1,123.1,505.4,115.3z" />
<path fill="#6BDE84" d="M478.7,122.5c0,0,3.4,8.9-3,10.5C475.7,133,472,126.6,478.7,122.5z" />
<path fill="#6BDE84" d="M505.4,115.3c0,0,4.3,3.7,8.5-0.4c0.9-0.8,1.5-1.9,2-3c0.6-1.3,1.3-3,0.9-3.8
C516.9,108.2,506.8,106.7,505.4,115.3z" />
<path fill="#6BDE84" d="M490.9,123.5c0,0,6.4-6,10.2,3.1C501,126.5,494.4,128.8,490.9,123.5z" />
<path fill="#6BDE84" d="M490.9,123.5c0,0,5.2-0.2,4.5-6.2c0,0-0.8-3.3-1.8-3.8C493.6,113.6,488,118.5,490.9,123.5z" />
</g>
</g>
<g id="tr_three_root_leaves">
<g id="tr_three_root_leaves_g2">
<path fill="#6BDE84" d="M456,128.6c0,0,12.3-7.8,15.7,8.2C471.7,136.8,460.1,138.4,456,128.6z" />
<path fill="#6BDE84" d="M421.5,151.5c0,0,5.4-2,2.6-8.1c0,0-1.3-2.6-3.2-3.4C420.9,140,415.8,147.5,421.5,151.5z" />
<path fill="#6BDE84" d="M456,128.6c0,0,7.8,3.6,10.8-5.5c0,0,1.1-5.3,0-6.6C466.8,116.4,453.9,120,456,128.6z" />
<path fill="#6BDE84" d="M436.7,137.6c0,0,7.5-5,9.8,4.8C446.5,142.3,439.4,143.6,436.7,137.6z" />
<path fill="#6BDE84" d="M436.7,137.6c0,0,8.4-2.6,2.4-10.4C439.1,127.1,432.2,131.3,436.7,137.6z" />
</g>
<g id="tr_three_root_leaves_g1">
<path fill="#6BDE84" d="M416,190.4c0,0,8.1-0.4,4.5-8.7C420.6,181.6,414.8,184.6,416,190.4z" />
<path fill="#6BDE84" d="M417.7,162.4c0,0,6,5.5,9.4-2.9C427.2,159.5,421,157.5,417.7,162.4z" />
</g>
</g>
<g id="tr_two_leaves">
<g id="tr_two_leaves_g2">
<path fill="#6BDE84" d="M504.1,195.9c0,0,4.6,11.2,14.5,2C518.6,197.9,511.6,191.2,504.1,195.9z" />
<path fill="#6BDE84" d="M504.1,195.9c0,0,12,1.2,8.6-11.9C512.7,184.1,503.5,187.2,504.1,195.9z" />
<path fill="#6BDE84" d="M522.1,186.1c0,0,10.3,7.9,14.6-6C536.7,180.1,526.5,177.7,522.1,186.1z" />
<path fill="#6BDE84" d="M522.1,186.1c0,0,8.7-5.6,2-13.5C524.1,172.6,514,178.8,522.1,186.1L522.1,186.1z" />
</g>
<g id="tr_two_leaves_g1">
<path fill="#6BDE84" d="M447.6,199.5c0,0,6.4,3,9.3-4.6c0,0,1.1-4.5,0.2-5.7C457.1,189.2,446.5,193.5,447.6,199.5z" />
<path fill="#6BDE84" d="M477.4,199.8c0,0,6.8,2.1,8.5-6c0,0,0.5-4.6-0.6-5.6C485.3,188.2,475.4,193.9,477.4,199.8z" />
<path fill="#6BDE84" d="M477.4,200.1c0,0-4,5,2.2,9.1c0,0,3.8,1.9,5,1.4C484.5,210.6,482.9,200.3,477.4,200.1z" />
<path fill="#6BDE84" d="M448.1,199.6c0,0-4.7,4.4,0.8,9.4c0,0,3.4,2.5,4.7,2.1C453.6,211,453.5,200.6,448.1,199.6z" />
</g>
</g>
<g id="tr_root_leaves">
<g id="tr_root_g3">
<path fill="#6BDE84" d="M519.6,159.4c0,0,13-4.7,11.4,10.1C531,169.5,519.2,169.5,519.6,159.4z" />
<path fill="#6BDE84" d="M510.5,154.9c0,0,6.7,5.8,10.2-3.5C520.7,151.4,513.3,147.3,510.5,154.9z" />
</g>
<g id="tr_root_g2">
<path fill="#6BDE84" d="M451.1,173.9c0,0,11.7-4.6,12,9.5C463.2,183.4,451.7,184.7,451.1,173.9z" />
<path fill="#6BDE84" d="M483.8,158.1c0,0,0.2,11.3,12,6.7C495.8,164.8,493.5,154.8,483.8,158.1z" />
</g>
</g>
</g>
</g>
</g>
<g id="treeLeft">
<g id="tl">
<g id="branchesLeftTop">
<path id="tl_three" fill="none" stroke="#7E665E" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" d="
M346,151.4c0,0-6.5-19-23.7-23.4c-9.5-2.4-18.5-0.1-28,3.8" />
<g id="tl_two">
<path id="tl_two_one" fill="none" stroke="#7E665E" stroke-width="4" stroke-linecap="round" stroke-miterlimit="10" d="
M363.8,147.4c0,0-2.7-21.6-22.3-30.1c0,0-11.8-4.8-29.9-6.8s-23.9-8.6-23.9-8.6" />
<path id="tl_two_root" fill="none" stroke="#7E665E" stroke-width="8" stroke-linecap="round" stroke-miterlimit="10" d="
M374.3,172c0,0-12.7-13-10.3-27.3c2.5-14.2-5.9-36.6-31.1-50.9" />
</g>
<g id="tl_one">
<path id="tl_one_root" fill="none" stroke="#7E665E" stroke-width="7" stroke-linecap="round" stroke-miterlimit="10" d="
M398.4,220.9c0,0-4.5-7.5-5-8.2c-3.6-4.9-19.1-25.7-55.2-28.5c0,0-24.9-2.4-30.7-11" />
</g>
<path id="tl_root" fill="none" stroke="#7E665E" stroke-width="8" stroke-linecap="round" stroke-miterlimit="10" d="
M400.4,238.1c0,0-1.4-48.7-29.7-69c-21.6-15.5-31.2-21.9-74.8-16.4" />
</g>
<g id="tl_snow">
<path fill="#FFFFFF" d="M326.939,111.002c-0.1,0.2,2.761,2.998,9.361,4.598c5,1.2,7.1,1.2,7.9,1.1c0.1,0,0.2-0.2,0.1-0.3
c-1-0.6-4.4-2.8-8.8-4c-0.6-0.2-1.2-0.3-1.9-0.3l-2.7-0.2c-0.2,0-0.397-0.121-0.597-0.121
C330.203,111.779,327.839,110.902,326.939,111.002z" />
<path fill="#FFFFFF" d="M356.1,128.4c-0.1-0.1,0-0.3,0.1-0.4c0.8-1.6,3.5-2.5,4.9-1.4c1,0.7,0.7,4.3,0.5,5.6
c0,0.3-0.3,0.6-0.7,0.6C360,132.8,358.2,132.2,356.1,128.4z" />
<path fill="#FFFFFF" d="M309,124.1c-0.1,0-0.2,0.1-0.2,0.2c0.1,0.7,1,3.2,10.4,3.9c8.4,0.6,11.3,1,12.1,0.6
c0.1-0.1,0.2-0.3,0-0.3c-1.351-0.892-8-4.4-11.6-4.7C317.9,123.7,310.3,124.1,309,124.1z" />
<path fill="#FFFFFF" d="M286.6,100.2c-0.4,1.8,1.1,4.7,6.7,3.4c0.1,0,0.2-0.1,0.2-0.2c0-0.6,0-2.4-1.6-2.8
c-1.8-0.4-3.4-1.4-4.5-1.2C287.2,99.5,286.7,99.9,286.6,100.2z" />
<path fill="#FFFFFF" d="M345.1,96.1c4.6,3.1,7.5,7.3,8.5,8.8c0.1,0.2-0.1,0.4-0.3,0.3c-13.8-5.8-14.9-11.3-14.9-12.6
c0-0.2,0.1-0.3,0.3-0.2C339.3,92.7,341,93.5,345.1,96.1z" />
<path fill="#FFFFFF" d="M321.2,177c2.2-0.3,13-1.5,17.6,3.5c0.1,0.1,0,0.3-0.1,0.3c-2.1,0.3-12.7,1.4-17.6-3.4
C320.9,177.2,321,177,321.2,177z" />
<path fill="#FFFFFF" d="M377.5,170.1c0-0.2,0.3-0.4,0.5-0.2c1.9,1.1,10.1,5.7,10,8.1c-0.1,1.9-0.1,3.1-0.1,3.5
c0,0.2-0.1,0.3-0.3,0.2c-1.3-0.4-6.4-2.1-8.5-4.9C377.1,174.2,377.3,171.2,377.5,170.1z" />
<path fill="#FFFFFF" d="M298.3,149.4c-0.6-1-1.7-1.5-2.8-1.3c-1.6,0.3-3.8,1.3-3.7,4.2c0.1,4.8,4.1,4.7,4.1,4.7s3.4-1,3.9-2.9
C300.1,152.9,299.1,150.8,298.3,149.4z" />
</g>
<g id="leavesLeftTop">
<g id="tl_three_leaves">
<g id="tl_three_leaves_down">
<path fill="#6BDE84" d="M329.3,131.9c0,0-6.8-2.5-8.5,5.4C320.8,137.3,328.8,139.9,329.3,131.9L329.3,131.9z" />
<path fill="#6BDE84" d="M295.1,130.5c0,0-9.2,3.2-6,13.1c0,0,11.4-2.9,6.7-12.8L295.1,130.5z" />
</g>
<g id="tl_three_leaves_up">
<path fill="#6BDE84" d="M315.6,126.9c0,0,2.1-6.9-5-8.8C310.6,118.1,308,125.9,315.6,126.9L315.6,126.9z" />
<path fill="#6BDE84" d="M304.6,127.1c0,0-0.9-10-12.6-7C292,120.1,294.6,131.6,304.6,127.1L304.6,127.1z" />
<path fill="#6BDE84" d="M295.2,130.5c0,0-12-7.4-20.1,5.2c0,0,13.6,10.1,20.3-4.2L295.2,130.5z" />
</g>
</g>
<g id="tl_two_one_leaves">
<g id="tl_two_one_leaves_down">
<path fill="#6BDE84" d="M353.7,126.3c0,0-10.3-2.6-9,9.2C344.7,135.6,353,134.1,353.7,126.3z" />
<path fill="#6BDE84" d="M285.2,111.6c0,0,4.6-8.9,11.5-4.3C296.7,107.3,293.4,115.2,285.2,111.6z" />
</g>
<g id="tl_two_one_leaves_up">
<path fill="#6BDE84" d="M326.3,111.7c0,0,3.8-3.4-0.6-7.5c0,0-1.5-1.5-3.7-1.7C322,102.5,319.9,110.3,326.3,111.7z" />
<path fill="#6BDE84" d="M310.5,109.7c0,0,4.4-2.6,0.9-7.4c0,0-2.3-2.5-3.3-2.4C308.1,100,303,106.9,310.5,109.7z" />
<path fill="#6BDE84" d="M289,102.6c0,0,0-9.7-11.8-8.3C277.2,94.3,278.6,106,289,102.6L289,102.6z" />
</g>
</g>
<g id="tl_two_root_leaves">
<g id="tl_two_root_leaves_left">
<path fill="#6BDE84" d="M320.2,93.9c0,0,8.2-6.8,12.2-0.6C332.4,93.3,326.8,99.6,320.2,93.9z" />
<path fill="#6BDE84" d="M335.3,107.2c0,0,8.2-6.8,12.2-0.6C347.5,106.6,342,112.9,335.3,107.2z" />
</g>
<g id="tl_two_root_leaves_right">
<path fill="#6BDE84" d="M332.3,93.4c0,0,5.6-5.7-0.3-11.8c0,0-7.3,6.3-0.3,11.8H332.3z" />
<path fill="#6BDE84" d="M346.2,88.5c0,0-7.8,6.7-1.4,12.1C344.9,100.6,352.4,96.4,346.2,88.5z" />
<path fill="#6BDE84" d="M356.1,98.8c0,0-7.7,7.6-1.4,12.1C354.7,110.9,361.5,107.6,356.1,98.8z" />
<path fill="#6BDE84" d="M361.1,123.1c0,0,5.5,0.3,6.1-5.6c0.1-0.9,0-1.9-0.2-2.8c-0.3-1.3-0.7-2.5-1.5-3.8
C365.6,110.9,357.8,116.2,361.1,123.1z" />
<path fill="#6BDE84" d="M364.7,138.5c0,0,10.3,2.6,9-9.2C373.7,129.3,365.3,130.8,364.7,138.5z" />
</g>
</g>
<g id="tl_one_root_leaves">
<g id="tl_one_root_leaves_up">
<path fill="#6BDE84" d="M372.2,204c0,0,5.3-8.6,10.8-4.3C383,199.8,379.9,207.1,372.2,204z" />
<path fill="#6BDE84" d="M373.8,193c0,0,2.1-1.9,1.4-5.1c-0.3-1.7-1.4-3.2-2.8-4.2c-0.8-0.5-1.7-1.1-2.2-1
C370.2,182.7,368.1,190.3,373.8,193z" />
<path fill="#6BDE84" d="M361.6,188.7c0,0-2.5-1.4-5.3,0.3c-1.5,0.9-2.6,2.4-3.1,4c-0.3,0.9-0.5,1.9-0.2,2.4
C353.1,195.4,360.9,195,361.6,188.7z" />
<path fill="#6BDE84" d="M341.8,174.4c0,0,9.7,4.4,5.8,10.7C347.6,185.2,339.6,182.9,341.8,174.4z" />
<path fill="#6BDE84" d="M307.2,175c0,0,7.1-3.2,2.6-11.1c0,0-3-4.1-4.6-4.2C305.2,159.7,301.3,171.7,307.2,175z" />
</g>
<g id="tl_one_root_leaves_down">
<path fill="#6BDE84" d="M293.1,168.4c0,0,13.2-2.7,13.9,6.7C307,175,297.1,178.6,293.1,168.4z" />
<path fill="#6BDE84" d="M321.3,188.6c0,0,5.6-9,11.4-4.4C332.8,184.2,329.4,191.8,321.3,188.6z" />
</g>
</g>
<g id="tl_root_leaves">
<g id="tl_root_leaves_down">
<path fill="#6BDE84" d="M365.9,168c0,0-2.9-6.5-10.1-2.4c0,0-3.8,2.7-3.8,4.2C351.9,169.7,362.8,173.3,365.9,168z" />
</g>
<g id="tl_root_leaves_up">
<path fill="#6BDE84" d="M311.5,139c0,0,10,3.6,6.7,10.3C318.1,149.3,309.9,147.6,311.5,139z" />
<path fill="#6BDE84" d="M299.1,151.9c0,0-8.9-7.5-16.2,1.8C282.8,153.7,292.3,163.3,299.1,151.9L299.1,151.9z" />
</g>
</g>
</g>
</g>
<g id="bl">
<g id="branchesLeftBot">
<path id="bl_two" fill="none" stroke="#7E665E" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" d="
M359.3,212.8c0,0-27.3,1.2-34.8,1.9c-7.8,0.7-30.5,1.6-44.7-14.6C265.6,184,263.9,175,263.9,175" />
<path id="bl_root" fill="none" stroke="#7E665E" stroke-width="8" stroke-linecap="round" stroke-miterlimit="10" d="
M400.4,278.2c0,0-0.8-12.5-9.3-29.1c-10.8-20.8-28.6-37-50.1-46.2c-13.4-5.8-33.3-13.9-55.2-21.3" />
</g>
<g id="bl_snow">
<path fill="#FFFFFF" d="M289.8,179.4c0.2-0.4,0-0.9-0.4-1.2c-1.4-0.7-4.6-1.8-8.4-0.5c-0.7,0.3-1.3,0.8-1.5,1.6
c-0.5,1.6,1.5,4.7,3.9,6.1C286.2,187,288.9,181.5,289.8,179.4z" />
<path fill="#FFFFFF" d="M300.4,209.4c3.6-0.2,18-0.9,23,1.9c0.4,0.2,0.4,0.9-0.1,1c-3.4,0.9-14.1,2.9-23-2.4
C300,209.7,300.1,209.4,300.4,209.4z" />
<path fill="#FFFFFF" d="M262.9,173c0.1-0.6,0.5-1.5,1-1.7c0.8-0.4,2.1-0.5,2.8-0.4c3,0.3,4.8,8.5,4.5,10.3
c-0.2,0.9,0.8,2.4,1.8,3.5c1,1.2,1.1,2.9,0.3,4.2l-0.1,0.1c-0.5,0.8-1.7,0.9-2.3,0.2C268.2,186,262.2,178.4,262.9,173z" />
</g>
<g id="leavesLeftBot">
<g id="bl_two_leaves">
<g id="bl_two_leaves_up">
<g id="bl_two_leaves_up_g2">
<path fill="#6BDE84" d="M263.9,175.5c0,0,10.3-7,3-18.2c0,0-13.1,7.4-4,18L263.9,175.5z" />
<path fill="#6BDE84" d="M301.9,213.1c0,0-12.2-1.8-5.5-13.9C296.4,199.2,307.7,204.1,301.9,213.1z" />
<path fill="#6BDE84" d="M271,189.7c0,0,8.8-0.6,7.2-10.7c0,0-1.5-5.6-3.2-6.3C275,172.6,266,183.8,271,189.7z" />
</g>
<g id="bl_two_leaves_up_g1">
<path fill="#6BDE84" d="M332.7,214.3c0,0,1.8-6.7-6-8.1c0,0-4.5-0.3-5.5,0.7C321.2,207,321.8,215.1,332.7,214.3z" />
</g>
</g>
<g id="bl_two_leaves_down">
<g id="bl_two_leaves_down_g2">
<path fill="#6BDE84" d="M282.3,202.7c0,0-10.4-4.3-13.6,6.4C268.7,209,279.5,214.5,282.3,202.7L282.3,202.7z" />
<path fill="#6BDE84" d="M271,189.8c0,0-8.7-8.6-17.4,2.1C253.6,191.9,264.4,201.3,271,189.8L271,189.8z" />
<path fill="#6BDE84" d="M263.9,175.5c0,0-7.7-11.5-20.1-3.5C243.8,172,252.1,185.7,263.9,175.5L263.9,175.5z" />
</g>
<g id="bl_two_leaves_down_g1">
<path fill="#6BDE84" d="M315.6,214.8c0,0-10.7-2.7-14,9C301.6,223.7,315.5,227.5,315.6,214.8L315.6,214.8z" />
<path fill="#6BDE84" d="M359.8,214.5c0,0-7.2-4.6-11.8,4.1c0,0-2.1,5.2-1.2,6.8C346.8,225.4,360.2,222,359.8,214.5z" />
</g>
</g>
</g>
<g id="bl_root_leaves">
<g id="bl_root_leaves_g2">
<g id="bl_root_leaves_g2_up">
<path fill="#6BDE84" d="M285.5,185.6c0,0,6.4-2.9,2.4-10c0,0-2.7-3.8-4.2-3.8C283.7,171.8,275.4,181.2,285.5,185.6z" />
</g>
<g id="bl_root_leaves_g2_down">
<path fill="#6BDE84" d="M301.7,191.2c0,0-5.6,9-11.4,4.4C290.3,195.6,293.6,188,301.7,191.2z" />
<path fill="#6BDE84" d="M317.7,197.3c0,0-5.6,9-11.4,4.4C306.2,201.7,309.6,194,317.7,197.3z" />
</g>
</g>
<g id="bl_root_leaves_g1">
<g id="bl_root_leaves_g1_up">
<path fill="#6BDE84" d="M362,213c0,0,4.7,3,8.1-1.8c0.5-0.8,0.9-1.6,1.2-2.5c0.4-1.3,0.6-2.9,0.4-3.8
C371.7,204.9,362,204.9,362,213z" />
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
<g id="seedGroup">
<g id="holeGroup">
<ellipse id="holeBack" fill="none" stroke="#68524C" stroke-miterlimit="10" cx="400.016" cy="458.04" rx="11.104" ry="6.786" />
<g id="seed">
<ellipse transform="matrix(0.7401 -0.6725 0.6725 0.7401 -187.0291 382.292)" fill="#68524C" cx="401.037" cy="433.096" rx="8.943" ry="5.717" />
<path fill="#A38881" d="M407.964,427.471c-0.094-0.136-0.197-0.267-0.309-0.39c-1.117-1.231-2.947-1.593-4.961-1.173
c0.461,0.122,0.852,0.346,1.153,0.676c1.466,1.614,0.186,5.165-2.86,7.933c-2.667,2.424-5.804,3.443-7.527,2.574
c0.135,0.77,0.45,1.459,0.959,2.018c0.05,0.055,0.101,0.108,0.153,0.159c2.428,0.563,5.999-0.722,9.035-3.48
C406.503,433.155,408.11,429.909,407.964,427.471z" />
<path fill="#68524C" d="M400.987,434.518c-2.667,2.424-5.804,3.443-7.527,2.574c-0.431-2.443,0.953-5.701,3.732-8.226
c1.73-1.573,3.69-2.58,5.501-2.957c0.461,0.122,0.854,0.346,1.154,0.676C405.314,428.199,404.033,431.75,400.987,434.518z" />
</g>
<path fill="#EDF0FF" d="M411.836,457.83v32.966h-23.811V457.83h0.273c-0.012,0.074-0.001,0.136-0.001,0.21
c0,4.084,5.243,7.403,11.721,7.403s11.721-3.319,11.721-7.403c0-0.074,0.01-0.136-0.002-0.21H411.836z" />
<path id="holeFront" fill="none" stroke="#68524C" stroke-miterlimit="10" d="M411.12,458.04c0,3.748-4.971,6.786-11.104,6.786
s-11.104-3.038-11.104-6.786" />
</g>
<g id="dirt">
<ellipse fill="#A38881" cx="407.005" cy="461.191" rx="12.125" ry="8.346" />
<ellipse fill="#A38881" cx="393.324" cy="461.093" rx="12.406" ry="8.248" />
<ellipse fill="#A38881" cx="394.563" cy="456.13" rx="8.978" ry="8.978" />
<ellipse fill="#A38881" cx="405.731" cy="454.985" rx="7.832" ry="7.832" />
</g>
</g>
<g id="plant-seed-btn" role="button" aria-pressed="false">
<g id="blur" filter='url(#blurFilter)'>
<circle fill="none" stroke="#1D1F47" stroke-width="1" stroke-miterlimit="10" cx="400" cy="454" r="22.556" />
<circle fill="none" stroke="#1D1F47" stroke-width="1" stroke-miterlimit="10" cx="400" cy="454" r="22.556" />
</g>
<g id="front">
<circle fill="#1D1F47" cx="400" cy="454" r="22.6" />
<line fill="none" stroke="#FFFFFF" stroke-width="4" stroke-miterlimit="10" x1="399.864" y1="459.942" x2="399.864" y2="450.595" />
<path fill="#FFFFFF" d="M406.182,444.515c0,0-8.343,2.08-6.306,9.447C399.875,453.963,407.997,452.541,406.182,444.515z" />
<path fill="#FFFFFF" d="M393.885,444.515c0,0-2.452,7.275,5.994,9.447C399.879,453.963,402.884,447.182,393.885,444.515z" />
<path fill="#FFFFFF" d="M403.601,459.085c-0.122-1.121-1.06-1.998-2.214-1.998c-0.594,0-1.13,0.235-1.53,0.612
c-0.448-0.381-1.027-0.612-1.661-0.612c-1.266,0-2.315,0.918-2.525,2.124c-0.835,0.431-1.374,1.103-1.374,1.861
c0,1.302,1.587,2.357,3.546,2.357c0.708,0,1.367-0.14,1.921-0.378c0.563,0.272,1.248,0.434,1.989,0.434
c1.914,0,3.465-1.068,3.465-2.385C405.216,460.251,404.57,459.508,403.601,459.085z" />
</g>
</g>
<g id="birdGroup">
<g id="birdR">
<g>
<g>
<path class="wingL" fill="#9898D8" d="M367.744,74.117c0,0,4.798-14.173,16.497-14.173c9.902,0,16.497,14.173,16.497,14.173
c0-9.111-7.386-16.497-16.497-16.497C375.13,57.619,367.744,65.005,367.744,74.117z" />
<path class="wingR" fill="#9898D8" d="M432.256,74.117c0,0-4.798-14.173-16.497-14.173c-9.902,0-16.497,14.173-16.497,14.173
c0-9.111,7.386-16.497,16.497-16.497C424.87,57.619,432.256,65.005,432.256,74.117z" />
</g>
</g>
</g>
<g id="birdL">
<g>
<g>
<path class="wingL" fill="#9898D8" d="M367.744,73.117c0,0,4.798-14.173,16.497-14.173c9.902,0,16.497,14.173,16.497,14.173
c0-9.111-7.386-16.497-16.497-16.497C375.13,56.619,367.744,64.005,367.744,73.117z" />
<path class="wingR" fill="#9898D8" d="M432.256,73.117c0,0-4.798-14.173-16.497-14.173c-9.902,0-16.497,14.173-16.497,14.173
c0-9.111,7.386-16.497,16.497-16.497C424.87,56.619,432.256,64.005,432.256,73.117z" />
</g>
</g>
</g>
</g>
<g id="snowGroup"></g>
<g id="leafGroup"></g>
</svg>
<div class="text">
<h1>Seasons</h1>
</div>
<svg>
</svg>
</div>
<section id="start">
<p id="intro-text">Click the circle to begin your journey.</p>
</section>
<section id="spring">
</section>
<section id="summer">
</section>
<section id="fall">
</section>
<section id="winter">
</section>
<section id="end">
</section>
</main>
</body>
:root {
--text-color:#1d1f47;
--clip-color:#ff997e;
--background:#edf0ff;
}
html {
width:calc(100vw - 17px);
font-size:16px;
}
body {
margin:0;
font-family:sans-serif;
color:var(--text-color);
background:var(--background);
overflow:hidden;
overflow-x:hidden;
}
ul {
list-style-type:none;
padding-left:0px;
margin:0;
}
li {
display:inline-block;
margin:10px;
}
h3 {
font-size:1.75rem;
}
p {
margin:1rem 0;
}
/* Preloader */
.loader {
position:fixed;
width:100%;
height:100%;
left:0;
top:0;
bottom:0;
right:0;
background:var(--clip-color);
z-index:4;
display:flex;
align-items:center;
justify-content:center;
flex-direction:column;
}
.loader p {
font-size: 1.25rem;
letter-spacing: 1.25px;
}
.loader svg {
width: 28px;
height: 40px;
margin:1rem 0;
}
.loader-bar {
position:relative;
height: 4px;
width: 80px;
background: rgba(255, 255, 255, 0.35);
overflow:hidden;
}
.loader-bar span {
position:absolute;
top:0;
left:0;
height:4px;
width:80px;
background:#FFF;
transform:translateX(-100%);
}
/* progress bar */
.progress-bar {
position:fixed;
top:0;
left:0;
width:100%;
height:4px;
z-index:4;
}
progress[value] {
-webkit-appearance:none;
appearance:none;
}
progress[value]::-webkit-progress-bar {
background:transparent;
}
progress[value]::-webkit-progress-value {
background:var(--clip-color);
}
/* grid container media queries*/
/* SECTIONS */
section {
height:100vh;
width:100%;
display:flex;
align-items:center;
justify-content:center;
flex-direction:column;
font-size:1.625rem;
}
#spring,#fall,#summer,#winter {
height:200vh;
}
/* SVG STUFF */
#animation-container {
position:fixed;
height:100vh;
width:100vw;
bottom:0;
left:0;
top:0;
right:0;
z-index:0;
}
#drawing {
width:calc(100vw - 17px);
visibility:hidden;
position: fixed;
bottom: 0;
top: 0;
left: 0;
right: 0;
height:inherit;
}
.text {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
position: fixed;
top: 0;
left: 0;
width: 100%;
user-select:none;
}
.text h1 {
font-size:12.5rem;
}
/* Intro section */
#intro-text {
overflow:hidden;
}
#plant-seed-btn {
background:transparent;
border:2px solid var(--text-color);
border-radius:50%;
cursor:pointer;
width:50px;
height:50px;
z-index:1;
}
.warning {
display:none;
position:fixed;
top:0;
left:0;
right:0;
bottom:0;
width:100%;
height:100%;
display:flex;
align-items:center;
justify-content: center;
flex-direction:column;
opacity:0;
visibility:hidden;
background:var(--background);
z-index:3;
}
.warning h1 {
font-size: 4rem;
margin: 0 0 1rem 0;
user-select:none
}
.warning p {
margin: 0.5rem 0;
}
.warning img {
width:28px;
height:40px;
}
/* THIS DEMO NEEDS TO BE RUN ON A DESKTOP PC */
@media screen and (max-width:1191px) {
.demo-link-overlay:hover .border-left-right:after, .demo-link-overlay:hover .border-left-right:before {
height: 75%;
}
}
@media screen and (max-width:991px) {
.border-left-right:before {
left: 24px;
}
.border-left-right:after {
right: 24px;
}
.demo-link-overlay:hover .border-left-right:after, .demo-link-overlay:hover .border-left-right:before {
height: 65%;
}
}
@media screen and (max-width:891px) {
.text h1 {
font-size:10rem;
}
}
@media screen and (max-width:767px) {
.warning {
opacity:1;
visibility:visible;
}
}
.button svg {
width: calc(100vw - 17px);
position: fixed;
bottom: 0;
left: 0;
}
let xmlns = "http://www.w3.org/2000/svg";
const text = document.querySelector(".text h1");
const changeBG = (color) => {
gsap.to(":root", { "--background" : color, duration: 1 })
}
const animateSeasonTextOut = (season) => {
gsap.to(text,{y:20, autoAlpha:0, duration:0.32,onComplete:() => {
setTimeout(() => text.textContent = season,250)
}})
}
const animateSeasonTextIn = () => {
gsap.to(text, { y: 0, autoAlpha: 1, duration: 0.32 });
}
const checkRepeatingTls = (tl,season) => {
if (!season) {
tl.eventCallback("onRepeat", () => {
tl.pause();
});
} else {
tl.eventCallback("onRepeat", null);
}
}
const checkIfTlShouldPlayOrRestart = (tl) => {
tl.progress() === 1 ? tl.restart() : tl.play();
}
const snowDropConfig = (particle) => {
gsap.set(particle, {
attr: {
rx: "5",
ry: "5",
fill: "#FFF",
stroke: "none"
},
autoAlpha: 0
});
};
const leafConfig = (particle) => {
gsap.set(particle, {
attr: {
d:
"M5.618,0c0,0-12.639,14.368,0,27.007C18.257,14.368,5.618,0,5.618,0z",
fill: "#d0916a",
stroke: "none",
},
autoAlpha: 0,
rotation: gsap.utils.random(-60, 60, 1),
transformOrigin: "50% 50%",
});
}
const createParticles = (particleAmount, shape, pGroup,className,particleConfig) => {
for (let i = 0; i < particleAmount; i++) {
particle = document.createElementNS(xmlns, shape);
particleGroup = document.querySelector(pGroup);
gsap.set(particle,{attr:{class:className}})
particleGroup.appendChild(particle);
particleConfig()
};
};
// ANIMATE THE RANDOM PARTICLES
const animateSnow = (drop) => {
gsap.set(drop, {
y: 0,
x: gsap.utils.random(265, 545, 8),
scale: gsap.utils.random(0.2, 0.4),
});
if(isWinter) {
gsap.fromTo(
drop,
{ autoAlpha: 1 },
{
duration: gsap.utils.random(6, 10),
motionPath: {
path: snowPaths[gsap.utils.random(0, snowPaths.length - 1, 1)],
relative: true,
curviness: 0.5,
},
ease: "none",
delay: gsap.utils.random(0, 10),
onComplete: animateSnow,
onCompleteParams: [drop],
}
);
}
};
const animateLeaves = (leaf) => {
gsap.set(leaf, {
y: -20,
x: gsap.utils.random(265, 545, 30),
scale: gsap.utils.random(0.2, 0.35),
});
if(isFall) {
gsap.fromTo(
leaf,
{ autoAlpha: 1 },
{
duration: gsap.utils.random(6, 10),
motionPath: {
path:
leafPaths[
gsap.utils.random(0, leafPaths.length - 1, 1)
],
relative: true,
curviness: 0.5,
},
rotation: gsap.utils.random(-360, 360),
delay: gsap.utils.random(0, 10, 0.5),
ease: "none",
onComplete: animateLeaves,
onCompleteParams: [leaf],
}
);
}
};
const shouldSnowDrop = (season,particle) => {
const particleGroup = document.querySelectorAll(particle)
if (season) {
for (let i = 0; i < particleGroup.length; i++) {
animateSnow(particleGroup[i]);
}
}
}
const shouldLeavesDrop = (season,particle) => {
const particleGroup = document.querySelectorAll(particle);
if (season) {
for (let i = 0; i < particleGroup.length; i++) {
animateLeaves(particleGroup[i]);
}
}
}
const shouldParticleGroupBeVisible = (season,particleGroup) => {
!season ? gsap.to(particleGroup,{autoAlpha:0}) : gsap.set(particleGroup,{autoAlpha:1})
}
gsap.registerPlugin(MotionPathPlugin);
gsap.registerPlugin(ScrollTrigger);
gsap.set("#seed", { scale: 0, transformOrigin: "50% 50%" });
gsap.set("#holeBack,#holeFront", { scale: 0, transformOrigin: "50% 50%" });
gsap.set("#dirt ellipse", { scale: 0, transformOrigin: "50% 50%" });
let hidingText = false;
const plantSeed = () => {
const holeTl = gsap.timeline({onComplete:() => {
drawTreeTl.play();
drawLeavesTl.play();
rotTl.play();
cloudTl.play();
}});
holeTl
.to(
"#holeBack,#holeFront",
{
scale: 1,
ease: "back.out",
duration: 0.3,
},
0.2
)
.to(
"#holeGroup",
{
scale: 0,
transformOrigin: "50% 50%",
y: -10,
ease: "power1.inOut",
},
1
)
.to("#dirt ellipse", { scale:1,stagger:{each:0.05,from:'start',duration:0.16} }, 0.6)
gsap.to("#seed", {
keyframes: [
{ y:-10,scale: 1, ease: "back.out",duration:0.32 },
{ y: 35,rotation:-45, transformOrigin:"50% 50%", duration:0.32, ease: "sine.in" },
],
});
};
// Pre scroll animations
const seedBtn = document.getElementById("plant-seed-btn");
gsap.set("#drawing", {visibility: "visible"});
gsap.set(seedBtn, { autoAlpha: 0,y:10 });
gsap.set("#intro-text", {y:-10,autoAlpha: 0 });
// animate seed btn
const btnTl = gsap.timeline({
defaults:{transformOrigin:"50% 50%"},
paused:true
});
btnTl
.to(
"#blur circle",
{
scale: 2,
stagger: { each: 0.3, repeat: -1, repeatDelay: 1 },
autoAlpha: 0,
duration: 1,
},
"grow"
)
.to(
"#front",
{ scale: 1.2, repeat: -1, yoyo: true, duration: 1 },
"grow"
);
// event listener btn
seedBtn.addEventListener("click", () => {
gsap.to(seedBtn, {
autoAlpha: 0,
onComplete: () => {
gsap.to(
"#intro-text",
{
autoAlpha: 0,
duration: 0.38,
onComplete: () => {
// pausing button timelines
gsap.set(btnTl, { pause: true });
gsap.set(document.body,{overflow:"auto"})
},
}
);
},
});
plantSeed();
});
// Growing
const branches = [
"#trunkBot",
"#trunkTop",
"#branchesLeftBot path",
"#branchesLeftTop path",
"#branchestm path",
"#branchesRightBot path",
"#branchesRightTop path",
];
const leaves = [
"#leavesLeftBot path",
"#leavesLeftTop path",
"#leavesRightTop path",
"#leavesRightBot path",
"#lMid path",
"#lm_one path",
"#lm_five path"
];
const leafGroups = [
"#lMid",
"#leavesLeftTop",
"#leavesLeftBot",
"#leavesRightTop",
"#leavesRightBot",
"#lm_one path",
"#lm_five path",
];
gsap.set(branches, { drawSVG: "0% 0%" });
gsap.set(leaves, { scale: 0, transformOrigin: "50% 50%" });
gsap.set("#lm_one_left path", { x: -6, y: -1 });
gsap.set("#lm_one_right path", { x: 3 });
gsap.set("#lm_five_down", { y: 3, x: 2 });
gsap.set("#lm_five_up", { y: -3, x: 1 });
gsap.set(
"#bl_root_leaves_g1_up path, #bl_three_leaves_up path, #bl_root_leaves_g2_up path",
{ transformOrigin: "50% 100%", y: 3 }
);
gsap.set(
"#bl_root_leaves_g1_down path, #bl_one_root_leaves_down path, #tl_root_leaves_down path, #tl_two_one_leaves_down path, #bl_root_leaves_g2_down path",
{ transformOrigin: "50% 0%", y: -3 }
);
gsap.set('.text',{autoAlpha:0,y:20});
const drawTreeTl = gsap.timeline({ paused:true,defaults: { ease: "none" } });
drawTreeTl
// animating the viewBox
.to("#drawing",{ height:"auto" },'start')
.to(
"#drawing",
{ attr: { viewBox: "250 0 300 600" }, duration: 1.5, ease: "power1.out" },
"start+=0.5"
)
// animating the text
.to(".text", { autoAlpha: 1, y: 0, delay: 1.6 }, "start")
// animating the tree
// animating the thickness of the branches
.to("#trunkBot,#trunkTop", { strokeWidth: 14, duration: 1 }, "start")
.to("#trunkBot", { drawSVG: "0% 100%" }, "start")
.to("#trunkTop", { drawSVG: "0% 100%", duration: 0.75 }, "start+=0.5")
// left side bottom branches
.to("#bl_root", { drawSVG: "0% 100%" }, "start+=0.52")
.to("#bl_two", { drawSVG: "0% 100%" }, "start+=0.77")
// left side top branches
.to("#tl_root", { drawSVG: "0% 100%" }, "start+=0.72")
.to("#tl_one_root", { drawSVG: "0% 100%" }, "start+=0.72")
.to("#tl_two_root", { drawSVG: "0% 100%" }, "start+=0.98")
.to("#tl_two_one", { drawSVG: "0% 100%" }, "start+=1.17")
.to("#tl_three", { drawSVG: "0% 100%" }, "start+=1.06")
// middle branches
.to("#tm_two", { drawSVG: "0% 100%" }, "start+=1")
.to("#tm_three", { drawSVG: "0% 100%" }, "start+=1.05")
// right side bottom branches
.to("#br_root", { drawSVG: "0% 100%" }, "start+=0.55")
// right side top branches
.to("#tr_root", { drawSVG: "0% 100%" }, "start+=0.65")
.to("#tr_two", { drawSVG: "0% 100%" }, "start+=0.77")
.to("#tr_three_root", { drawSVG: "0% 100%" }, "start+=0.77")
.to("#tr_four_root", { drawSVG: "0% 100%" }, "start+=1.01");
const drawLeavesTl = gsap.timeline({
paused:true
});
drawLeavesTl
// bottom left leaves
.to("#bl_root_leaves_g1_up path", { scale: 1 }, "start+=0.92")
.to("#bl_root_leaves_g2_up path", { scale: 1 }, "start+=0.9")
.to("#bl_root_leaves_g2_down path", { scale: 1,y:-5 }, "start+=0.9")
.to("#bl_two_leaves_down_g1 path", { scale: 1 }, "start+=0.9")
.to("#bl_two_leaves_up_g1 path", { scale: 1 }, "start+=0.75")
.to("#bl_two_leaves_down_g2 path", { scale: 1 }, "start+=1.2")
.to("#bl_two_leaves_up_g2 path", { scale: 1 }, "start+=1.2")
// topLeft_root_leaves
.to(
"#tl_root_leaves_up path",
{ scale: 1, stagger: { each: 0.075, from: "start" } },
"start+=0.86"
)
.to(
"#tl_root_leaves_down path",
{ scale: 1, stagger: { each: 0.075, from: "start" } },
"start+=0.88"
)
//topLeft_one_root_leaves
.to(
"#tl_one_root_leaves_up path",
{ scale: 1, stagger: { each: 0.075, from: "start" } },
"start+=0.88"
)
.to(
"#tl_one_root_leaves_down path",
{ scale: 1, stagger: { each: 0.075, from: "end" } },
"start+=0.88"
)
// topLeft_two_root_leaves
.to("#tl_two_root_leaves_left path", { scale: 1 }, "start+=1.42")
.to("#tl_two_root_leaves_right path", { scale: 1 }, "start+=1.34")
// topLeft_two_one_leaves
.to("#tl_two_one_leaves_up path", { scale: 1 }, "start+=1.50")
.to("#tl_two_one_leaves_down path", { scale: 1 }, "start+=1.48")
.to("#tl_three_leaves_up path", { scale: 1 }, "start+=1.54")
.to("#tl_three_leaves_down path", { scale: 1 }, "start+=1.48")
// leaves mid
// leavesMid_one
.to(
"#lm_one_left path",
{ scale: 1, stagger: { each: 0.075, from: "start" } },
"start+=0.88"
)
.to(
"#lm_one_right path",
{ scale: 1, stagger: { each: 0.075, from: "start" } },
"start+=0.9"
)
// leavesMid_three
.to("#lm_three_left path", { scale: 1 }, "start+=1.34")
.to("#lm_three_right path", { scale: 1 }, "start+=1.4")
// leavesMid_four
.to("#lm_four_left path", { scale: 1 }, "start+=1.5")
.to("#lm_four_right path", { scale: 1 }, "start+=1.58")
// leavesMid_five
.to("#lm_five_up path", { scale: 1 }, "start+=1.2")
.to("#lm_five_down path", { scale: 1 }, "start+=1.2")
// leaves right
// botRight_root_leaves
.to("#br_root_leaves_g1 path", { scale: 1 }, "start+=0.73")
.to("#br_root_leaves_g2 path", { scale: 1 }, "start+=0.93")
// botRight_one_leaves
// topRight_root
.to("#tr_root_g2 path", { scale: 1 }, "start+=0.88")
.to("#tr_root_g3 path", { scale: 1, y: -1 }, "start+=1")
// topRight_two_leaves
.to("#tr_two_leaves_g1 path", { scale: 1 }, "start+=0.92")
.to("#tr_two_leaves_g2 path", { scale: 1 }, "start+=1.04")
// topRight_three_root_leaves
.to("#tr_three_root_leaves_g1 path", { scale: 1 }, "start+=0.94")
.to("#tr_three_root_leaves_g2 path", { scale: 1 }, "start+=1.16")
// topRight_four_root_leaves
.to("#tr_four_root_leaves_g1 path", { scale: 1 }, "start+=0.94")
.to("#tr_four_root_leaves_g2 path", { scale: 1 }, "start+=1.2")
// leaf + tree rotation
const rotTl = gsap.timeline({
paused:true,
yoyo: true,
repeat: -1,
defaults: {
ease: "sine.inOut",
duration: 1,
rotation: 1,
transformOrigin: "50% 100%"
},
delay:2.08
});
rotTl
.to("#tl,#bl", { transformOrigin: "100% 100%" }, "rotate")
.to("#tr,#br", { transformOrigin: "0% 100%" }, "rotate")
.to("#trunkTopGroup", { rotation: 0.35 }, "rotate")
.to("#lm_five", { rotation: 0.5 }, "rotate")
.to("#tm_two_g,#lm_three", { transformOrigin: "100% 100%" }, "rotate")
.to("#tm_three_g,#lm_four", { transformOrigin: "0% 100%" }, "rotate")
gsap.set("#clouds", {
autoAlpha: 0,
scale: 1.05,
y: 30,
transformOrigin: "50% 50%",
});
const cloudTl = gsap.timeline({
paused:true,
delay: 1,
});
cloudTl
.to("#clouds", { y: -20, scale: 1, autoAlpha: 1, duration: 1 })
.to("#cloudGroup", {
y: "+=1",
duration: 1,
repeat: -1,
yoyo: true,
transformOrigin: "50% 50%",
ease: "sine.inOut",
});
// Spring
let isSpring = false;
gsap.set('#birdR g,#birdL g',{transformOrigin:"50% 50%",scale:0.1,y:-6,autoAlpha:0})
const birdTl = gsap.timeline({repeat:-1,paused:true})
birdTl
.set("#birdL g,#birdR g", { autoAlpha: 1 },'flap')
.to(
".wingL",
{
rotation: -28,
transformOrigin: "100% 100%",
repeat: 24,
yoyo: true,
yoyoEase: "sine.in",
ease: "sine.in",
duration: 0.5,
},
"flap"
)
.to(
".wingR",
{
rotation: 28,
transformOrigin: "0% 100%",
repeat: 24,
yoyo: true,
yoyoEase: "sine.in",
ease: "sine.in",
duration: 0.5,
},
"flap"
)
.to(
"#birdL g",
{ x: -100, y: -30, scale: 1, duration: 12, ease: "expoScale(0.1,1)" },
"flap"
)
.to("#birdL g", { autoAlpha: 0, duration: 1 }, "flap+=11")
.to(
"#birdR g",
{ x: 100, y: -30, scale: 1, duration: 12, ease: "expoScale(0.1,1)" },
"flap"
)
.to("#birdR g", { autoAlpha: 0, duration: 1 }, "flap+=11");
// START
const startTl = gsap.timeline({
scrollTrigger: {
trigger : "#start",
start:"top top",
end: "center #spring",
onUpdate: (self) => {
if (self.progress > 0.5 && self.direction === -1 && hidingText === true) {
hidingText = false;
text.textContent = "Seasons";
animateSeasonTextIn();
}
if (self.progress > 0.5 && self.direction === 1 && hidingText === false) {
hidingText = true;
animateSeasonTextOut("Spring");
}
},
onEnterBack: () => {
hidingText = false;
animateSeasonTextIn();
}
}
})
// SPRING
const springTl = gsap.timeline({
scrollTrigger: {
trigger: "#spring",
start: "top top",
end: "bottom #summer",
onEnter: () => {
hidingText = false
isSpring = true;
// change bg color
changeBG("#c8d1fb");
// check if birds should be flying
checkIfTlShouldPlayOrRestart(birdTl);
// animate season text
animateSeasonTextIn();
},
onEnterBack: () => {
isSpring = true;
},
onLeave: () => {
isSpring = false;
checkRepeatingTls(birdTl, isSpring);
},
onLeaveBack: () => {
isSpring = true;
// change bg color
changeBG("#edf0ff");
// hide background trees
gsap.to("#treeBGR,#treeBGL", {
scale: 0,
transformOrigin: "50% 100%",
ease: "back.in(1)",
duration: 1,
stagger:0.3
});
},
onUpdate: (self) => {
if (self.progress < 0.5 && self.direction === -1) {
animateSeasonTextOut("Seasons");
}
if (self.progress > 0.5 && self.direction === 1 && hidingText === false) {
hidingText = true
animateSeasonTextOut("Summer");
}
}
}
});
// SUMMER
gsap.set("#sun", { autoAlpha: 0, rotation: -45, transformOrigin: "50% 50%" });
let isSummer = false;
const summerTl = gsap.timeline({paused:true});
summerTl.to("#sun", {
y: -20,
autoAlpha: 1,
rotation: 0,
ease: "back.out",
duration: 1,
});
// scroll trigger
ScrollTrigger.create({
trigger: "#summer",
start: "top top",
end: "bottom #fall",
onEnter: () => {
hidingText = false;
isSummer = true;
checkIfTlShouldPlayOrRestart(summerTl);
animateSeasonTextIn();
},
onEnterBack: () => {
isSummer = true;
changeBG("#c8d1fb");
gsap.to(leaves, { attr: { fill: "#6BDE84", duration: 0.5 } });
gsap.to("#birdGroup", { autoAlpha: 1 });
},
onLeave: () => {
isSummer = false;
gsap.to('#birdGroup',{autoAlpha:0})
},
onUpdate: (self) => {
if (self.progress < 0.5 && self.direction === -1) {
animateSeasonTextOut("");
}
if (self.progress > 0.5 && self.direction === 1 && hidingText === false) {
hidingText = true
animateSeasonTextOut("Fall");
}
}
});
// sun exits view timeline
const sunExitTl = gsap.timeline({ paused: true });
sunExitTl.to("#sun", { autoAlpha: 0, y: 0, ease: "back.in", duration: 1 });
// FALL
let isFall = false;
const fallTl = gsap.timeline({ paused: true });
fallTl
.to(":root", { "--background" : "#fbe2c8", duration: 1 }, "fall")
.to(leaves, { attr: { fill: "#D0916A" }, duration: 1 }, "fall")
// .to(leafGroups, { autoAlpha: 0, duration: 1 }, "fall+=0.5");
// create leaf particles
createParticles(10, "path", "#leafGroup", "leaf", () => leafConfig('.leaf'));
const leafPaths = [
[{ x: -8, y: 50 }, { x: 8, y: 100}, { x: -13, y: 200 }, { x: 10, y: 250 }],
[{ x: -6, y: 50 }, { x: 14, y: 100 }, { x: -13, y: 200 }, { x: 10, y: 250 }],
[{ x: -6, y: 50 }, { x: 6 , y: 100}, { x: -6, y: 200 }, { x: 6, y: 250 }],
];
// scroll trigger
const fallTl2 = gsap.timeline({
defaults:{ease:"none"},
scrollTrigger: {
trigger: "#fall",
start: "top top",
end: "bottom #winter",
scrub: true,
onEnter: () => {
hidingText = false;
isFall = true;
checkIfTlShouldPlayOrRestart(fallTl);
checkIfTlShouldPlayOrRestart(sunExitTl);
// show leaves
shouldParticleGroupBeVisible(isFall, "#leafGroup");
shouldLeavesDrop(isFall, ".leaf");
animateSeasonTextIn();
},
onEnterBack: () => {
isFall = true;
changeBG("#fbe2c8");
// hide the snow
gsap.to(treeSnow, { autoAlpha: 0 });
// show the leaves
shouldParticleGroupBeVisible(isFall, "#leafGroup");
shouldLeavesDrop(isFall, ".leaf");
},
onLeave: () => {
isFall = false;
// stop the falling leaves
shouldLeavesDrop(isFall, ".leaf");
// hide leaves
shouldParticleGroupBeVisible(isFall, "#leafGroup");
},
onLeaveBack: () => {
isFall = false;
shouldLeavesDrop(isFall, ".leaf");
shouldParticleGroupBeVisible(isFall, "#leafGroup");
},
onUpdate: (self) => {
if (self.progress < 0.5 && self.direction === -1) {
animateSeasonTextOut("");
}
if (self.progress > 0.5 && self.direction === 1 && hidingText === false) {
hidingText = true
animateSeasonTextOut("Winter");
}
}
}
});
fallTl2
.to(leafGroups, { autoAlpha: 0, duration: 0.016, ease: "none" }, 0.5)
// Winter
let isWinter = false;
const snowPaths = [
[
{ x: 10, y: 50 },
{ x: -10, y: 100 },
{ x: 15, y: 200 },
{ x: -20, y: 250 },
],
[
{ x: -5, y: 50 },
{ x: 14, y: 100 },
{ x: -22, y: 200 },
{ x: 5, y: 250 },
],
];
createParticles(
50,
"ellipse",
"#snowGroup",
"snowDrop",
() => snowDropConfig('.snowDrop')
);
const treeSnow = ["#tr_snow", "#tl_snow", "#top_snow","#br_snow",'#bl_snow','#tm_snow_right','#tm_snow_left'];
gsap.set(treeSnow, { autoAlpha: 0 });
const snowTl = gsap.timeline({ paused: true });
snowTl
.to(treeSnow, { autoAlpha: 1, duration: 1 }, "winter")
.to(":root", { "--background": "#edf0ff" }, "winter");
// scroll trigger
ScrollTrigger.create({
trigger: "#winter",
start: "top top",
end: "bottom #end",
onEnter: () => {
hidingText = false;
isWinter = true;
shouldParticleGroupBeVisible(isWinter, "#snowGroup");
checkIfTlShouldPlayOrRestart(snowTl);
shouldSnowDrop(isWinter, ".snowDrop");
animateSeasonTextIn();
},
onEnterBack: () => {
isWinter = true;
shouldParticleGroupBeVisible(isWinter, "#snowGroup");
shouldSnowDrop(isWinter, ".snowDrop");
},
onLeaveBack: () => {
isWinter = false;
shouldParticleGroupBeVisible(isWinter, "#snowGroup");
shouldSnowDrop(isWinter, ".snowDrop");
},
onUpdate: (self) => {
if (self.progress < 0.5 && self.direction === -1) {
animateSeasonTextOut("");
}
if (self.progress > 0.5 && self.direction === 1) {
animateSeasonTextOut("");
}
},
});
/* */
// Progress bar scroll trigger
const progressTl = gsap.timeline({
defaults: { ease: "none" },
scrollTrigger: {
start: "top top",
end:"bottom bottom",
scrub: true,
},
});
progressTl.to('.progress-bar',{value: 100},0)
// onLoad
const onLoad = gsap.timeline({ paused: true });
onLoad
.to(".loader",{autoAlpha:0},'fadeIn')
.to(
"#intro-text",
{
x: 0,
y:0,
autoAlpha: 1,
duration: 1,
ease: "power3.out",
},'fadeIn+=0.45'
)
.to(
seedBtn,
{
y:0,
autoAlpha: 1,
onStart: () => {
// animate the btn
btnTl.play();
},
},'fadeIn+=0.7'
);
/* IMAGESLOADED PRELOADER */
const images = document.querySelectorAll('img');
let imgToLoad = imagesLoaded(images);
let loadedCount = 0;
const loadTl = gsap.timeline({paused:true});
loadTl.to('.loader-bar span', { x: 0, ease: "none",duration: 0.5});
imgToLoad.on('progress',() => {
loadedCount++;
loadingProgress = loadedCount / images.length
gsap.to(loadTl, {
progress: loadingProgress,
ease: "none",
duration: 0.5,
onComplete: () => {
onLoad.play();
},
});
})
Also see: Tab Triggers