Google Web Designer Tips: Part 1

Originally posted on the Google Web Designer blog on December 15, 2017, by San K., Google Web Designer Team.

This document compiles the top tips collected from years of helping users on the forum, and from the Google Web Designer blog posts.

1. Use CSS transform for animation
2. Pixelation when using 3D scale for animation
3. Groups for reusable elements
4. Make an element appear/disappear at a specific time during the animation
5. How to replace an image without losing the events or animation
6. How to update an element's size and position without affecting animation
7. How to loop the Swipeable Gallery infinitely

1. Use CSS transform for animation

Issue: choppy animation when animating Top/Left/Width/Height.

Solution: use CSS transform (3D translation and scale) for animation instead of Top/Left/Width/Height.

Google Web Designer defaults to CSS transform when creating CSS-based animation because the CSS transform property provides a higher frame rate and smoother animation. What this means is that when you use the selection tool to move an element or the transform tool to resize it in an animation, it will default to CSS transform (3D translation and scale section in the Properties panel) (see our help). However, many users change the Top/Left/Width/Height fields in the Properties panel when animating elements and this will cause choppy animation.

To avoid choppy animation, try using 3D translate X and Y for position, and 3D scale for size in the Properties panel when you animate elements. If you use the selection tool (or arrow tool) to move an element or the transform tool to resize an element, that should take care of it for you by default.

1. Position   2. Size

Note: if the animation of an image is choppy on IE when using CSS transform, wrap the image with animation in a div by right clicking on the image and selecting Wrap, then in the Properties panel of the parent div, set Selection 3D Rotation Z to 0.01 to workaround the issue.

2. Pixelation when using 3D scale for animation

Issue: when using 3D scale for animation, the image becomes pixelated when scaled up.

Solution: start with a large image that is the same size as the scaled up image. Add your starting and ending keyframes. At the starting keyframe, scale down the image using the Properties panel's 3D scale options. This creates an animation where the image grows in size without being pixelated.

3. Groups for reusable elements

Grouping objects creates a reusable element that can be placed in documents as "instances", which are references to the group's elements. Any change that is made to the group is reflected in all the instances of that group (see our help).

One example where groups are useful is a CTA button with an exit event that exists on different pages in the creative. Another benefit is that events for the elements in the group are retained in all instances of the group as long as the group instance has an ID assigned to it.

To create a group, right-click on the element on stage and select Create Group...

You can then view the group in the Library panel and drag it on to the stage to create additional instances.

Groups are also used in the Swipeable and Carousel Galleries in dynamic creatives to display a custom layout for each product item in a collection. For example, you can create a group to display a product's image, name, description, price, etc., and this layout can be repeated for each product in the feed. This workflow will be described in a future dynamic tips blog post.

4. Make an element appear/disappear at a specific time during the animation

Issue: how to create an animation with an element that needs to be hidden/shown at certain keyframes.

Solution: use opacity and step-end/step-start easing. You can also watch the YouTube video on this topic here.

In this example, a div is hidden until the 3s mark. Then it is animated until 5s and disappears at 5s. To do this, let’s switch to the timeline’s Advanced mode then select the first keyframe. In the Properties panel of the element, set the opacity to 0 to hide the element.

1. Opacity

Add the second keyframe where you want to show the element, at 3s in this example, and set the opacity of the element to 1.

At this point, if you preview, you will see that the element animates from 0 opacity to 1 because the easing is set to linear by default.

Right-click on the span between the keyframes and change the easing from linear to step-end. At this point, the element will not show until the second keyframe.

1. Opacity   2. step-end easing

Add a third keyframe, at 5s in this example, and animate your element (in this example, it travels across the stage).

To hide the element again, add another keyframe at 5.5s, and set opacity to 0 and easing to step-start.

3. Opacity   4. step-start easing   5. Drag this keyframe close to the keyframe at 5s

Then drag the keyframe so it’s right next to the keyframe at 5s.

Now you have accomplished turning an element on or off at a certain keyframe! You can view the source file or check out our blog post to use other ways to achieve the same effect.

5. How to replace an image without losing the events or animation

Issue: some users build a new creative using an existing creative and want to easily change an image without losing events or animation.

Solution: use Swap image in the context menu (see our help).

Select the image on the stage to be changed, right-click on it, and select Swap image...

In the Swap image dialog, select the new image (if it’s already in the Library), or add a new image and select it. Click OK to save.

6. How to update an element’s size and position without affecting animation

Issue: when building multi-size creatives, many users may start with one size, then build additional sizes using the first completed creative instead of using responsive design. In this workflow, it is necessary to update the element’s size and position in the new creative while keeping the animation the same.

Solution: use CSS transform for animation (solution #1 in this post), then update the Top, Left, Width, and Height properties in the first keyframe in Advanced mode to update the element’s position and size without affecting the animation.

When using animation, the best practice is to animate using CSS transform to avoid choppy animation. In addition to the performance benefit, you can also quickly update the element’s size and/or position without having to update all keyframes.

For example, let’s say you have a 100x100px element at the first keyframe like this:

In the second keyframe, it moves across the screen and shrinks to half of its size like this:

1. Animate by 200px horizontally   2. Reduce size by half

Now let’s say you’re building a bigger creative and the element has to be 200x200px. You can simply select the first keyframe and update the Width and Height properties. Since Width and Height are not used to animate the element, what you change in the first keyframe will propagate across all subsequent keyframes.

3. Select the first keyframe   4. Update width and height

The element will now be 200x200px and travel across the screen by 200px with its size reduced in half:

5. Second keyframe   6. Width and height are the same as in the first keyframe   7. Animated properties remain unchanged

7. How to loop the Swipeable Gallery infinitely

Issue: when autoplay is set, the Swipeable Gallery only autoplays until the last frame and then returns to the first frame.

Solution: autoplay the Swipeable Gallery infinitely by rotating once when the autoplay ends, and setting the rotation time and autoplay duration for smooth looping.

In this example, there are 3 images, autoplay is set in the Properties panel, and autoplay duration is set to 3000 in the Advanced properties for the Swipeable Gallery. This means that the gallery autoplays from the first to the last frame in 3 seconds.

1. Adjust based on the number of images

When you preview, you will see that the Swipeable Gallery autoplays once, then goes back to the first frame and stops. To autoplay it infinitely, add an autoplay ended event to rotate once forward.

  1. Right-click on the Swipeable Gallery and select Add event.
  2. Select Swipeable Gallery > Autoplay ended as the Event.
  3. Select Swipeable Gallery > Rotate once as the Action.
  4. Select the Swipeable Gallery ID as the Receiver.
  5. In Configuration, set the Rotation time to be the same as the autoplay duration. In this example, this is 3000 with forward direction.

Click OK to save.

You now have a working file that loops the Swipeable Gallery infinitely.


We hope you have enjoyed these tips, and don't forget to download the working files and give these solutions a try!

Was this helpful?

How can we improve it?
false
Search
Clear search
Close search
Main menu
14728257691268404754
true
Search Help Center
true
true
true
true
true
5050422
false
false