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
6
votes
3answers
1k views

“Group” animation events in jQuery

I have a number of jQuery animation effects applied to certain elements on the page: ...
1
vote
2answers
107 views

Various animation functions

I been learning web development for 1.5 month now, and I am trying to improve my code. I can achieve what I want, but I think my code is really bad. For example, I have a bunch of jQuery animations ...
9
votes
1answer
305 views

Creating and playing animations for a game using LibGDX

It feels like there's quite a lot of code involved in order to manually build up an animation using the libGDX framework. In my specific case, I am creating a number of animations for a portrait view ...
1
vote
1answer
2k views

“Spinning wheels” - Animated spinner with SVG and Sass-CSS

I've made this little animation using SVG, CSS-keyframes and a bit of Sass. ...
1
vote
0answers
63 views

Animated Ajax loader: Ascending air bubble

This week I've had an idea for an Ajax loader animation: An air bubble ascending in a glass tube. Something like shown here: https://en.wikipedia.org/wiki/Spirit_level#/media/File:...
6
votes
2answers
969 views

Animation of java.awt.Polygons

I made a class capable of moving Polygons around on a Polygon in a mostly smooth manner. Disclaimer: this was part of a school project (thus the use of Polygon rather than Image), but this code is ...
2
votes
1answer
4k views

Animating multiple views in Android efficiently

I am currently making an application where the user will launch the app and the first this we see is the app logo fade in at the center of the screen. After about a second, the logo will translate up ...
1
vote
1answer
51 views

AnimationFrameController: requestAnimationFrame made easy

I am looking for feedback on what I can improve to a tool I have been using for several months now, my AnimationFrameController. I find requestAnimationFrame an ...
2
votes
0answers
39 views

Optimizing rendering with a lot of transformations and save/restore

I have implemented a renderer for shapes described with a L-System grammar. Implementation of that is not important. Basically you feed it an angle and some rules, and it spits out a string of ...
3
votes
1answer
112 views

Mouseover effects for social network icons

Hey so I have written some code out in jQuery, but it seems to violate DRY. I'm not too familiar with JavaScript or jQuery, so I was just asking for some advice on how to optimize this code: ...
1
vote
1answer
3k views

Tinder-esque location pulse animation effect

As shameful as it is to say I wanted to see what all the fuss about was with Tinder, but after downloading it I found I was more interested with its animation effects and started wondering how they ...
1
vote
0answers
54 views

Block breaking with paddle/ball iOS Game

I created an iOS app that recreates the "ball breaking" game where a paddle is used to deflect the ball to break blocks. The main purpose is to get familiar with UI concepts since I have primarily ...
1
vote
0answers
148 views

Line Graph animation with SVG and ES6 template strings

I've made this animation which shall be incorporated in the header of a webpage. Demo with compiled Sass and uncompiled ES6 code: ...
1
vote
0answers
448 views

Pointer hover animation for a five-star-rating picker

I want to shorten my code. You can see the following code i used many function for addClass, removeClass. But it is not usefully. Can do my work in one hover function ? If yes can anyone help me ? ...
3
votes
1answer
577 views

Animating the appearance of a title with CSS

To sum up my project was about making cool animation of titles appearance with an effect of a colored block coming from one side while expanding and disappearing from the others side while contracting ...
7
votes
2answers
1k views

Sprite animation for a game

I'm just getting started with XNA and game development in general. I followed these instructions to create a basic game, then this article to get sprite animations working. Now, I'm trying to ...
1
vote
1answer
344 views

“Star Field” Animation with JavaScript and Sass-CSS

I've have make this animation on the weekend as a "just for fun" thing. And for to play with various techniques I've seen in others code. I think it works quite alright. Nevertheless I would ...
2
votes
0answers
78 views

Simulation of reflected particles

I made a particle simulation in vanilla JavaScript. It can currently handle around 10000 particles (staying 58-60 fps on my machine). For testing, controls are MB1, MB2, R, Z. How can I make this ...
1
vote
0answers
2k views

A custom UIView with gradient fill, border, and variable corner radii

Here is a swift port of UIView subclass that I use often in my apps. It allows me to easily set gradients in place of the backgroundColor property, and also makes it very easy to create views that ...
2
votes
1answer
168 views

Random walker using Processing.JS on Khan Academy, with new walkers generated on mouse click

I've created a project on Khan Academy as part of the Natural Simulations course on random walks. This project is in JavaScript, using the Processing.JS library, slightly modified by Khan Academy. (...
2
votes
0answers
688 views

Custom animated image control

I have written the following control which allows loading a gif from embedded resource, file, or raw Image. It allows for more granular control over the direction ...
6
votes
1answer
588 views

Sample Python dodger game

I got my game working for so far, however, I would like the game to run faster. It's running at approximately 26 FPS when most of the blocks come in; my FPS goal would be about 60 FPS. ...
12
votes
1answer
13k views

Human-like mouse movement

The code will move the mouse from a start point (xs, ys) to finish point (xe, ye) like a human would. I'd like some help possibly shortening the code (by optimizing it) and making it more readable. ...
2
votes
1answer
2k views

Panning JS canvas

I'm experimenting in canvas and trying to create pan effect. I've managed to pan succesfully, but I'm curious if I'm doing it correctly. Since I've come up with the following code myself, I don't know ...
3
votes
0answers
781 views

Alternative for Float Animations

In the Firemonkey framework of Delphi, there's a feature called Float Animations, which allows you to control real-time "animation" of float values. However, in the VCL framework, this feature is not ...
3
votes
2answers
2k views

