New Short Course: How to Shade Animals in Perspective

Post pobrano z: New Short Course: How to Shade Animals in Perspective

Final product image
What You’ll Be Creating

Do you struggle to create convincing shading in your artwork? If you take our new course, How to Shade Animals in Perspective, you’ll learn some fantastic techniques for creating realistic-looking shading in all your future work.

What You’ll Learn

When you draw, you use lines. When you paint, you use light and shadow. To paint realistic, 3D looking forms, you need to understand how various shades create the illusion of depth.

Sketch of animal with perspective lines

The basic principles are easy—you can probably tell the difference between light, shadow, and reflected light. But the real question is: how do you predict the shape of the shadow? How do you guess whether the surface should be bright, dark, or somewhere in between? 

To create convincing shading from imagination, you must be able to answer these questions. In this course, Monika Zagrobelna will teach you some rules you can use to predict shading accurately, and how to simplify them to shade animals quickly and intuitively.

Watch the Introduction

 

Take the Course

You can take our new course straight away with a free 10-day trial of our monthly subscription. If you decide to continue, it costs just $15 a month, and you’ll get unlimited access to our full library of hundreds of courses.

Build on your knowledge and learn how to draw animals in our course How to Draw Animals in Perspective.

A typeface dedicated to the dual personality of the city of Trieste

Post pobrano z: A typeface dedicated to the dual personality of the city of Trieste
first image of the post
Astrid Stavro, the artistic director of Atlas Design, worked on a typeface about the city where she lives and works: Trieste. The Italian city has a dual personality, with architecture inspired by Austria (the closest neighbor) and a very Italian lifestyle. The designer worked on a typeface that reflects this and uses type features to […]

​The Easiest Way to Find a New Job

Post pobrano z: ​The Easiest Way to Find a New Job

As a highly talented developer or designer, shouldn’t companies apply to you? On Hired the traditional process of finding a job is completely reversed. Hired expedites the job search process through an efficient system of:

  1. Companies competing for top talent with visibility into a candidate’s traction on Hired, driving rapid turnaround times from interview to final offer.
  2. Free personalized support on your job hunt. On Hired our Talent Advocates have your back, whether it’s negotiating compensation or preparing for interviews.
  3. Upfront salary, equity and bonus details in every interview request.

Try Hired

Direct Link to ArticlePermalink


​The Easiest Way to Find a New Job is a post from CSS-Tricks

30 Best Stylish Cursive Fonts

Post pobrano z: 30 Best Stylish Cursive Fonts

The key to great design is to know your way around different typefaces. And one of the quickest ways to elevate your designs is with a stylish, cursive font. Check out
this collection of 30 incredible script fonts you’ll want to incorporate into your next creative project!

30 Stylish Cursive Fonts

Whether you love handwritten fonts, vintage-inspired scripts, or squiggly typefaces, we’ve got unique cursive styles just for you!

Explore the amazing collection
of 30 cursive fonts hand-picked from the inspiring sections on GraphicRiver and Envato Elements.

Create phenomenal designs with these fonts or enlist the help of a design professional by contacting the good folks at Envato Studio for custom typography work.

Bromello Typeface

Let’s kick things off with this delicious, curvy typeface. This beautiful modern script features a cool handmade design that is certain to make any poster stand out. Included in this package are a full set of characters, numbers, and convenient stylistic alternatives.

Bromello Typeface

Salma Script Font

Feast your eyes on this gorgeous fresh font. Inspired by a trendy, natural design, this font can be used to highlight any special day in your life. Download this font to get access to several font files that work perfectly with any design software.

Salma Script Font

Martila Font

Explore endless design possibilities with this dreamy Martila font. This wavy typeface is inspired by traditional calligraphy styles and features a simple modern aesthetic that will work perfectly with your next design. Incorporate this font into logos, print work, and so much more!

Martila Font

Marchy Script Font

March into the cursive spirit with this fun script. This modern typeface features a handmade calligraphy style with decorative characters and a dancing baseline. It also comes complete with over 430 glyphs, alternative characters, and all the standard letters you need!

Marchy Script Font

Montic Font

Modern design should always have a nice balance of clean, fluid aesthetics, and this Montic font is a great pick for your calligraphy needs. Created by hand, this wavy font is perfect for any celebration including weddings, engagement parties, and so much more!

Montic Font

