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.

3
votes
0answers
8 views

Animation loop for a sliding puzzle game

I'm building a "sliding puzzle" game. This is the animation code for when you click a Tile. This "loop" function is running all the time. When you click a tile, if it's available to move, I set the "...
1
vote
0answers
37 views

multiple AJAX requests and multiple SetTimeout animations

multiple AJAX requests and multiple SetTimeout animations I wrote a piece of code that included multiple AJAX requests and multiple SetTimeout animations. I want the code to perform better, ...
4
votes
1answer
41 views

Langton's ant in Clojurescript

The weekly coding challenge in Eric Normand's newsletter this week involves implementing Langton's ant. I wanted something on my screen so I put together a simple re-frame app. The core functions ...
3
votes
0answers
30 views

Pygame : processing speed independant image loop displayer

I made this in order to teach myself pygame. This displays an images loop at the same speed on any computer (It will lag on a slow computer). Is my time management good or do my datetime call could ...
1
vote
1answer
49 views

Caret color and movement animation in Swing

I'm developing a new Look and Feel that is based on animation , so I've decided to make animated text caret too ! The caret works as expected every thing is fine except that am worried about how I ...
6
votes
1answer
147 views

Golf Physics “Game”

Continuation of this post I wrote a program in pygame that basically acts as a physics engine for a ball. You can hit the ball around and your strokes are counted, as well as an extra stroke for ...
3
votes
1answer
37 views

Monte Carlo pi animation

I have created a program that calculates pi using a Monte Carlo method. It also animates the process and displays the value as it is updated to show how it gets closer and closer to the actual value ...
2
votes
1answer
23 views

Recamán Sequence Animation

I wrote a program that animates the Recamán sequence. It is in uses HTML canvas and JavaScript. I was hoping for some feedback on how it could be improved. ...
1
vote
2answers
84 views

JavaScript change image every three seconds

I have a function that changes the image on a webpage every three seconds. I would like feedback on efficiency, good code practices, and anything else that can improve the quality of this code. It ...
3
votes
0answers
28 views

Fullscreen slideshow with fading background

For the past months I have been learning plain javascript without jquery or libraries/frameworks. So now, when I develop a website, I want to write all of the JS code by myself to fully understand ...
1
vote
0answers
12 views

Two Angular animations for modal dialogs

I'm using Ionic 4 and Angular animations to animate modals. I created the following two functions that control the animations but they share a lot of repeated code. Is there a way I can clean these up ...
3
votes
0answers
99 views

Forest Fire Cellular Automata