Text revelation effect

I would be glad if someone could take a look at my code and maybe improve it. It's an animation effect to gradually reveal text as if it were being decoded. I wouldn't mind if it could run with jQuery ...
2
votes
0answers
368 views

Swing keybinding to control an animated car

In my textbook there is no mention of keybindings and it encourages the use of keylistener so there isn't any example code using keybindings for its problems. I was wondering if this is sorta close to ...
1
vote
0answers
392 views

“Moving gradient”-animation with CSS-keyframes and Sass

I've made this animation using Sass and CSS-keyframes. I'm bit worried about my usage of position relative / absolute. Can one expect that it works in all browser reliable? Or to I have to expect ...
3
votes
1answer
88 views

Ribbon animation code too repetitive

I spent the last two days getting a ribbon animation to work with divs so that I can later add li link elements to them to act as a menu. I used the progess bar animation code as inspiration from ...
3
votes
2answers
3k views

JS cross-fade transition

As the question says....Can this be done any better? I could introduce more variables to cut down on function number, but does it make sense? So this is a simple cross-fade between two images : ...
2
votes
0answers
133 views

Animation with JavaScript and Sass : Neon light banner

After reading a bit about CSS3-text-shadows and seeing a few advanced examples I had the idea for a "neon light"-banner. Next idea was to animate it. Finally it has become a mixture between a Sass-...
3
votes
0answers
157 views

Fade and slide animatable elements on window scroll

I wrote a simple JavaScript function to animate objects on my webpage to fade and slide in from the bottom of the screen when the user scrolls them into view. I did this by using JavaScript to add ...
2
votes
0answers
105 views

didSimulatePhysics to animate a ball, taking 45% of CPU

According to my time profiler this is taking 45% of my cpu usage: have tried to optimize, and someone on stack overflow -- recommended to post here. Time profiler says 99% of the time is spent on the ...
1
vote
0answers
29 views

Sass-Mixin for to attach a text-shadow animation upon HTML-elements

I've make these mixins by using SCSS-Sass. Any hints and tipps concerning improvements are welcomed. ...
3
votes
0answers
181 views

Animation for android ImageViews acting as game pieces

My question is about how to achieve a well-performing animation for a set of ImageViews, so that the foreground fades away and the background stays the same. ...
2
votes
1answer
1k views

Scrolling game very slow

I am trying to make a scrolling game in Tkinter. However, with all my for loops and functions it is extremely slow. I am reading the tutorial from Khan Academy's advanced JS. In their JS game ...
1
vote
0answers
34 views

JavaScript-function for to attach CSS-animations

The purpose of the function is to attach CSS-animations to HTML-elements with a text-content property. Like for example h1, div, p etc. It's not fully elaborated. Nevertheless have I decided to put ...
1
vote
1answer
712 views

Parallax animation running well on Chrome but slow on Safari

This is the continuation of a previous question I posted here. I've improved (at least I think so) the initial script from the previous question, now storing the data in an array, it runs slightly ...
5
votes
1answer
960 views

Parallax animation, running well on Chrome but slow on Safari

I have the following script to create a parallax effect on the page using request animation frame, it runs well on Chrome, but on Safari is lagging, I think because I run too many calculations on each ...
5
votes
0answers
95 views

Calculate and apply realistic velocities when animating sprites

I am brand new to Scratch (and animation in general) and have been playing around with various techniques I feel will probably come in handy. My project in question can be viewed here. It started as a ...
10
votes
1answer
278 views

Processing.js particle system

After about half an hour of fooling around with Processing.js/JavaScript, I got this fairly decent particle system set up: ...
2
votes
2answers
238 views

Window-size-dependent navigation menu with animation effects

Other people will be looking at this jquery code and i'm not an expert with jQuery so im asking. How can i make this jQuery code shorter, more efficient, and easier to read? ...
5
votes
1answer
321 views

A “pointless” animation program

The assignment description for this code is this: Each time the user clicks the Circles button, randomly colored circles flow into the display and continuously change their shapes. Here is a ...
7
votes
1answer
259 views

A partially overlapping sequence of jQuery animations

I know this is a mess! How can I write this code better? ...
4
votes
4answers
163 views

Animated scrolling to a place in the same webpage

I'm just beginning web design, and I've come up with this code to scroll to a place in the same page. I don't know if this can or should be improved much longer, so I'm asking for any tips that can ...
2
votes
1answer
44 views

Two sprite-drawing functions for Amara game

Ideally I would have one draw method in the parent class (Player). But I can't figure out how to do this. I don't know if there is anyway to decouple it totally. I ...
0
votes
1answer
92 views

Calculating an object's stopping distance

I'm trying to smooth the movement of a cursor which has a set acceleration and max speed. I wrote this function to calculate the stopping distance of an object given its speed and acceleration, and it ...
3
votes
1answer
630 views

Explosion animation plugin for a game

I have been writing a small particle plugin since I want to learn how physics works for games. Now I have tried to get this as clean as I possible could but It feels something is missing. Am I ...
1
vote
1answer
187 views

Progress indication with animation

I have a game in which the player has to do something within a defined time. E.g.: the player has 10 seconds to complete a level. My current code animates an imageview (it's only a horizontal line) ...
8
votes
1answer
583 views

JavaScript canvas sphere

I made a small demo in JavaScript using HTML5 canvas, which renders a rotating sphere. The sphere is generated by first creating a set amount of points (currently 50, represented by vectors) randomly, ...