Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
For questions related to graphical animations. This includes, but is not limited to sliding, tweening, rotating and resizing of shapes.
61
votes
How clean is my snow?
Cool animation!
Let's get some linting out of the way. As per PEP 8, you should use 4 spaces of indentation consistently, and function names should be snake_case. … (That's a smarter strategy than having dropsOnScreen() re-examine every drop on every animation frame.) …
18
votes
Snowfall in HTML
Instead of retriggering setTimeout() on every call to movesnow(), I suggest calling setInterval() just once for the entire program.
You have some duplicated code between initsnow() and movesnow() (th …
7
votes
jQuery plugin to cycle through text and "typewrite" it out
The API design is rather weird. You expect your plugin to be called like
$().typeText({ selector: '.words' })
But a design like this would be much more natural for jQuery:
$('.words').typeText()
…
6
votes
Basic orbiting planets in P5.js
Physics and animation
The object around which a satellite orbits is called its primary. I suggest that you name the parameter to the orbit() method accordingly. … orbitRadius, orbitAngle=0) {
this.sizeRadius = sizeRadius;
this.orbitRadius = orbitRadius;
this.orbitAngle = 0; // degrees relative to x axis
// 2000 is an arbitrary animation …
6
votes
Accepted
Bouncing ball simulation
Using this.r to represent elapsed time is highly unconventional. I would have guessed that r stood for "radius". Why not use this.t like a sane programmer?
The draw() function ends with this.r += 2 …
6
votes
Accepted
JavaScript "snow" animation
That is an awesome animation! From a technical viewpoint, I find it neat how you render the flakes into a PNG represented by a data URI.
Realism
A lot of the snowflakes look quite nice. …
6
votes
Accepted
Sierpiński's carpet fractal animation for teaching Python 3
Algorithm
You can simplify the code and make it run faster if you construct the next-level carpet by continuing to work on the previous image (punching more holes in it), rather than starting with a …
4
votes
Accepted
Animations when navigation items are clicked
Then, it's just a matter of using jQuery to intercept that click and replace the behaviour with a more polished animation. …
4
votes
Accepted
TI-Basic Bouncing Ball Animation
On my TI-82, I get an ERR:DATA TYPE on the following line:
L₂*(1-2not(Ans and Ans≠{62,94
Apparently, the TI-82 does not support operations not and and on lists.
I recommend that you avoid relyin …
4
votes
Accepted
Python Turtle screen saver
draw_turtle_screensaver() is rather tedious, with many variables and some repetitive code. For example, you have red, green, blue, as well as their new_… counterparts. The code to manipulate those t …
3
votes
Accepted
Animate a box, bouncing left and right
20px */ }
}
#plan {
width: 200px;
height: 200px;
background: #00C0FF;
position: relative;
}
#box {
width: 20px;
height: 20px;
background: red;
position: absolute;
animation …
3
votes
Elevator program code challenge
In situations like this, you probably get about 30 seconds to make a good first impression. During that time, the two salient observations I had were:
Excessive comments: If you need to say everyth …
3
votes
Accepted
Animation that cycles through background colors
There's no need to specify the opacity in the stylesheet, since the opacity will be controlled by the jQuery animation. …
3
votes
Accepted
Follow-the-cursor eye animation
Programming in German results in an awkward mix of English and German identifiers, with conflicting capitalization conventions. I suggest sticking to English, though I will make an attempt to accommo …
2
votes
Div circular scroll
Be sure to localize all of your variables using var.
JavaScript naming using interCaps is more idiomatic than under_scores.
For a better user experience, use <label> tags on your radio buttons. Tha …