The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
10
votes
3answers
727 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 ...
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? ...
5
votes
2answers
502 views

Simple animation method with requestAnimationFrame code structure

I'm writing a animate method to perform DOM animations. I know there are a lot of libraries out there that already does that (and I use some ideas of them) but I usually prefer writing my own code to ...
8
votes
3answers
2k views

Python Turtle screen saver

Leon asked a question which got closed both here and at Stack Overflow, but I kind of liked the idea, so I implemented a working version of his code, which I now want reviewed. With regards to Leon's ...
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 ...
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 ...
4
votes
0answers
952 views

Canvas animation of network nodes and edges

Having to give the idea of an ever changing network of nodes (each with different impact and possibly more than one color) connecting each other to create something. I wanted to give it depth ...
7
votes
2answers
399 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 ...
12
votes
2answers
1k views

Microsoft logo animation

I made an animation of the Microsoft logo. It's available as a CodePen doodle, also. Would anyone be so kind as to check my style and say if there is anything I could've improved? (I am sure there is.)...
2
votes
0answers
41 views

Slideshow scrolling photos horizontally using jQuery

I've written my own jQuery code to make a little slideshow. Functionally, it does what I want but I find that the jQuery animations are fairly jerky and because I'm a beginner in JS and web ...
7
votes
1answer
112 views

Animating a 2D particle “web”

I have written a small class to generate and animate one of those trendy particle webs. I plan to use this as the main background of my personal website, so naturally I'm concerned about the ...
5
votes
1answer
3k views

Toggling a CSS animation

I'm trying to toggle a dropdown box that will appear and disappear upon clicking the button. ...
11
votes
2answers
1k views

jQuery plugin that makes a slider out of an <ul> list

This is one of my very first jQuery plugins. In short: it makes a slider out of an <ul> list filled with <li> items ...
2
votes
0answers
712 views

Interactive transition between view controllers

I have made an interactive transition controller in Swift in two different ways. This interactive transition controller is the parent class and I have few child classes which adapt the parent for ...
8
votes
2answers
2k views

Div circular scroll

Have one div: Here's what scrolling of this div should look like: The only way I see is to duplicate ...
2
votes
2answers
1k views

Wobble-free progress spinner

I've been looking for quite some time to fix the wobbly spinner issue. Many people made numerous suggestions using fonts / pure CSS / CSS + JS. Unfortunately, none of the proposed solutions were ...
12
votes
2answers
2k views

Console-like printing of message JavaScript

I'm learning JavaScript and I've made a very simple little document-modifying script that prints a message as if it was someone typing into a console. It practices recursion and in my opinion, I feel ...
5
votes
1answer
525 views

Class(es) for animating objects on a canvas

I'm building a simple canvas animation engine as an exercise in learning ES6. Coming from C++ and Java, I miss static properties, but I've read that "Prototypes having data properties is generally ...
3
votes
1answer
103 views

Manual slide-in animation using delta time

I created a simple slide-in animation for my game. The box is shown at the bottom with character dialog. The animation is as follows: A square slides in from the left, then waits a bit, then expands ...
2
votes
1answer
2k views

Follow-the-cursor eye animation

I have code for googly eyes that is too long. Basically I have variables for each element pupils (one for right -other for left), eyesockets (left, right). I wish I could compress my code so I can ...
18
votes
2answers
1k views

A Nightmare on setTimeout Street

I have script which plays audio, shows/hides elements: ...
14
votes
3answers
2k views

Slot Machine Constructor

This is a fun little program I made of a fruit machine gambler, aka "slot machine". What mistakes am I making? How can I make this better OOP programming, less spaghetti? ...
2
votes
2answers
59 views

Maintainable way to concatenate strings in JS and vendor prefixes

I am writing a jQuery plugin which, among other things, inserts a stylesheet in the head. Additionally, I also require vendor prefixes. A lot of values are derived from variables in the script, and I'...
7
votes
2answers
543 views

Animating a block of HTML on scroll

I'm pretty new to client side scripting and I'm still learning. I've written this JS plugin which animates blocks of HTML (fade-in from left/top/right/bottom) as you scroll down the page. Everything ...
2
votes
1answer
762 views

Overriding scrolling behavior for navigation elements

I am new to JavaScript, and trying to ensure the i write the best possible code instead of "copy & paste". I hope i am asking correctly, want to know if my code I have written is done correctly ...
4
votes
3answers
139 views

Switch questions using JavaScript and CSS

I am writing a Q&A wap page and want to switch questions in one page. This is my first time to write JS and CSS code, so I think there must be some improvement. ...
6
votes
3answers
662 views

Rotating 3D wireframe

