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
2answers
170 views

Java game development image animation

I was wondering if someone could look at my animation for me to see if I am doing it correctly. I am currently programming a basic game in Java, nothing fancy though, and I just want to get the ...
5
votes
2answers
7k views

Elevator program code challenge

I recently applied for a job where the company gave me the following prompt for a code challenge. They have since told me "yeah, no thanks" but provided me with no feedback about why they came to that ...
5
votes
3answers
9k views

Multiple random falling objects animation in Java

I am new to programming but I tried to make my code as readable as possible! Hopefully you can see what it does before you run the program. I did not implement a ups or fps controller, the animation ...
7
votes
3answers
9k views

Simple random falling object animation in Java

I am new to programming but I tried to make my code as readable as possible! Hopefully you can see what it does before you run the program. I did not implement an ups or fps controller, the animation ...
6
votes
2answers
429 views

Particles moving around a Perlin Noise field

I made this sketch in Processing (basically Java) that consists of a bunch of particles moving around a Perlin Noise field. Each particle is aware of the position of one other particle and this ...
1
vote
0answers
567 views

CPU friendly infinite text scroller - velocity

I've done some research today and read a lot about JavaScript performance. I learned that animating using the transform: translate makes a use of the GPU, hence ...
8
votes
2answers
388 views

Set theory clock code

I wrote some JS to power an HTML/CSS "set theory" clock, and I'd like to share what I have so far and ask if anyone can suggest improvements. Specifically, I'm wondering: Should I bother checking to ...
2
votes
1answer
303 views

Loading screen animation

I am trying to make a loading screen but my code isn't DRY. How could I make it DRY? I have thought about using CSS3 keyframes but I might have problems cross-platform. ...
23
votes
1answer
971 views

Simon Says: “Make me a circular window”

This is my first time messing with non-rectangular windows and animations in WPF, so while I'm working on all the bugs I'm having with the actual game code, I'm submitting the XAML for review - I don'...
13
votes
2answers
71k views

Fade-in and fade-out in pure JavaScript

I decided to build my own fade-in fade-out function, since that is all I need on my page. Please comment on things I can make better. ...
3
votes
2answers
2k views

Remove, Append, and Resize Using jQuery

I'm trying to essentially replace an element and make it transition smoothly to the new size... I started off trying to work with the appended element itself, but the padding and margins made that ...
3
votes
2answers
295 views

Making a ul list element animation on hover

I have an experimental script that makes an animation of a ul list element background-position, when the list element is hovered. Is there another way to manage ...
5
votes
2answers
170 views

Consecutive animations

I'm new to Core Animations, I want to fade out two different layers one after another.I write them in a CATransaction block. I wonder if there is better approach to make such animations. ...
3
votes
1answer
1k views

Generating SVG animation of falling leaves

This is a Python script I wrote to generate a SVG animation of falling leaves. How can I simplify my script and also make the animation look more realistic? ...
6
votes
3answers
1k views

Bouncing ball simulation

I was fooling around with some maths and realized that I could use a parabola to represent a bouncing ball. So, naturally, I decided to make it in code. ...
5
votes
1answer
1k views

Custom marquee consumes a lot of CPU power

I've a code which applies marquee to certain elements by using the requestAnimFrame method. However, when I test my application on a lower spec PC (Intel Celeron 2....
2
votes
2answers
1k views
6
votes
2answers
95 views

Reducing code for animation of expanding menus

I wonder if I can reduce the code to optimize it better? ...
2
votes
4answers
257 views

Using visual themes in a game

In my small application, I need to use a variety of visual themes. The simplified structure of this class: ...
17
votes
1answer
4k views

Bouncing stacking boxes

I'm not sure if it would be better to make the envelope into an extension of the Rectangle constructor. The physics seem a bit dodgy, it works well most of the time, but sometimes the boxes overlap ...
7
votes
1answer
2k views

Optimizing very simple piece of “Game of Life” code by taking advantage of NumPy's functionality

Here is the code as it stands right now: ...
2
votes
3answers
135 views

Animating the opacity of certain page elements

I wrote this jQuery code to animate the opacity (sort of Fadein) of certain elements on my page in consecutive order. It feels very inelegant, though. ...
7
votes
1answer
167 views

Upgrading animation code

I understand that this animation code is outdated: ...
3
votes
1answer
64 views
3
votes
1answer
6k views

Loading GIF form on a Windows console app using threads

I have a main form which does processing for an extended period of time. Normally, progress bars are used to show either the loading status or simply show the program is still running/hasn't freezed. ...
3
votes
1answer
692 views

Loop Animation on several UIButton's NSLayoutConstraint

