Make Joyful Things

Everything kind of sucks right now. Things—generally—feel bad. Setting aside the broader realities of a global pandemic and rampant social injustices, we’re watching the identity of the web platform, an intrinsically free and open medium of creative expression, co-opted for the “Web 3.0” grift built on artificial scarcity and an accelerating climate crisis.

Websites (mostly) look kind of the same. The proliferation of frameworks, vector design tools, data-driven design and an imperative to maximize business value (oh dear, it was capitalism all along) has led to a status quo of design by default. Websites having their own, consistent, portable UX language that helps users quickly comprehend new sites is great, but embracing that language is a trade-off, and design doldrums is the cost.

What if it didn’t have to be this way? What if we decided to create joy with our work? After all, in a profoundly dark time for many, making someone smile or laugh with your work is a special thing. Shouldn’t we try to do that if we can?

“Okay, you got me, but how?” I hear you ask.

Well, this is how:

The web community is bursting with folks who create joy with their work. Let’s look at how they do it.

Unexpected interactions

Did you know that the web is an interactive medium? I know, weird, right? People get an “oooh neat” feeling when something responds to them. Cats knock stuff off shelves, people hover and click on stuff. It’s simple biology (probably; I’m not a biologist).

Cassie Evans puts the “virtuoso” in SVG (the V stands for virtuoso) (it does not) with this animated portrait on her personal site. I absolutely adore how it tracks the cursor in a natural-feeling way, and I love how her expression changes when you hover an interactive element.

I loved this little hover interaction from Josh Comeau’s site. I thought that there might be a hidden interaction in this 3D illustration, but I was surprised to see the background react to my cursor. As far as I can tell, it doesn’t serve a “purpose” and it cost me a few precious moments I could have spent Engaging With Content, but it made me smile.

This little pop-up book-esque pull tab on Lynn Fisher’s site is lovely. I’m sure a click or scroll would be easier to implement and get the job done, but this is special. It’s different, it’s unexpected. It’s fun. Every single iteration of her site is excellent, so I encourage you to check out her archive.

Animation

We’re finally at the place where motion is baked into design systems and considered (nearly) as important as your typefaces and colors. Despite this, we can still use animation to elevate an interaction from neat to joyful.

Another banger from Josh Comeau: this little interaction on his blog’s Like button. It could just be a ❤️ icon, sure, but it’s full of delightful personality, with lots of appeal and secondary action. The bouncy easing curve and the exuberant expression creates appeal, while the +1 and confetti at the end add some welcome secondary action. This even reinforces the experience because it encourages folks to hit that little button. Go try it out, there are also some wonderful little sound effects!

3D

Between WebGL and CSS 3D, pushing the web beyond two dimensions has been possible for ages. Good news is that it’s still a specialized skill and sometimes a pain in the ass, so it’s still rare. Even after “3D illustration” became all the rage, interactive 3D elements are still a great way to inject a little personality.

lepuzz.com is a joyful website throughout, but I especially love the spinning product images you get on hover.

Internet cryptid “Henry” “Desroches” adds a bit of personality with these animated 3D flags that appear when hovering over his case studies. He uses a noise texture to displace vertices on a plane, which creates this lovely, soothing effect.

Don’t turn this into a listicle, let’s wrap this up

  • Break the rules!
  • Use weird colors!
  • Put animations and interactions where they don’t belong!
  • Use sound effects!

The web is as much a cultural artifact as it is a platform for tricking people into looking at ads. We have the power to make people happy with our work; to share the love in a literal sense.

Understand that prioritizing joy will have a cost. Like everything else involved with making things, its a tradeoff. It might make someone’s computer fans turn on which will make some people—who are not in the pocket of Big Fan—extremely upset. It might be slower, and less usable for folks on slower devices. Creating joy will take time that you can’t spend on maximizing key metrics and synergizing upward overflow; mitigating the negative impacts of these tradeoffs will eat yet more time. There’s a reason that almost all of the above examples are from personal sites and not big Brands, after all.

What if making somebody smile is worth it though? What if it’s worth the cost? In a lot of ways, we’re living in shitty times. It’s worth giving up a little to take your shot at making someone’s day.

Awesome Demos Roundup #19

It’s been a while since our last demos roundup but here it is! A super-collection of the most interesting and creative web experiments of the past couple of weeks. I really hope you enjoy them and that they help you to find new ideas for your own coding adventures.

supershape

by Arno Di Nunzio