This code consumes a lot of CPU. Could you tell me where it is possible to improve the code or change the way rendering? Or it is possible to reduce the overhead of calculations? If you are using ...
4
votes
1answer
2k views

D3.js interpolating line on circumference of circle

For now, I've tried to make a line rotate on the path of a circle, but used setInterval multiple times and there might be other ways of achieving the same. I would ...
4
votes
1answer
107 views

YouTube video intro, and autoscroll when video ends

This code creates an intro video using the Youtube API, screen text written by JavaScript with a typewriter kind of effect. How can I rewrite this as succinct object-oriented code? Also, I'm not sure ...
8
votes
1answer
164 views

The effect of typing a sentence out

The following code is complete and works perfectly. What I want to do to is make it more modular in a way where I can use the code again - similar to an api. I also hardly ever code in javascript, ...
3
votes
2answers
1k views

Sliding effect with bounce

I have used animate.css and jQuery as external libs. Is there a better way of doing what I have done with jQuery? DEMO ...
4
votes
1answer
114 views

Update on tileMap Class

This is an update from An Update on my TileMap Class. It's a tileMap class for a top-down old-school final fantasy game. User @Tim gave me suggestions and I updated ...
4
votes
1answer
103 views

Spritesheet cut to individual frames

I need a hoverable transparent animation for a website, so that it glows when the mouse is over it. I could use two gifs or svgs one on top of another, but (as far as I know) there's no control of the ...
8
votes
2answers
481 views

Taking flight with JavaFX

Just another step in my educational Trek. I didn't know when/why I would use the transparent feature and in experimenting with it, I made this. This one was fun to behold once done. It's an animated ...
5
votes
3answers
157 views

RPG game using XNA

I know this code needs some organization like classes, enums, methods, arrays or something but I just want to know if I could have created a character movement script, thereby shortening the code ...
1
vote
1answer
2k views

Simple GUI animation in Java

I wrote a simple animation of a ball moving across the screen. I was wondering if I used the static variable correctly. If not, how could I make it non-static so I ...
11
votes
3answers
2k views

TI-Basic Bouncing Ball Animation

Anyone who has programmed in TI-Basic is likely to have written one of these programs. The concept for this program is simple. The "ball" represented by a single point that originates from the upper ...
2
votes
1answer
329 views

Number processing slower with asm.js

I did a few times ago what I called a plasma in plain JavaScript: jsFiddle The idea is to use 2 oscillators (LFO) which have their frequency + phase driven by two oscillators each. Then we use those ...
3
votes
1answer
89 views

Slow update function

I've been fiddling with Unity, trying to make nice walking/running animations. So, i found the Stealth tutorial and I used pretty much the same animator as the AI, only I only use Speed and ...
4
votes
0answers
158 views

Cellular automata path and fill algorithm

I have worked for a few days in my cellular automata path algorithm and an easy fill algorithm, but sometimes I get some weird fall in my FPS. If you need a preview ...
4
votes
1answer
1k views

Animated Score Amounts for Game

This is a simple class for a label with a score that animates counting up or down. When someone in the game scores points, the numbers count up or down to the new total. Here is an example of what ...
0
votes
1answer
652 views

Colour-changing clock

I am fairly new to javascript and I would like to write my code on a more readable and efficient way. Any critique of what I've written would be greatly appreciated, especially the section of ...
3
votes
1answer
208 views

Portfolio landing page

I'm trying to grasp this whole MVC design pattern idea but I'm in the dark if I'm doing it correct. This is where I need some feedback on what I've done so far. Here's what I'm wondering: Does the <...
3
votes
2answers
379 views

Animation that cycles through background colors

I am doing a background image animation using the function. It works, but I think I am doing more coding than what it requires. Can anyone please help me to minimize it? Don't recommend the CSS ...
2
votes
0answers
2k views

Simple yet incredible parallax scrolling effect

I wanted to learn how to create awesome parallax scrolling effects so I decided to look up how to do it, after some searching I put together this test. It works fine to some extent but it feels a bit ...
6
votes
1answer
2k views

Performance optimization on Box2D with libgdx

A few days ago I decided that I wanted to get involved with libgdx. So far I'm blown away by how simple it is to get something on the screen to work with. I'm trying to make a very simple tech demo ...
1
vote
1answer
67 views

Repetitive event handler for a toggling UI control

I feel like this bit of code could have been written more elegantly, especially with the huge if/else statements. Can somebody help me break this down? It would really help me out in the future. <...
11
votes
1answer
170 views

Bedazzling My Bejeweled Animations

I've spent a few days working on the animations for my Bejeweled clone and I am pretty happy with the results so I am posting the code for review. This is the most advanced animation code that I have ...
6
votes
2answers
167 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 ...