I took the belated plunge to look at Autolayout. Normally I'd animate based on a UIView's frame (i.e I'd have used the following): ...
5
votes
1answer
79 views

Animated magazine

How can I write this code better? I'm doing an animated magazine, so I run and then clean the animation per page. ...
3
votes
1answer
3k views

UISegmentedControl with view-animation

I have create a UISegmentedControl and a view under it. The view under contains all a view for each segment. I am doing an animation when the segment is changing. ...
7
votes
1answer
1k views

Algorithm simulator (bubble and selection sorts)

I am concerned where it can be improved. Main concerns are coding style. Any other improvements are welcome too. Priority is on JavaScript, review for HTML/CSS are welcome too. What it does: ...
4
votes
2answers
1k views

GameLoop with requestAnimationFrame

I am creating a HTML game where you fight monsters and stuff and this is part of the game loop for dealing damage: ...
2
votes
1answer
2k views

Loader animation using Custom View in Android

I created a loader animation for an Android app: a simple 3 dots loader. Is this the correct way to animate by using TimerTask? ...
3
votes
2answers
21k views

Acceptable way of using jQuery methods in Angular directives

Here is my plunker example of what I am doing. jQuery is a great way to use slide transitions and seem to work well with angular as long as you are only using the methods on the element object inside ...
10
votes
1answer
265 views

Making a square move counter-clockwise around the edge

This is so ugly code. There must be better way to write it, but I'm noob to AS3. The goal is to make a square move at even speed counter-clockwise around the edge and on call ...
12
votes
3answers
693 views

A flashing ! exclamation ! point ! bar

I have this Objective-C code for use in an iOS app that makes a 'bar' on the screen, with a red exclamation mark that flashes in it at random places. Here's what it looks like: Header file: <...
2
votes
2answers
7k views

Animation with 5x5 map of cubes

I am trying to learn how to animate with tkinter. The code below is an example I was able to build. It creates a small 5x5 map of cubes, then one of them randomly moves around the screen (preferably ...
15
votes
3answers
799 views

Sample game code for applying to a development firm

I am contemplating working with a development firm, and had asked for this piece of sample code. Could you please take a look and let me know if this is a quality piece of work, or if it needs ...
4
votes
2answers
1k views

Is this the correct approach to animation in Java?

I was fiddling with animation in Java and wrote this: ...
5
votes
1answer
94 views

Sprite is Refreshing

I am using "AndEngine" and I would like to know if I am following the best practice when I want to refresh the entity. Let say, I have 2 sprites and I want change them into 2 another sprites. I ...
5
votes
1answer
2k views

Bouncing square in a box

I wrote my first animation in Java FX and would like a code review. I created StackPane with Rectangle. ...
2
votes
0answers
2k views

Optimizing snap SVG animation with collision detection

I have a snap SVG animation which animates a bunch of circles, and draws a line between them if they are within a certain proximity of each other. However, I realize that there is a lot of optimizing ...
6
votes
1answer
242 views

Rotating background using Swing: performance issues

In a jPanel, I'm displaying a 1203x1203 background that I rotate every 30ms. Problem is, Swing is known to be a slow library, and I assume rotating a huge picture at a quick rate would be quite ...
1
vote
1answer
559 views

Drawing multiple Images

Im trying to draw a lot of fields image for my world generation, all is perfect 64 fps, but if i began to draw all the time the grass it became laggy, like 59 fps (something that musn't happen! :( ), ...
-1
votes
1answer
315 views

Optimizing this SVG animation for size [closed]

I'd like to code review generated svg animation, while this might stretch definition of this site, I really hope this is interesting and revelant topic, as this SVG file is really like any other ...
8
votes
3answers
950 views

Canvas Drawing/Animation

I am trying to learn how to write good, clean, and efficient JavaScript. I consider myself a novice, at best, in JavaScript. Any comments are appreciated. In an effort to become a better JavaScript ...
30
votes
4answers
3k views

Snowfall in HTML

I am a beginner and I have made Snowfall in HTML for my mom. I'm pretty sure it will not look that awesome to any developer out there, but hey, that's why I've posted it. I'd like a general review of ...
5
votes
2answers
255 views

Animating Coloured Cogs

The script is for rotating 5 different coloured gears (tandwiel) on my site. I think the code can be improved and improved performance. 5x var paper isn't that smart for speed? Getting the current ...
2
votes
3answers
1k views

jQuery animation/blinking code?

I have one container div which contains some children div members. From time to time, I need to run a custom blinking effects on ...
3
votes
1answer
7k views

Updating a jquery progressbar via button clicks

I'm trying to get my progress bar animated. I'd like it to smoothly transition in between the starting and destination values, but only be initiated by clicking the continue button. The code I ...
1
vote
1answer
6k views

CSS Ticker Animation

I have never use css animations before, so I just want to know, is this the 'best' way to animate a Ticker? I 'best' in this case encompasses efficient and semantic use of html and css. It's worth ...
5
votes
1answer
158 views

Improving speed of Animation class

This is a class to hold an animation and be able to refer to different animations by titles, but it seems like calling draw(Graphics2D g) and ...