Brushgyo Typeface

Perfectly suited for logo design, or any design catering to typography, this stunning typeface features uppercase and lowercase letters, numbers, and all the punctuation you need. Download today to enjoy what this unique font has to offer!

Brushgyo Typeface

Truvaway Script

This delicate font has an interesting mix of beautiful cursive strokes along with a natural handwritten feel. Designed with a clean and classy aesthetic in mind, this signature script is packed with loads of great features and plenty of different options for additional customization.

Truvaway Script

Beautiful Friends Font

We think all our friends are beautiful here at Envato Tuts+! And with this swirly font, you’ll create cute and exciting designs full of fun energy. Make anything you touch adorable with this unique style full of pretty swirls and over a thousand extra glyphs!

Beautiful Friends Font

Leviafan Script Font

Handmade fonts are always the way to go if you want to create showstopping creative designs! And this beautiful cursive font certainly takes the cake! Enjoy the incredible handcrafted design inspired by vintage hand lettering. Incorporate this font into your next creative project for amazing results!

Leviafan Script Font

Risthi Script Font

Show off your awesome and unique point of view with this modern calligraphy typeface. Inspired by stylish copperplate calligraphy fonts, this handwritten typeface is perfect for any modern design. Included in this download are several font files and even a web font version for your convenience.

Risthi Script Font

Qoobly Typeface

Get that authentic handcrafted feel with this amazing script font. It’s designed with thick curvy lines that are accented by much daintier ones, and we’re sure you’ll definitely find a use for this beautiful typeface. Included in this package are two different font files you can use with either Macs or PCs.

Qoobly Typeface

Afrile Script Font

A gentle font with gorgeous fluid curves, the Afrile script is certainly a stunner! This elegant typeface features a smooth calligraphy design packaged with all the letters, numbers, and punctuation you need for outstanding logos and prints!

Afrile Script Font

Evelyn Script Font

We can hear the wedding bells ringing for this stunning script font. Evelyn is a modern calligraphy typeface that makes any design look incredible. Included in this download is a full set of letters and numbers, along with over 300 glyphs for more creative options.

Evelyn Script Font

Northshire Script Family

If you’re looking for a font with a little edge then you’ll definitely love this Northshire script. A dual-purpose font inspired by messy brush lettering, this script features a full set of capital and lowercase letters, numbers, and extra glyphs to help elevate your designs.

Northshire Script Family

Morning Wishes Font

Inspired by traditional handwritten styles, this cursive font features a beautiful calligraphy style you’ll wish was your own handwriting. Included in this download are several font files and all the letters you need for gorgeous typography designs.

Morning Wishes Font

Olivia Sand Typeface & Flowers Set

Need a charming typeface with a dainty design? Then you’ll definitely love this Olivia Sand font. This incredible package features all the basic characters and numbers you need along with 21 additional PNG files of beautiful watercolor flowers for stunning handmade designs.

Olivia Sand Typeface  Flowers set

Ilana Bloom Font

This gorgeous font will have you feeling as if you’re walking through a gorgeous spring meadow. And this package comes complete with regular font files, scripts, and even decorative swashes for additional creative designs.

Ilana Bloom Font

DrusticDialy Font

There’s nothing quite like the charm of old vintage style to add a certain rustic quality to your custom designs. And with this unique typeface, you can enjoy that weathered vintage look for all your logos or print designs. This package features several stylistic alternatives including serif, script halftone, and condensed italic versions.

DrusticDialy Font

Brandine Font

Sometimes all you need for a great design is a little feminine touch. And with this thin typeface, you’ll get access to a unique cursive font created from skinny watercolor brushes. Download this file to enjoy all your basic characters along with ligatures and accented glyphs.

Brandine Font

Novitha Script Font

Enjoy the beautiful, high-quality resolution of this unique brush font. Created by hand using a brush pen, this font features a full set of characters, numbers, and even full support for over 30 different languages!

Novitha Script Font

Start Today Script

Get inspired by this fun script to create something awesome today! This hand brush font duo features a casual design with incredible texture. Download this package today to get access to a full set of letters, alternative characters, and international support.

Start Today Script

Margot & Margery Typeface

Handmade fonts always have their own personality and style, and this fun typeface is certainly no different! Included in this package is a unique brush typeface available in several font files, with additional ligatures and glyphs for your convenience.