Jupiter

by Ben Matthews

DRUM SEQUENCER w/ SAMPLE PAD

by Jacob Kucera

Stage waves

by Liam Egan

nomad

by Stéphane Ginier

PAC-MAN Password Reveal w/ GSAP

by Jhey Tompkins

GSAP Believe – Collage Animation

by Shunya Koide

interstellar

by Arno Di Nunzio

Hexells

by Alexander Mordvintsev

ThreeJS instanced planes

by Francesco Michelini

Liquid masking – scroll

by Cassie Evans

Control

by Liam Egan

Flow field 5

by Yoichi Kobayashi

Breathing Dots

by Matt Rossman

squeeshy

by Sennep

Into the Dark Woods

by Anna the Scavenger

ThreeJS Luminous Pharaon

by Francesco Michelini

ripple

by ycw

Christmas Cannon

by Steve Gardner

Tilting Maze game

by Hunor Marton Borbely

Blob Opera

by David Li

Bubble

by Arno Di Nunzio

Netflix Intro Animation Pure CSS

by Claudio Bonfati

Translucent Pearls

by Arno Di Nunzio

Glassmorphism Creative Cloud App Redesign

by Aysenur Turk

Type Lighter

by Keita Yamada

fire ball 2

by Yoichi Kobayashi

Playing with transmission materials

by Paul Henschel

Stack game with Three.js and Cannon.js

by Hunor Marton Borbely

20.

by ycw

Stick Hero with Canvas

by Hunor Marton Borbely

ripple type

by Keita Yamada

Playground

by Fabio Ottaviani

Synesthesia

by Rikard Lindström

Text warping – Animated

by Lokesh Dhakar

The post Awesome Demos Roundup #19 appeared first on Codrops.

Collective #636



Our Sponsor

The Divi Black Friday Sale

Black Friday is the only time each year that we offer 25% off new Divi memberships and Divi membership upgrades and along with each purchase, customers also get access to a free prize. We are giving away premium Divi modules, child themes and layouts in batches.

Get ready!
























The post Collective #636 appeared first on Codrops.

A Guide to Understanding GSAP JavaScript Animation

The use of animation is one of the best ways to make your website stand out. When smartly implemented, it can dazzle users and call attention to your most important content.

Of course, web animation has been around for years. But it’s really taken off with the spread of HTML5, CSS3 and JavaScript. Adding movement to your site has never been easier – or looked better.

Among the most powerful and fascinating tools for creating animation is the GreenSock Animation Platform (GSAP). It is known for its code-based approach and the ability to create some incredible special effects.

Today, we’ll cover the basics of GSAP. We’ll explain what it is and why you’d want to use it over other techniques. Plus, we’ll show you some examples of what it can do. Let’s get started!

GSAP Logo

Animation Through Code

At first, it may sound counterintuitive. Animation is a highly-visual art. So, why would we want to create this through code, rather than a traditional GUI-based tool? And what advantages does it have over good old CSS3 animation that has been built into the standard?

Here is why GSAP may be your best choice for creating animation:

It Works with the Elements Already on Your Page

Virtually any element on a page that can be accessed through JavaScript can be animated via GSAP. It doesn’t require you to create a separate canvas just for animation. CSS elements, SVG images and even JavaScript objects can be manipulated. This allows you to get up and running more quickly.

Compatibility Is Built In

GSAP has been tested across all the major web browsers – including legacy fare such as Internet Explorer. All of the browser-related tweaks and fallbacks have already been built into the platform. As such, you won’t have to create your own hacks to get things working across the board. This has all been done for you. If something’s not supported by a particular browser, it “silently” fails and won’t produce errors.

Meanwhile, GSAP also plays nicely with a variety of JavaScript frameworks and other technologies. So you can feel free to use it in conjunction with React, Vue or jQuery. Pretty much anything you’re already utilizing on your website is likely to be compatible.

It Uses Familiar, Easy to Learn Syntax

In addition to supporting CSS classes and IDs, GSAP also allows you to style animations using common properties. Formatting your code is a familiar mix of JavaScript and CSS. It even supports hex colors.

Fast Performance

Optimization is one of the key benefits of using GSAP. It offers a combination of HTML5 and JavaScript to allow for incredibly smooth animation. Support for hardware acceleration means that you’ll get great performance – even on slower devices. You can take a speed test to compare it other animation techniques such as jQuery and standard CSS.

Fine-Grain Control

