Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [animation]

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

2
votes
0answers
44 views

GIF Animation in JME3

I made the following class to handle 2D animation through GIF images. This is made using JME 3.1, Java 8 and this GIF library. Is what I'm doing optimal? Are there already other available libraries or ...
6
votes
1answer
3k views

UIButton subclass with animated 'shimmer' effect

In earlier versions of iOS the lock screen had a 'slide to unlock' element which I'm referencing as a 'shimmer' effect. The effect I'm looking for is simpler: Button starts with single color (e.g. ...
6
votes
1answer
1k views

Scroll animations - setInterval vs. setInterval & requestAnimationFrame

I've recently made a slightly similar question with respect to the rendering performance, however my question this time is a bit different and with respect to which kind of JavaScript approach is the "...
5
votes
1answer
56 views

Drawing a roaming figure in a field, with less flickering

I'm a student to programming. I currently just working a thing where the player can walk around a field of hashtags. so far you can only walk horizontally but before i go any further, i realized that ...
5
votes
2answers
149 views

Simple animation with Javascript and JQuery

I'm learning Javascript and JQuery, and just finished a chapter on JQuery animations.So i decided to give it a try and implement a simple animation on Html document i had. Here is the code: ...
5
votes
0answers
80 views

Android component animatable on its height

I'd like to have a code review for a component which is supposed to be animatable on its height. It's supposed to be a transitioning element. I find it quite laggy on my phone. ...
1
vote
2answers
433 views

JavaScript canvas bouncing objects

I have been playing with JavaScript for some time now and made a simple canvas animation. I tried to make my code clean but I would like to hear your opinions about it. GitHub ...
4
votes
1answer
800 views

JavaFX Smoke Effect (Particle Generator algorithm)

I wrote a "Smoke" effect that I thought I'd post for code review. It's a decorative effect for a puzzle game I'm working on--there will be four of these, animated independently, probably with a ...
1
vote
1answer
36 views

Overriding default animation parameters with custom values

Using JavaScript ES5, I would like to know if you could suggest me a more "elegant" and succinct way to overriding defaults variable when User pass custom values. In the following example, an ...
1
vote
0answers
57 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:...
5
votes
2answers
908 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 ...
1
vote
1answer
48 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
1answer
3k 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 ...
2
votes
0answers
37 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 ...
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
146 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
432 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 ? ...
9
votes
1answer
291 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 ...
3
votes
1answer
533 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 ...
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
1answer
327 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
1answer
309 views

JavaScript to play and replay CSS animations on load and scroll

The following plays and replays CSS animations on load and scroll. It works but I'm wondering if there is a better way to write this, so it's cleaner and performs better. ...
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 ...
27
votes
4answers
7k views

Loading… animating dots in C

I've recently wanted to make a "Loading..." display in C where the dots print one at a time in order and then reset: Suprisingly, there isn't much on the internet for doing this well, so I figured I ...
2
votes
0answers
661 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 ...
12
votes
1answer
12k 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. ...
9
votes
1answer
3k views

Flipbook type animation with Tkinter

I am writing a program in Python that takes a folder of images and animates them. For example, going through a list of pictures like this and animating them one by one: Relevant features include: ...
3
votes
0answers
718 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 ...
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 ...
2
votes
0answers
331 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
377 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
85 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
2k 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 : ...
3
votes
0answers
146 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
103 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. ...
2
votes
0answers
130 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
176 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 ...
2
votes
1answer
162 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. (...
1
vote
1answer
659 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
892 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 ...
1
vote
1answer
225 views

Splitting text into individual characters for animation

I have code which makes use of jQuery and some additional libraries. But the jQuery part is too overwhelming (and thus it does its job slowly). So I tried to optimize it, but had no luck. Now I'm ...
5
votes
1answer
307 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 ...
4
votes
1answer
256 views

CSS3 Dropdown Menu (touch device or mouse compatible)

This may be rather basic, but I wanted to experiment and learn with some of the upcoming CSS3 techniques. I wasn't able to come up with an HTML/CSS only solution, and I had to work longer than I'd ...
3
votes
1answer
1k views

Basic animation in Typescript

I decided to play around with doing my own super-basic animation. For a previous Javascript project, I needed the ability to flash an element. The code below is the result of me attempting to ...
0
votes
1answer
89 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 ...