Margot  Margery Typeface

Shellahera Font Pack

Originally created by hand with a brush pen, this font was later scanned in at a high resolution and transformed into a remarkable digital font. With so much personality and a beautiful dancing baseline, this font offers a basic script version for download, along with a unique sans version and additional creative ornaments.

Shellahera Font Pack

Honeycomb Font

One of the amazing benefits to font packages is all of the incredible goodies you get with each download. And with this Honeycomb typeface, you’ll love the flirty script font shown below, as well as the amazing gold foil patterns included in this package.

Honeycomb Font

Destiny Font

It may just be your destiny to download this elegant font. This modern typeface features a curvy calligraphy style developed from traditional cursive handwriting. Elevate your wedding invitations and so much more with this multipurpose typeface.

Destiny Font

Aaron Script Font

A calligraphy font featuring a contemporary design, this Aaron script works perfectly for elegant creations. Use it for wedding stationery or letterheads, or adorn your t-shirts with its unique design. With over 400 glyphs and 190 alternate characters to choose from, you’ll definitely want to add this one to your graphic design kit!

Aaron Script Font

Florence Brush Font

This delicious handwritten font features an awesome handmade brush style with thick, curvy letters. It’s perfect for letterheads, apparel design, and so much more! Download this package today to get access to alternate letters, ligatures, and awesome splashes!

Florence Brush Font

Adorabelle Font

We think this flirty, pretty font is simply adorable! A modern script typeface with a uniquely fresh design, this font would work perfectly on branding materials, greeting cards, and more! Included in this package are decorative characters and over 500 glyphs for outstanding creative designs.

Adorabelle Font

La Venice Font

You’ll be missing all the sights and scenes of the LA boardwalk with this vintage-inspired font. Designed after the incredible details of vintage LA signs, this font features several font files with a bonus pack of watercolor flowers.

La Venice Font

Keyline Script Font

Get in line with this stunning Keyline script. A unique typeface featuring a thick, marker pen style, this package includes all the letters you need as well as glyphs and multilingual support. Download this font today to take your designs to a whole new level!

Keyline Script Font

Conclusion

This list is jam-packed with exciting resources for the avid designer
familiar with different typeface formats. For additional help with all your font needs, enlist the skills of a talented
professional by choosing one of the amazing designers from Envato Studio.

And with hundreds of cursive fonts available at your fingertips, chances are we’ve missed a few to add to your personal collection. Be sure to browse GraphicRiver and Envato Elements for more resources, and let us know your favorites in the comments below!

Intro to Vue.js: Animations

Post pobrano z: Intro to Vue.js: Animations

This is the fifth part in a five-part series about the JavaScript framework, Vue.js. In this last part of the series, we’ll cover Animations (if you know me at all, you probably knew this was coming). This is not intended to be a complete guide, but rather an overview of the basics to get you up and running so you can get to know Vue.js and understand what the framework has to offer.

Article Series:

  1. Rendering, Directives, and Events
  2. Components, Props, and Slots
  3. Vue-cli
  4. Vuex
  5. Animations (You are here!)

Some background

There are built-in <transition> and <transition-group> components that allow for both CSS and JS hooks. If you come from React, the concept behind the transition component will be familiar to you, because it works similarly to ReactCSSTransitionGroup in relationship to lifecycle hooks, but it has some notable differences that make nerds like me excited.

We’ll start off by talking about CSS Transitions, then move on to CSS Animations, then we’ll talk about JS Animation Hooks and then animating with Lifecycle Methods. Transitioning state is out of the scope of this article, but it is possible. Here’s a well-commented Pen I made that does just that. I could probably be convinced to write that article too, once I take a long nap.

Transitions vs. Animations

Just in case you’re confused by why Transitions and Animations have different sections in this article, let me explain that though they sound similar, they’re a bit different. A transition basically works by interpolating the values from state to another. We can do great things with them, but they are rather simple. Here, to there, and back again.

Animations are a bit different in that you can make multiple states occur within one declaration. For instance, you could set a keyframe 50% into the animation, and then another totally different thing can occur at 70%, and so on. You can even chain many animations with delays for really complex movement. Animations have the ability to behave like transitions, where we only interpolate something from here to there, but transitions can’t have multiple steps like an animation (not without some crazy hacky development that it’s not really supposed to be used for.)