When you start to explore GSAP, you may notice how detail-oriented it is. There is a large selection of built-in features that you can use to create virtually any type of animation. You can, for instance, choose to sequence multiple animations in a row or even randomize them. And that’s not even beginning to scratch the surface of what’s possible.

The documentation is deep and there are plenty of code examples you can use to get started. But to get a better understanding of what GSAP is capable of, this introductory video offers some terrific demonstrations:

There Are Plenty of Extras

The GSAP core package (which is free) is required to get started – and it’s plenty powerful. But there are also a number of available plugins that can help you do more. There are plugins for tasks like morphing elements, implementing physics and visually drawing motion paths.

It’s worth noting, however, that plugins are only available to paying members of “Club GreenSock”. This provides special access to both the plugins and extended commercial licensing.

Plus, features are constantly being added to core. Version 3, for example, offers up a simplified API, staggered tween animations and default animation properties, to name a few.

GSAP in Action

Now that we know a little bit more about what makes GSAP such a compelling option, let’s check out some examples of what it can do.

The great thing about each of the following snippets is that they are hosted on CodePen. So, you can feel free to study them, fork them and get a deeper understanding of how everything works.

Deconstructed Advanced Staggers Grid

See the Pen
GSAP 3 Deconstructed Advanced Staggers Grid
by Pete Barr (@petebarr)
on CodePen.

Crinkled Variable Font

See the Pen
GSAP 3 & ETC Crinkled Variable Font
by Pete Barr (@petebarr)
on CodePen.

Simple Camera

See the Pen
Simple Camera
by Blake Bowen (@osublake)
on CodePen.

GSAP 3 Radio

See the Pen
GSAP 3 Radio
by Kasper De Bruyne (@kdbkapsere)
on CodePen.

MotionPath Distribute

See the Pen
MotionPath Distribute GSAP 3.0
by Craig Roblewsky (@PointC)
on CodePen.

Heartbeat 3.0

See the Pen
Heartbeat 3.0
by Chris Gannon (@chrisgannon)
on CodePen.

Squiggle Text Animation

See the Pen
Squiggle text animation
by Cassie Evans (@cassie-codes)
on CodePen.

Cube Walk

See the Pen
GSAP 3 Cube Walk
by Pete Barr (@petebarr)
on CodePen.

Circle Packed Particles

See the Pen
Circle Packed Particles (GSAP3 + PixiJS v5)
by Steve Gardner (@ste-vg)
on CodePen.

DConstruct

See the Pen
DConstruct
by Cassie Evans (@cassie-codes)
on CodePen.

Powerful Animation Made Easier

When it comes to methods for animating your web projects, GSAP offers a rare combination. It’s more powerful than web standards alone, yet it is also optimized for performance. With most other libraries, you tend to sacrifice the latter to get the former.

This lack of compromise, combined with the shiny examples above, make it easy to see why so many developers have adopted GSAP. GreenSock says over 10 million sites are running the software, and one imagines that number will only continue to grow.

So, if you’re looking to up your animation game, give GSAP a try. You’ll be able to work your way up from basic movements all the way to high-end effects quicker than you may have thought possible.

Collective #537





C537_divi

Our Sponsor

The Ultimate WordPress Page Builder

You’ve never built a WordPress website like this before. Divi is more than just a WordPress theme, it’s a completely new website building platform that replaces the standard WordPress post editor with a vastly superior visual editor.

Try it



C537_aicomponents

Components AI

An experimental platform for exploring generative design systems. You can cycle through generated designs one or many at a time until you find something inspiring.

Check it out




C537_planet

Planet

Nadieh Bremer shares a magnificent project that visualizes how Planet’s satellites create a full image of Earth’s landmass in one single day. Read more about it in this tweet.

Check it out










C537_speech

Verby

A tool for creating and downloading natural voices as mp3 audio files.

Check it out





Collective #537 was written by Pedro Botelho and published on Codrops.

Collective #509







C509_diagonal

Diagonal Containers in CSS

A tutorial by Sebastiano Guerriero, where he shows how to create full-width, diagonal sections in CSS using the clip-path property.

Read it






C509_cube

cube.js

In case you didn’t know about it: Cube.js is an open source modular framework to build analytical web applications.

Check it out












C509_nicedoc

Nicedoc.io

Nicedoc.io aims to reduce the documentation friction, converting any markup file hosted on github.com into great looking documentation.

Check it out



Collective #509 was written by Pedro Botelho and published on Codrops.