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
2
votes
2answers
55 views

Handling view state for cardview

I have two buttons 1) Chat button 2) Annotation Button On tap each view comes from bottom and when tap outside view hidden back (Please refer the screen shot) On tap On annotation On tap on ...
1
vote
1answer
104 views

Animation of adding / removing nodes from VBox

Method hide_old_show_new (I can't think of a suitable name) gradually, using FadeTransition, removes all nodes (from last to ...
5
votes
2answers
58 views

Sparking animation for Button

I just came through a GitHub repo, which has an amazing animation for Button in Android. So, I thought why not make that for web buttons too. And I started ...
3
votes
1answer
64 views

ValueAnimator for IOS - Did I butcher it up?

I am trying to make an IOS tool similar to Android's ValueAnimator... more or less This is useful for situations where you simply want a value to "animate" over time, but rather than necessarily ...
5
votes
1answer
967 views

Canvas animation of network nodes and edges

This code generates an animation that gives 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 ...
1
vote
1answer
62 views

Tower of Hanoi, ASCII animation with ANSI escape codes

A few days ago I saw a nice video on YouTube with prof Thorsten Altenkirch about recursion and the Tower of Hanoi puzzle. Today I tried to reproduce the code from the video and came to this: ...
4
votes
1answer
64 views

Android Java Splash Screen code

Here's my android splash screen. I am trying to figure out a better way to write it. It just moves the logo up to the center of the screen. It's my third time creating a splash screen for an android ...
9
votes
1answer
233 views

Maze image solver and animator in Python

This maze solver is a continuation to the maze generator I posted here recently Maze generator & animator in Python This code takes an image containing a 2-color maze as input and solves the maze ...
14
votes
1answer
824 views

Maze generator & animator in Python

This is a follow up to this code and I still did not get the feedback on the drawing functions Maze generator in Python- Gif animator-Custom colors/sizes The code generates custom color and size ...
7
votes
2answers
142 views

Webpage with a preload animation using JavaScript setTimeout

I am working on a website with an animation that runs at the beginning before the content of the homepage becomes visible. I've looked at some examples of preloaders and now use that code with some ...
2
votes
0answers
24 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 ...
7
votes
2answers
546 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 ...
7
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 "...
9
votes
1answer
274 views

Maze generator in Python- Gif animator-Custom colors/sizes

This Python code generates mazes with color and size customization. I intend to add several new maze generating algorithms(Sidewinder, Kruskal, Prim ...) to the Maze class but for now, there is only ...
3
votes
1answer
44 views

C++ SFML Animation System

I'm attempting to write an animation system on top of SFML, and I've come up with a design where I can wrap sf::Drawable objects into a RenderComponent class, and the RenderComponent class can be ...
4
votes
1answer
72 views

Screen transition effect like in Final Fantasy games

I've created a battle screen transition effect similar to Final Fantasy games, you can see it in action here: https://gilles-leblanc.github.io/ff8-transition/ I'm interested in code quality, ...
2
votes
1answer
217 views

Scrolling with an easing function

I wanted to write a function that when invoked, will scroll the page downwards in a smooth fashion. Comments and criticism welcome. I don't like, for example that determining whether it is done is ...
5
votes
2answers
509 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 ...
5
votes
1answer
163 views

Hoc462 - A Raycaster

For the past week, I've been making a raycaster in JS and if you want a live demo, you can try it here. It ran smoothly before I added variable height walls but now it is very slow (~15 FPS) so I want ...
4
votes
0answers
72 views

React - pomodoro clock

I'm looking for some feedback on a pomodoro clock that I recently wrote with React. I'm pretty new to React and coding in general. I followed a couple of online courses, but I'm mostly self-taught. ...
0
votes
0answers
22 views

Multiple animation control using Vanilla JS ES6

What I'm doing Divide members into five section, and apply animation for each member to reveal at first. When I click the section, it is expanded to whole viewport and introduce detail about ...
1
vote
0answers
27 views

Limit framerate [closed]

I have made this class. Not sure if there is anyway to make it better. It seems to work alright half the time, but other times frames jump up higher then the set limit around 30frames more if i set it ...
4
votes
1answer
64 views

Event triggers for animations using vanilla ES6

I'm new to JS and wanna know right code style or approach to cod Vanilla JS using ES6. To practice this, I'm using ESLint JS code-style of AirBnb and referencing clean-code-javascript repo. However, I ...
6
votes
1answer
82 views

Pong Game in JS

I am new to game development and took on the task to create a Pong replica due to my curiosity and interest in the field. I decided to write it in JavaScript because the game is not too labor ...
2
votes
0answers
31 views

Matplotlib realtime monitor

I would like to share a matplotlib real-time monitor plot that I needed for another application. Basic trick is to reverse the time, so that t=0 is now and t=20 is twenty seconds in the past and to ...
3
votes
1answer
55 views

Print file out 1 character at a time in the terminal - Python

This program opens a file and prints the text out to the terminal 1 character at a time and at a predetermined speed using time.sleep() Simple and maybe, if you ...
6
votes
2answers
198 views

pydoro - terminal tomato timer

I've recently created a tomato timer for terminal. It's hosted in github. My concerns are how Pythonic my code is? Is the way I'm handling state transitions good? Which areas of the text user ...
8
votes
1answer
183 views

Interactive small town

I've built this simple interactive scenario. Now everything seems working fine except that when start for loop as below. What can I do to make the script faster? ...
2
votes
1answer
48 views

React component to animate planets on a canvas

I wrote some JavaScript to generate some graphics on a canvas, on a regular HTML page. I now want the same code to run in a component that is part of a React app. I've done this: ...
6
votes
0answers
82 views

CSS image slider (no JavaScript)

HTML / CSS Slider. No JavaScript. Wanted to make an all CSS Image Slider. Though there are plenty of pre-made options setup a lot seem clunky or add a lot to load time. Have ideas for some more ...
3
votes
1answer
111 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 ...
3
votes
0answers
66 views

Animation of an incremental rotary encoder

While reworking my teaching materials for an exercise of an introductory course on mobile robotics, I recently created a animation/simulation of an incremental rotary encoder, e.g. often used for ...
2
votes
1answer
226 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 ...
4
votes
0answers
53 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 "...
4
votes
2answers
554 views

JavaScript animation effect stack

I am building a library that uses animations in a canvas. I need to apply effects to some objects in the canvas and I came up with an effect stack that contains each effect to be executed on a ...
1
vote
0answers
43 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
2answers
9k views

Python tkinter bouncing ball animation

In the current code, the animation is very unclear, and not "polished" (it doesn't run smooth). Can I make the animation smoother? And/or, why it doesn't run smooth? ...
1
vote
1answer
51 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 ...
4
votes
1answer
47 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
56 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 ...
7
votes
1answer
263 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 ...
6
votes
1answer
177 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
80 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 ...
13
votes
2answers
504 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 ...
4
votes
2answers
131 views

JavaScript component to display ephemeral notifications

I would like to improve my code and organization of JS files so I'm wondering if you guys could tell me what I could do better. I've included a small but typical example of how I often use components. ...
3
votes
1answer
48 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 ...
3
votes
1answer
30 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
567 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 ...
6
votes
1answer
4k 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. ...