Share your repls and programming experiences

← Back to all posts
Purple Rain ☂️!
PowerCoder (219)

Very simple, but satisfying animation. These are div's, not gif's

Thanks for all the support (:

Commentshotnewtop
BenOD1 (10)

This is oddly satisfying.

malvoliothegood (497)

Here is something like purple rain except it's raining cats and dogs . The HTML5 canvas and its methods are used: https://repl.it/@malvoliothegood/raining-cats-and-dogs

PowerCoder (219)

@DJWang
My definition: A "div" is an HTML element. Div is short for divider.

W3schools definition :The <div> tag defines a division or a section in an HTML document.
W3schools :click here to W3schools div introduction

Coder100 (1285)

You really shouldn't be learning from w3schools though, MDN is better :) @DJWang

lcsnickel (2)

Dude I love dis 😊

PVWalsh (2)

That is soo satisfying... ahhhhhhhhhhhhhhhhhhh

jamesscotta (1)

Very cool and really impressive since I have no idea what you did to make this happen.😊

Bookie0 (150)

Me: Cool
Me 2 min later: coool
Me 10 min Later: why am I still here?
Me 3 hours later: *eyes glued to the screen coooooooooooooool

Seriously nice job dude!
Have a great day!

DempseyMyers (2)

This makes me want to pet a cat

AlexanderHardco (1)

that cool bro, sub to my yt channel. Charles Leonard Gorril

sugarfi (266)

now we just need little red corvettes driving across the screen...

Staff (6)

1000000 and its just a pink day :)

ChezCoder (204)

also whats with the backwards smile? (: makes me shiver lol. :)

ChezCoder (204)

wow powercoder!
also, when are you free? you didn't really finish your styling XD

PowerCoder (219)

@ChezCoder Friend me on Discord so we can discuss it more. (I sent afriend request.) I'm Poseidon on discord. (And I'll correct my backwards smiley face.)

musediku (0)

i can look at this all day

R0upe (2)

I love this man, but I guess you can put in input one event listener "oninput" , I guess is better refresh the values if have values to refresh

document.getElementById('speed').oninput = () => {

  if ($('#speed').val() != '') {
   
   speed_range=Number($('#speed').val());

  }
}
MarcusWeinberger (184)

Put the speed as "1/" for a weird glitch

FelixMuntean (0)

When you write + in speed then the program malfunctions.

PowerCoder (219)

@FelixMuntean That’s because you’re supposed to put a number

CodeABC123 (212)

If I open in new tab, it rains super hard. But it’s pretty satisfying, and good job.

PowerCoder (219)

@CodeABC123 Probablly means you have a small screen. (I might make something to adjust the speed.)

CodeABC123 (212)

Yes, I do(mobile device). @PowerCoder

JeremyIrwin (33)

the best song I ever heard

Trapdoorspyder (64)

@JeremyIrwin Song? I don't hear one, and I checked my volume is up. Does it have to do with the fact that I'm on a chromebook?

JeremyIrwin (33)

@Trapdoorspyder no, it was a joke because there's a song called purple rain

mwilki7 (867)

it stutters every half second or so

roylatgnail (773)

@mwilki7 Not just you, also happens to me too

mwilki7 (867)

@TaylorLiang
iirc the fix is:

// Canvas frame update handling
var vendors = ['webkit', 'moz'];
for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) 
{
    window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
    window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
}
window.requestAnimationFrame(name_of_your_function_here);

instead of interval function

AdCharity (1113)

@mwilki7 no the solution is to make is so fast that people can’t see what’s happening