In terms of tools, both are useful. Think of transitions as a saw and animations as a powersaw. Sometimes you just need to saw one thing and it would be silly to go out and buy really expensive equipment. For other more robust projects, it makes more sense to make the powersaw investment.

Now that we have those basics down, let’s talk about Vue!

CSS Transitions

Let’s say we have a simple modal. The modal shows and hides on a click of a button. Based on the previous sections, we already know that we might: make a Vue instance with a button, make a child component from that instance, set the data on the state so that it toggles some sort of boolean and add an event handler to show and hide this child component. We could use v-if or v-show to toggle the visibility. We might even use a slot to pass the button toggle into the modal as well.

<div id="app">
  <h3>Let's trigger this here modal!</h3>
  <button @click="toggleShow">
    <span v-if="isShowing">Hide child</span>
    <span v-else>Show child</span>
  </button>
  <app-child v-if="isShowing" class="modal">
    <button @click="toggleShow">
      Close
    </button>
  </app-child>
</div>

<script type="text/x-template" id="childarea">
  <div>
    <h2>Here I am!</h2>
    <slot></slot>
  </div>
</script>
const Child = {
  template: '#childarea'
};

new Vue({
  el: '#app',
  data() {
    return {
      isShowing: false
    }
  },
  methods: {
    toggleShow() {
      this.isShowing = !this.isShowing;
    }
  },
  components: {
    appChild: Child
  }
});

See the Pen by Sarah Drasner.

This works, but it’s pretty jarring to have that modal just pop in our faces like that. 😳

We’re already mounting and unmounting that child component with v-if, so Vue will let us track changes on that event if we wrap that conditional in a transition component:

<transition name="fade">
  <app-child v-if="isShowing" class="modal">
    <button @click="toggleShow">
      Close
    </button>
  </app-child>
</transition>

Now, we could just use <transition> out of the box. This will give us a v- prefix for some transition hooks we can use in our CSS. It will offer enter/leave which is the position that the animation starts with on the first frame, enter-active/leave-active while the animation is running- this is the one you’d place the animation properties themselves on, and enter-to/leave-to, which specifies where the element should be on the last frame.

I’m going to use a graphic from the docs to show this because I think it describes the classes as beautifully and clearly as possible:

transition classes

Personally, I don’t usually work with the default v- prefix. I’ll always give the transition a name so that there are no collisions if I want to eventually apply another animation. It’s not hard to do so, as you can see above, we simply added a name attribute to the transition component: name="fade".

Now that we have our hooks, we can create the transition using them:

.fade-enter-active, .fade-leave-active {
  transition: opacity 0.25s ease-out;
}

.fade-enter, .fade-leave-to {
  opacity: 0;
}

The .fade-enter-active and .fade-leave-active classes will be where we apply the actual transition. This is normal CSS, you can pass in cubic-beziers for eases, delays, or specify other properties to transition. Truthfully, this would also work just as well if you placed the transition in these classes on the component classes themselves as a default. These don’t necessarily need to be defined by the transition component hooks. They’ll just chill there, and wait until that property changes and use it to transition if it does. (so you would still need the transition component and .fade-enter, .fade-leave-to). The one reason I do use it on the enter-active and leave-active classes is that I can reuse the same transition for other elements as well, and not run around the codebase applying the same default CSS to each instance.

Another thing to note here: I’m using ease-out for both active classes. This works and looks fine for something like opacity. But you may find that if you’re transitioning properties such as transform, you might want to separate the two and use ease-out for the enter-active class and ease-in for the enter-leave class (or cubic-beziers that vaguely follow the same curve). I find it makes the animation look more… classy (har har).

You can see we’ve also set the .fade-enter and the .fade-to to opacity: 0. These will be the first and last positions of the animation, the initial state as it mounts, the end state as it unmounts. You may think you need to set opacity: 1 on .fade-enter-to, and .fade-leave, but that is unnecessary as it’s the default state for the component, so it would be redundant. CSS transitions and animations will always use the default state unless told otherwise.

See the Pen by Sarah Drasner.

This works nicely! But what would happen if we wanted to make that background content fade out of view, so that the modal took center stage and the background lost focus? We can’t use the <transition> component, as that component works based on something being mounted or unmounted, and the background is just sticking around. What we can do is transition classes based on the state, and use the classes to create CSS transitions that alter the background:

<div v-bind:class="[isShowing ? blurClass : '', bkClass]">
    <h3>Let's trigger this here modal!</h3>
    <button @click="toggleShow">
      <span v-if="isShowing">Hide child</span>
      <span v-else>Show child</span>
    </button>
  </div>
.bk {
  transition: all 0.1s ease-out;
}

.blur {
  filter: blur(2px);
  opacity: 0.4;
}
new Vue({
  el: '#app',
  data() {
    return {
      isShowing: false,
      bkClass: 'bk',
      blurClass: 'blur'
    }
  },
  ...
});

See the Pen by Sarah Drasner.

CSS Animation

Now that we understand how transitions work, we can build off of those core concepts to create some nice CSS animations. We’ll still use the <transition> component, and we’ll still give it a name, allowing us to have the same class hooks. The difference here will be that instead of just setting the final state and saying how we want it to interpolate between beginning and end, we’ll use @keyframes in CSS to create fun and lovely effects.

In the last section, we talked a little about how you can designate a special name for the transition component that we can then use as class hooks. But in this section, we’ll go a step further, and apply different class hooks to different sections of the animation. You’ll recall that enter-active and leave-active is where all the juicy business of animating happens. We can set different properties on each of these class hooks, but we can go one step further and give special classes to each instance:

enter-active-class="toasty"
leave-active-class="bounceOut"

This means we can reuse those classes or even plug into the classes from CSS animation libraries.

Let’s say we want a ball to bounce in and roll out:

<div id="app">
  <h3>Bounce the Ball!</h3>
  <button @click="toggleShow">
    <span v-if="isShowing">Get it gone!</span>
    <span v-else>Here we go!</span>
  </button>
  <transition
    name="ballmove"
    enter-active-class="bouncein"
    leave-active-class="rollout">
  <div v-if="isShowing">
    <app-child class="child"></app-child>
  </div>
  </transition>
</div>

For the bounce, we’d need a lot of keyframes if we want to do this in CSS (though in JS this could be one line of code), we also will use a SASS mixin to keep our styles DRY (don’t repeat yourself). We’ve also designated the .ballmove-enter class to let the component know that it should start offscreen:

@mixin ballb($yaxis: 0) {
  transform: translate3d(0, $yaxis, 0);
}

@keyframes bouncein { 
  1% { @include ballb(-400px); }
  20%, 40%, 60%, 80%, 95%, 99%, 100% { @include ballb() }
  30% { @include ballb(-80px); }
  50% { @include ballb(-40px); }
  70% { @include ballb(-30px); }
  90% { @include ballb(-15px); }
  97% { @include ballb(-10px); }
}