I stumbled on the idea of a Forest Fire simulating cellular automata, and decided to try making a version using a full Seesaw UI (a Clojure wrapper over Java's Swing). A short sample of it running is ...
3
votes
2answers
46 views

SRT caption support for HTML5's video element

With HTML5 you can add captions to your video using the <track /> element. However, only vtt files are officialy supported, while the current most populair ...
0
votes
0answers
60 views

C++ console progress display

I just figured out how to do a building menu with a progression feature in c++ console application. What this code does: It simply offers you a choice to build a building and then prints the ...
4
votes
1answer
56 views

Analyzing spoke overlaps during rotation: Round 2

Round 1: Analyzing spoke overlaps during rotation I previously posted this question, but I've changed a lot of the code since then. There was a mention of the previous being a bit mixed up, and ...
7
votes
1answer
56 views

Analyzing spoke overlaps during rotation

For a personal project that I've recently started I have to analyze the rotation of two shapes with sets of spokes, where the spokes are evenly-spaced, and split into a given number. That is, if I ...
2
votes
0answers
22 views

Sparking animation for Button

I just came through a GitHub repo, which has an amazing animation for Button in Android. So, I though why not make that for web buttons too. And I started ...
1
vote
0answers
91 views

Snake animation in Swing

I'm developing a simple Snake game in Java using Swing. So far I made the snake animation which is troubling me: when the snakes moves it seems like it starts to lag for no reason, but when I move it ...
13
votes
2answers
470 views

Sierpiński's carpet fractal animation for teaching Python 3

I am teaching programming (in this case - 1 on 1 tutoring of a teenager interested in programming) and this code will be a final stage of a progression toward program generating a nice image of ...
3
votes
3answers
167 views

Basic orbiting planets in P5.js

I started studying JavaScript about a week ago and I would like some opinions and advice on my code. This program just creates a canvas and instantiates 5 planets that orbit around a sun, giving them ...
1
vote
1answer
161 views

jQuery Slideshow with pagination

The code below is for a slideshow that shows a slide with class active, pre-loads a slide with class next, and holds the slide with class last in the background. My biggest issue with this is there ...
6
votes
2answers
145 views

2D falling snow animation

I was hoping that someone could review this code. My main concern is that the contents of main() are difficult to read. I thought about extracting some segments of code into functions (to aid ...
1
vote
0answers
84 views

Animated Button on Android using AfterEffects and Lottie

I have a question about my implementation of a "special" Next-Button. First I want to show you my AfterEffects file: So This Animation has 3 parts Green: Entry correct Red: Entry incorrect Blue: ...
4
votes
1answer
44 views

Sierpinski’s Gasket Triangle in JavaScript

I wrote the Sierpinski’s Gasket Triangle in JavaScript, but I feel the code can be better, especially from L32 to L47. Could you make it more organized? ...
0
votes
2answers
57 views

Simple cube that moves around the container with keys

I made a basic cube that can move around of container and jump too. It's basic but I want to know if I can use better methods, better formatting, or shorten the code. This my HTML: ...
1
vote
2answers
52 views

Wireframe animation on canvas is slow

I'm recently working on a project that involves animation in the background. It works well on desktop but performance drops drastically on mobile. I'm using Paper.js to import a svg and animate it. ...
2
votes
0answers
48 views

Excel VBA animation runs slowly after editing worksheet

My VBA macro displays an animation based on a row-by-row time step simulation in the worksheet. The user enters the desired inputs and the worksheet calculates the evolution of the simulation in a ...
2
votes
1answer
142 views

Unidirectional Bootstrap 3 carousel

I am working on a custom Bootstrap 3 carousel, with vertical, unidirectional, slide transitions. I want to prevent slide transitions from overlapping when the bullets are clicked in random order and ...
5
votes
2answers
194 views

AI to avoid obstacle

The AI I'm making is really simple, however it might be a bit too inefficient for what it is doing. The chart below shows speed differences between various arithmetic and math operations. ...
5
votes
1answer
199 views

Rendering explosion of bouncing balls on a canvas

I'm making a particle engine that can spawn new explosions while keeping particles from previous ones active (until they despawn). The code works well on its own but within the game, two or more ...
6
votes
1answer
170 views

Runner 1-bit game in Python like the offline chrome dino

I made this little game to test if my Nokia 5110 screen can handle games. As in handle many frames per second/game loops. I am using a library made for this screen called Adafruit_Nokia_LCD These ...
3
votes
1answer
57 views

Plain Page Flip Effect

I've created a very plain version of page flip onscroll. I made it to look like turning the pages of a book. It looks OK on browsers I have (Firefox 52.9, Chrome 49, IE8). Though the effect doesn't ...
2
votes
2answers
78 views

Looping text with directional control

The code is an implementation of looping text (similar to a circular buffer - wraps around when it reaches the edge of the defined bounds) with directional control. The code is functional and works ...
2
votes
1answer
39 views

Looping text in Python with directional control

The code is an implementation of looping text (similar to a circular buffer - wraps around when it reaches the edge of the defined bounds) with directional control. The code is functional and works ...
5
votes
1answer
149 views

Animating a screw made up of elements

I am working on code to generate a screw made up of different elements and animating it by rotatation. The elements are so called conveying elements (denoted by GFA)...
3
votes
1answer
192 views

TypeWriter Javascript effect

I have implemented a Javascript TypeWriter effect for my website. It types out code using the TypeWriter variable by adding each character on and setting a timeout. It then 'deletes' code using text ...
1
vote
1answer
64 views

Continuously update position of div with click event

I am trying to continuously get the position of a div on screen and update the new position each time a "click" event listener is clicked. At the moment my code works but feels redundant and could be ...
1
vote
0answers
70 views

Looping over an array with requestAnimationFrame

Over on SO I posted a question: Change transition duration during loop with requestAnimationFrame which hasn't got any responses just yet. I've since come up with this idea and wanted to know if there ...
1
vote
1answer
38 views

Creating smooth animations using rAF

It is my first time trying to create smooth animations using rAF and I would like some insight from more experienced developers. Basically I have 16 elements with x,y coordinates and on mousemove over ...
3
votes
2answers
70 views

Changing the width of a centered progress bar

I am making a game in which the player has a certain amount of available boost. To show this, I am using a blue bar inside a black frame. The bar can grow and shrink at different rates as available ...
3
votes
1answer
74 views

JavaScript flipping clock

Here are two simple classes - Digit class maintains digit behaviour - primarily flipping animations, and Clock class handles everything that is related to time data. I'm going to use this code for ...
3
votes
1answer
73 views

JavaScript code to add buttons and slowly remove them

My javascript code is working, however i am seeking suggestions on how I can go about improving my existing code for reusability and testability. The code is pretty straight forward, I have three ...
3
votes
0answers
592 views

React native circular progress view

This is a functional component that I have developed in React Native for creating a circular progress view. The code does not use any external libraries, just pure CSS. Article that I wrote while ...
1
vote
0answers
25 views

Cleanly preventing flashing an element from corrupting future flashes

For a Seesaw (Swing) app I'm writing, I need to be able to flash a component for a certain duration. Here's the basic function I came up with that accomplishes this: ...
11
votes
4answers
2k views

Countdown control with arc animation

I've implemented countdown timer control with arc animation that looks like this Implementation notes: For arc visualization I've created class Arc derived from <...
2
votes
0answers
662 views

React Animation example - accordion panel

I decided to study an animation in React and created a simple example of an collapsible panel using CSSTransitionGroup. To make an animated collapsible, I added max-height: 0, overflow: hidden and a ...
2
votes
1answer
224 views

CSS/JS slider using just data-attributes and transform:translate

I needed to make a multi-page form, with slides, but without using too much js code like slick.js or the likes. So I tried to figure out how to make it really simple, but still cross-browser and ...
7
votes
1answer
257 views

Time delay indication bar for a text game

For a game I am writing in Python 3.6.5, I made a text-based animation to indicate the passage of time (when chopping a tree or mining a rock, etc). I did a lot of trial and error to get the output ...
2
votes
0answers
48 views

Iterate through images really fast with JS

My objective is to modify the JavaScript code to get the single image on the page to iterate through images faster. It should be possible to get the images to load in about 10 seconds(about 3 seconds ...
-2
votes
1answer
82 views

jquery navigation plug-in to show content [closed]

I'm somewhat new to JavaScript / jQuery. I wrote this "plug-in", and it seems to do what I want. But I know what I've done is a bit clunky and inelegant. The idea is that I have multiple columns of ...