We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [animation]

For questions related to graphical animations. This includes, but is not limited to sliding, tweening, rotating and resizing of shapes.

Filter by
Sorted by
Tagged with
2
votes
2answers
66 views

Text 'guesser' / tumbler like animation

I made a tumbler thingy... Do you see possible bugs in the code or any improvements I could do? ...
6
votes
1answer
2k views

Grid with images in RecyclerView

I've created a Grid with a RecyclerView similar to the GoogleIO 2014's generic media player one. GoogleIO generic music player Mine The thing is that the images ...
2
votes
1answer
357 views

100 chairs in a circle problem solving with Angular.js and visualization

Here is the problem statement: Take a second to imagine that you are in a room with 100 chairs arranged in a circle. These chairs are numbered sequentially from One to One Hundred. At some point in ...
5
votes
1answer
123 views

Front End Web exercise, no HTML

I was given the following instructions Using the below HTML, using ONLY CSS, JavaScript or jQuery create the following (see attached gif animation): ...
6
votes
1answer
2k views

Java snow animation

I was inspired by this to write a graphic snow animation in Java/Processing. It works great, but it has some design issues. The full project is here on github; ...
5
votes
1answer
141 views

Animation Template Method for Snake Game

I have recently finished my first iteration of a template method implementation for a JavaScript canvas animation of the snake game. However, I would love for the community to critique this code and ...
106
votes
6answers
14k views

How clean is my snow?

I just wrote a snow animation in Python. I think this is fairly clean but I have a few things that I don't like. ...
11
votes
1answer
1k views

“Star Catcher” game

For fun, I have been working on this game I called Star Catcher. It's a very basic game where stars are falling and you try to catch as many of them in your bucket before you miss 10. It's a real mess ...
2
votes
0answers
6k views

Progress bar with percentage counter

Basing my work on a JavaScript progress bar created by another person, I added an animated percentage count. This solution is really ugly but it works. I don't know how to avoid having to declare ...
10
votes
2answers
643 views

Is there a better way to write this jQuery UI effect animation?

I'm writing some code to perform some simple form validation and I would like to display error messages inside the actual relevant textarea by means of a text fadeout/fadein effect. To achieve this I ...
5
votes
1answer
241 views

Retrocomputing scanline function

I need to refactor this code, targeted to Google Chrome (current+) to make it manageable going forward. Here is a working JSBin of the idea. The messiness comes from determining the accurate number ...
4
votes
2answers
153 views

Simple element slider animation tool

I'm new to jQuery and I've been messing about with this code, It works but I want to learn how to shorten the code by the eliminating unnecessary repeated code. Here is a link to JSFiddle HTML <...
3
votes
2answers
142 views

Periodically sliding images

I wrote this code using jQuery, but I think it can be improved. Can you provide some feedback? ...
-1
votes
1answer
264 views
1
vote
1answer
112 views

C64 loading screen

I have made a loading screen (splash screen) just like the old C64. I have used a series of picture boxes and just change the coloured image using a timer and a case statement. ...
1
vote
1answer
73 views

Coffee webpage with laggy animation

Currently designing a homepage and from some initial tests users are experiencing lag. I'm using some Javascript to create a parallel effect as well as an animated "click to explore" loop. Not sure ...
3
votes
2answers
445 views

Console animations

I'm a coder who's relatively new to Python and I wanted to spice up my console applications a bit by making animations. The code I've written works perfectly, but I just wanted to know if it was good ...
7
votes
2answers
29k views

Check image dimensions, calculate aspect ratio, set image dimensions, resize

I have created a set of functions to calculate the aspect ratio of an image, set a height/width on document.ready and on ...
2
votes
3answers
263 views

Animating rotations using jQuery

I am writing a function for a rotating navigation with JS and jQuery. I am using a plugin called jQuery transit for animating rotation. The code works, but it is very long for such a simple function. ...
2
votes
0answers
66 views

Wrapping a small animation library for Angular

I've started out working on a larger project using Angular for the first time. For visual feedback, I'm using Waves (Github) (you can see a demo page here). The standard way to use Waves is to ...
8
votes
2answers
537 views

A “C” shape of 7 boxes that turn green on click

Company name asks you to build a website with 7 boxes shaped like a c, which should turn green on click, and then when all are clicked, should turn red in reverse clicking order. https://jsfiddle.net/...
2
votes
1answer
148 views

Managing “active” and “rest” state for class name-based CSS animations

Started working with CSS animations and I'm wondering if there's a more elegant way to manage (with class names) when an animation is on or off. The general pattern I have is like this: ...
11
votes
2answers
4k views

Making GIFs with Java

I wrote a Java class to make a GIF animation from a list of images. The whole project can be found here. I am pretty new with GitHub, so I would be very glad if you can give critiques regarding my ...
2
votes
2answers
120 views

An “Add” button that clones an item, and a “Remove” button that fades and removes an item

I was looking into removing multiple inputs and selects at once using jQuery, but I couldn't find a solution, so I ended up with the following code: ...
1
vote
1answer
221 views

Animation effects for menu items