.bouncein { 
  animation: bouncein 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.ballmove-enter {
  @include ballb(-400px);
}

For rolling the ball out, you can see that we need to nest two different animations. This is because the transform is being applied to the entire child component, and spinning the whole thing would result in a huge rotation. So we’ll move the component across the screen with a translation, and spin the ball within with a rotation:

@keyframes rollout { 
  0% { transform: translate3d(0, 300px, 0); }
  100% { transform: translate3d(1000px, 300px, 0); }
}

@keyframes ballroll {
  0% { transform: rotate(0); }
  100% { transform: rotate(1000deg); }
}

.rollout { 
  width: 60px;
  height: 60px;
  animation: rollout 2s cubic-bezier(0.55, 0.085, 0.68, 0.53) both; 
  div {
    animation: ballroll 2s cubic-bezier(0.55, 0.085, 0.68, 0.53) both; 
  }
}

See the Pen Ball Bouncing using Vue transition and CSS Animation by Sarah Drasner (@sdras) on CodePen.

Sweet, Sweet Transition Modes

Do you recall when I said that Vue offers some really nice sugary bits in transitions that make nerds like me happy? Here’s a small one that I really love. If you try to transition one component in while another component is leaving, you’ll end up with this really weird moment where both exist at the same time and then snap back into place (this small example from the Vue docs):

Vue offers transition modes, which will allow you to transition one component out while bringing another component in without any strange position flashing or blocking. It does so by ordering the transitioning instead of having them occur at the same time. There are two modes to choose from:

In-out: The current element waits until the new element is done transitioning in to fire

Out-in: The current element transitions out and then the new element transitions in.

Check out the demo below. You can see the mode- out-in on the transition component so that it appears that only one piece is flipping:

<transition name="flip" mode="out-in">
  <slot v-if="!isShowing"></slot>
  <img v-else src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/28963/cartoonvideo14.jpeg" />
</transition>

See the Pen Vue in-out modes by Sarah Drasner (@sdras) on CodePen.

If we were to take out that mode, you can see that one flip obscures the other, and the animation looks jarring, not at all the effect we want to achieve:

See the Pen Vue in-out modes – no modes contrast by Sarah Drasner (@sdras) on CodePen.

JS Animation

We have some nice JS hooks that are very easy to use or not use as we see fit for our animation. All hooks pass in the el parameter (short for element) except on the actual animation hooks, enter and leave, which also pass done as a parameter, which, you guessed it, is used to tell Vue that the animation is completed. You’ll notice we’re also binding CSS to a falsy value to let the component know we’ll be using JavaScript instead of CSS.

<transition 
  @before-enter="beforeEnter"
  @enter="enter"
  @after-enter="afterEnter"
  @enter-cancelled="enterCancelled"

  @before-Leave="beforeLeave"
  @leave="leave"
  @after-leave="afterLeave"
  @leave-cancelled="leaveCancelled"
  :css="false">
 
 </transition>

At the most basic level, this is really what you would need for an entrance and exit animation, including the corresponding methods:

<transition 
  @enter="enterEl"
  @leave="leaveEl"
  :css="false">
 <!-- put element here-->
 </transition>
methods: {
   enterEl(el, done) {
     //entrance animation
     done();
  },
  leaveEl(el, done) {
    //exit animation
    done();
  },
}

Here’s an example of how I would use this to plug into a GreenSock timeline:

new Vue({
  el: '#app',
  data() {
    return {
      message: 'This is a good place to type things.',
      load: false
    }
  },
  methods: {
    beforeEnter(el) {
      TweenMax.set(el, {
        transformPerspective: 600,
        perspective: 300,
        transformStyle: "preserve-3d",
        autoAlpha: 1
      });
    },
    enter(el, done) {
      ...
      
      tl.add("drop");
      for (var i = 0; i < wordCount; i++) {
        tl.from(split.words[i], 1.5, {
          z: Math.floor(Math.random() * (1 + 150 - -150) + -150),
          ease: Bounce.easeOut
        }, "drop+=0." + (i/ 0.5));
       ...
      
    }
  }
});

See the Pen Vue Book Content Typer by Sarah Drasner (@sdras) on CodePen.

Two of the more interesting things to note in the above animation, I’m passing {onComplete:done} as a parameter to the Timeline instance, and I’m using the beforeEnter hook to place my TweenMax.set code, which allows me to set any properties on the words I need for the animation before it happens, in this case, things like transform-style: preserve-3d.

It’s important to note that you can also set what you want for the animation directly in the CSS as the default state as well. People sometimes ask me how to decide what to set in the CSS and what to set in TweenMax.set. As a rule of thumb, I generally put any properties I need specifically for the animation into the TweenMax.set. That way if something in the animation changes and I need to update it, it’s already part of my workflow.

Animations in Lifecycle Hooks

All of this is really nice, but what happens if you need to animate something very complex, something that works with a ton of DOM elements? This is a really nice time to use some lifecycle methods. In the following animation, we have used both the <transition> component as well as the mounted() method to create some animations.

See the Pen Vue Weather Notifier by Sarah Drasner (@sdras) on CodePen.

When we transition a single element, we’ll use the transition component, for instance, when the stroke around the phone button shows up:

<transition 
  @before-enter="beforeEnterStroke"
  @enter="enterStroke"
  :css="false"
  appear>
  <path class="main-button" d="M413,272.2c5.1,1.4,7.2,4.7,4.7,7.4s-8.7,3.8-13.8,2.5-7.2-4.7-4.7-7.4S407.9,270.9,413,272.2Z" transform="translate(0 58)" fill="none"/>
</transition>
beforeEnterStroke(el) {
  el.style.strokeWidth = 0;
  el.style.stroke = 'orange';
},
enterStroke(el, done) {
  const tl = new TimelineMax({
    onComplete: done
  });

  tl.to(el, 0.75, {
    strokeWidth: 1,
    ease: Circ.easeOut
  }, 1);

  tl.to(el, 4, {
    strokeWidth: 0,
    opacity: 0,
    ease: Sine.easeOut
  });
},

But when a component first shows up and we have 30 elements or more animating, it would not longer be efficient to wrap each one in a separate transition component. So, we’ll use the lifecycle methods we mentioned in section 3 of this series to hook into the same event that the transition hook is using under the hook: mounted()

const Tornadoarea = {
  template: '#tornadoarea',
  mounted () {
    let audio = new Audio('https://s3-us-west-2.amazonaws.com/s.cdpn.io/28963/tornado.mp3'),
        tl = new TimelineMax();

    audio.play();
    tl.add("tornado");

    //tornado timeline begins
    tl.staggerFromTo(".tornado-group ellipse", 1, {
      opacity: 0
    }, {
      opacity: 1,
      ease: Sine.easeOut
    }, 0.15, "tornado");
    ...
    }
};

We can really use either depending on what’s more efficient and as you can see, you can create really complex effects. Vue offers a really beautiful and flexible API, not just for creating composable front-end architecture, but also for fluid movement and seamless transitions between views.

Conclusion

This series of articles is not intended to be documentation. Though we’ve covered a lot of ground, there’s still so much more to explore: routing, mixins, server-side rendering, etc. There are so many amazing things to work with. Head over to the very excellent docs and this repo full of examples and resources to dig in further. There is also a book called The Majesty of Vue.js, and courses on Egghead.io and Udemy.

Many thanks to Robin Rendle, Chris Coyier, Blake Newman, and Evan You for proofreading various sections of this series. I hope this series conveys why I’m so excited about Vue and helps you get up and running trying out some of the material!

Article Series:

  1. Rendering, Directives, and Events
  2. Components, Props, and Slots
  3. Vue-cli
  4. Vuex
  5. Animations (You are here!)

Intro to Vue.js: Animations is a post from CSS-Tricks

Contest: I’ll Come To Your Office

Post pobrano z: Contest: I’ll Come To Your Office

I’ll fly to you and spend the day! Media Temple is sponsoring it, so it doesn’t cost either of us anything. Only one lucky winner, though. All you gotta do is fill out the form (with your email address) and explain why you’re interested. Enter by February 28, winners picked March 24.

Direct Link to ArticlePermalink


Contest: I’ll Come To Your Office is a post from CSS-Tricks

Some Math Links

Post pobrano z: Some Math Links

I read a few stories about math lately. One of them is a story by Kevin Hartnett about Francis Su, who believes math can be a gateway to a better life. To Live Your Best Life, Do Mathematics.:

Christopher, an inmate serving a long sentence for armed robbery who had begun to teach himself math from textbooks he had ordered. After seven years in prison, during which he studied algebra, trigonometry, geometry and calculus, he wrote to Su asking for advice on how to continue his work. After Su told this story, he asked the packed ballroom at the Marriott Marquis, his voice breaking: „When you think of who does mathematics, do you think of Christopher?”

If I learn mathematics and I become a better thinker, I develop perseverance, because I know what it’s like to wrestle with a hard problem, and I develop hopefulness that I will actually solve these problems. And some people experience a kind of transcendent wonder that they’re seeing something true about the universe. That’s a source of joy and flourishing.

And another by Jinju Jang, The story of a designer conquering mathematics.:

 I was quite proud of my artwork. It looked interesting, saved so much time compared to creating the same design in Illustrator or Photoshop. However, I realised without understanding geometry, there was no chance for me to reach somewhere near to Marius Watz.

Jinju slowly leveled up her math skills, applying it to everything she did along the way.

Of course, this all reminds me of Ana Tudor, who is an unconventional (and at times self-deprecating) mathematician, who uses her considerable math skills to create art with code.

And also a wonderful recent talk by Natalya Shelburne, Color Theory for people who code SVG and CSS. Here’s a million dollar quote, very slightly paraphrased:

If someone says to you, don’t you miss doing creative stuff, as an engineer? Don’t you miss the creativity of the art world? You can say: I’m working on an infinite canvas capable of any size and shape, that’s already glowing every color possible into the eyes of just about everyone on the planet. And I get to decide the kind of experience, feeling, and emotion they are going to have. How is that not creative?

More on color theory from our own Sarah Drasner: A Nerd’s Guide to Color on the Web


Some Math Links is a post from CSS-Tricks