You can specify more than two colours, but it is then necessary to include a distance with each one so that the gradient knows when to blend each colour into the next. In this case case, it’s a circle with it’s center position 100 pixels in from the left and 100 pixels from the top. This follows the form *shape* at *position*. The first is the center position for the start of the gradient. The radial-gradient property takes a few arguments. Basic shapeīefore adding details, we’ll create the initial circle shape. I’d recommend using a tool like Autoprefixer, or add in prefixes as needed.
Flat design animation tutorial code#
In the code examples, I’ve left out any browser prefixes. Demo and source codeĪll the examples mentioned can be found via my Codepen account, or by selecting the “Edit on Codepen” links in each example below. Instead of this I’ll try a second approach, making use of CSS gradients to add shading and create the 3D effect on a single element. They also tend to look a bit rough as a smooth sphere would require many elements. A potential downside though is that these require the browser display many elements, which can impact performance. There are some beautiful examples of these. One is to create an actual 3D sphere using lots of elements. There are two ways we could approach making spheres with CSS. Let’s try that, and add some animation to bring them to life. Add some gradients and they become spheres. Want more tips on video production? Check these out.Using the CSS border-radius property, we can create rounded shapes and circles. Take these, and try them out on your next project to bring yourself one step closer to becoming an AE pro! Now remember, this project is just to get you acclimated with the shape modifiers in Shape Layers.
![flat design animation tutorial flat design animation tutorial](https://cdn.dribbble.com/users/2977519/screenshots/6910510/flat-icon-aimation.gif)
Voila! You’ve got yourself a cool little rising smoke animation. At the beginning of it, create a new keyframe for -15. Tap the stopwatch icon to toggle keyframes, and drag your -5 keyframe to the end of the composition. You can round out the corners of your rectangles with a little Round Corners modifier.įinally, to make the smoke look like it’s rising, go back to Repeater one and hop in the Offset settings. Now it’s got that smoke stack motion we’ve been looking for.Īll we’ve got left is to merge all of the layers with a Merge Paths modifier, which should be placed underneath the entire layer. Inside the transform properties of the modifier, change the X position value to -29. Place it under your Repeater modifier, and change the Wiggles/Second to. For this, we will be using the Wiggle Transform modifier. Now it’s starting to take shape! Make it Wiggle
![flat design animation tutorial flat design animation tutorial](https://cdn.dribbble.com/users/2977519/screenshots/6309657/flat_design_chracter_design.jpg)
Close down the drop down menu, and change the Offset parameters to -5. Now, change the Position keyframes by changing the X position to 0, and Y to -59. Go to the transform properties of the repeater, and change the X value to 112 after unclicking the link check box. Open up the Repeater settings, and change the number of Copies to 60. Remember, place it underneath the rectangles, since it will affect anything above it, but not below. Select Repeater, and place it under both of your rectangles. Right next to the Contents part of your shape layer, there’s going to be a drop down menu for Shape Modifiers after you click the Add button.
![flat design animation tutorial flat design animation tutorial](https://i.ytimg.com/vi/KFyNEnUu7Gs/maxresdefault.jpg)
Now, both of your rectangles within your shape layer are ready for manipulation. Change the X scale to 45 and the Y position to -29. Now, go to your duplicated rectangle and open up its scale settings. Remember to only duplicate this one shape, not the entire shape layer that it is nested within. Now, duplicate this one specific shape layer after closing down your drop down menus. Now, change the X axis to 150 and the Y value to 30. Go into the rectangle path drop down menu within the shape layer, and deselect the scaling clickbox next to the X and Y axis.
![flat design animation tutorial flat design animation tutorial](https://cdna.artstation.com/p/assets/images/images/017/636/486/large/joshua-prakash-mobile-apps-development.jpg)
To start it off, you are going to want to create a rectangular shape layer. This example is going to help you get the hang of using shape manipulators so you can incorporate it into your own projects. For this tutorial, we are going to be creating a nice smoke animation that will be spilling out of a neat little robotic house.