I have pieced together some code that works for my project. However, it is pretty long, but self-similar. I am a jQuery beginner and I tried to shorten the code by using variables, but it didn't work ...
2
votes
3answers
134 views

CSS animation via JavaScript

I call this animateElements function as part of an animation loop (inspired via Dave Gamache). Everything works as expected, but I would love to try and improve/...
1
vote
1answer
250 views

Fade-in / fade-out effects for several buttons

The function of this code is to show/hide divs by way of fadeIn/fadeOut, starting with an empty div (home) and fading in one of the other divs (work,cms,contact,) on click, then fading out the last ...
14
votes
5answers
984 views

Animating one of three boxes based on a form value

Is there a better way to do this without using if or case statements? ...
2
votes
1answer
5k views

Scrolling, fade-in, and fade-out effects feeling clunky

I'm coming close to finishing a site where there are a number of jQuery functions going on. They all work, but the page is just running a bit too clunky. The fading in and out is just not as smooth as ...
0
votes
2answers
294 views

Two icon animations — one on the left, one on the right

I have two icon animations that pretty much do the same thing, the only difference between them is positioning... one is left and the other right. I would like to use one block of code for both left ...
3
votes
2answers
197 views

Expandable text boxes for legends of fieldsets

What is the best way to refactor the following script? ...
3
votes
3answers
586 views

jQuery animation and rotation effects for a WordPress site

What is the best way to tidy up JavaScript code I have written? It seems very long winded, any suggestions to shorten it? Note: I'm running it on Wordpress which runs jQuery in nonconflict mode, ...
7
votes
4answers
2k views

Animated scrolling when intra-page links are clicked

I have the following code to get the ID of a <a href="#ID"> </ a> and go to their respective div <div id="" />:...
3
votes
1answer
157 views

Fireworks animation causing high CPU load

This web algorithm is causing even newer computers to freeze with CPU spikes from 20% to 90%! How can I make it more efficient? EDIT: An idea is to somehow get rid of the filter:blur(); property ...
3
votes
1answer
154 views

Animating sprite without libraries

I'm building a small game in pure JS for my own learning purposes, using sprites to model players. Before I go further, I want to try to get the animation down. The below code should produce a blank ...
3
votes
1answer
210 views

Three-layer parallax effect

I want to make it lightweight (fastest, best performance) as it possible for browser, but I have no idea - I haven't huge knowledge about JavaScript. That code run parallax effect on my web page. I ...
3
votes
2answers
532 views

Show and hide posts using setTimeout

I have made an effect that has the h1 move and then reveals p using .addClass, ...
0
votes
1answer
160 views

Yes/no confirmation buttons on a slide-out panel

I have the following js code and am wondering how I can make it clean. It works fine but there are few repetitions. Is there a way to make it more clean? ...
1
vote
0answers
1k views

Dice rolling swipe Android app

So I've got an Android app where if you swipe in a particular direction (UP, DOWN, RIGHT, LEFT), the dice move in that direction using TranslateAnimation. This is ...
10
votes
3answers
728 views

Garbage collection in JavaScript multiplayer game

I am currently creating a Multiplayer Game using node.js and web sockets. The client side is receiving the positional information and applying it to all the players on the client side. Each client ...
1
vote
2answers
387 views

Toggling animations

In the following piece of code I use the same trick three times. But cannot figure out how to write a common function that will do it for all of them. I know there is a toggle method in jQuery that ...
-1
votes
2answers
103 views

Animating 70 classes of models

How do I write this function more efficient? My class names always contain modell and essentially, only the numbers are changing. Is it right that I get a better ...
2
votes
0answers
297 views

Dice-rolling Android app

This is just a simple app. All it's suppose to do is move the dice around the screen when the user swipes up or down. It will move 2 dice (image drawables) to a position on the screen depending ...
2
votes
0answers
256 views

JavaScript library for material design toasts (notifications)

This question is a follow-up question to this one. I wrote a small JavaScript library for material design toasts (notifications). I'd like to know what are my mistakes and how can I correct them? ...
18
votes
2answers
1k views

A Nightmare on setTimeout Street

I have script which plays audio, shows/hides elements: ...
5
votes
1answer
115 views

Game sprite animation

This code animates my main game sprite by increasing the animation frame. First I check if the character is moving, then I increase the animation counter until it reaches the desired speed, and then ...
3
votes
3answers
136 views

Displaying image for the selected year

I have the following code and I'm trying to find a cleaner way to run the year functions. At the moment I have 5 years as divs with an onclick event to bring the appropriate year image into view. So ...
9
votes
2answers
660 views

Smoke particle system

Please note that I'm working on a game on Windows Phone 8 using Monogame. The game is fine (60 FPS) all the time, except when the particle system is activated. This is just a smoke particle system ...
16
votes
2answers
1k views

Sprite animation handler

When a user presses a key in my game, their avatar can move down, left, right or up. By move, I mean their avatar animates while various other things move around them on the screen. This is ...
7
votes
2answers
402 views

jQuery plugin to cycle through text and “typewrite” it out

I have written a jQuery plugin (my first for a long time) that simply cycles through strings of text in a data attribute and uses setInterval to type it out - it's ...