Pastel Loader

Size
3,365 Kb
Views
28,336

How do I make an pastel loader?

GSAP loader animation. Flexible and configurable with Jade. Simple TweenMax script. SVG stroke drawing. Inspired by Giga Khurtsilava: https://www.behance.net/gallery/29653513/Loaders. What is a pastel loader? How do you make a pastel loader? This script and codes were developed by Arsen Zbidniakov on 13 October 2022, Thursday.

Pastel Loader Previews

Pastel Loader - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pastel Loader</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<figure> <p>Loading</p> <svg x="0" y="0" width="#{box}" height="#{box}" viewBox="0 0 #{box} #{box}" overflow="visible"> <g> <circle cx="#{box/2}" cy="#{box/2}" r="#{box/2}" stroke="#{circle.color}" stroke-width="#{circle.width}" data-offset="#{circle.offset}"></circle> <circle cx="#{box/2}" cy="#{box/2}" r="#{box/2}" stroke="#{circle.color}" stroke-width="#{circle.width}" data-offset="#{circle.offset}"></circle> <circle cx="#{box/2}" cy="#{box/2}" r="#{box/2}" stroke="#{circle.color}" stroke-width="#{circle.width}" data-offset="#{circle.offset}"></circle> </g> <g transform="rotate(180 #{box/2} #{box/2})"> <circle cx="#{box/2}" cy="#{box/2}" r="#{box/2}" stroke="#{circle.color}" stroke-width="#{circle.width}" data-offset="#{circle.offset}"></circle> <circle cx="#{box/2}" cy="#{box/2}" r="#{box/2}" stroke="#{circle.color}" stroke-width="#{circle.width}" data-offset="#{circle.offset}"></circle> <circle cx="#{box/2}" cy="#{box/2}" r="#{box/2}" stroke="#{circle.color}" stroke-width="#{circle.width}" data-offset="#{circle.offset}"></circle> </g> </svg>
</figure> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/gsap/1.16.1/TweenMax.min.js'></script>
<script src='http://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/DrawSVGPlugin.js?r=5'></script> <script src="js/index.js"></script>
</body>
</html>

Pastel Loader - Script Codes CSS Codes

@import url(https://fonts.googleapis.com/css?family=Nunito:700);
body { margin: 0; background: #FED75A; overflow: hidden;
}
figure { display: flex; align-items: center; justify-content: center; position: relative; margin: 0; height: 100vh; width: 100vw;
}
circle { fill: none; stroke-linecap: round;
}
p { position: absolute; top: 0; left: 0; right: 0; margin: 0; color: #EC6D76; text-align: center; text-transform: uppercase; line-height: 100vh; letter-spacing: 4px; font-family: 'Nunito', sans-serif; font-size: 24px;
}

Pastel Loader - Script Codes JS Codes

TweenLite.set('circle', {drawSVG: '0'});
TweenLite.defaultEase = Sine.easeInOut;
var duration = 1.25, ctl = new TimelineMax({repeat: -1}), ptl = new TimelineMax({repeat: -1, yoyo: true});
ptl.add( TweenMax.fromTo('p', duration/2, {opacity: 1}, {opacity: 0.65}) );
$('circle').each(function(index, el){ var offset = $(el).data('offset'); ctl.add(arc(el, (duration - offset)), offset);
});
function arc(circle, duration) { var tl = new TimelineLite(); tl.to(circle, duration*0.9, {drawSVG: '90% 100%'}) .to(circle, duration*0.1, {drawSVG: '99.75% 100%'}); return tl;
}
Pastel Loader - Script Codes
Pastel Loader - Script Codes
Home Page Home
Developer Arsen Zbidniakov
Username ARS
Uploaded October 13, 2022
Rating 4.5
Size 3,365 Kb
Views 28,336
Do you need developer help for Pastel Loader?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Arsen Zbidniakov (ARS) Script Codes
Create amazing sales emails with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!