..:: PCSX2 Forums ::..

Full Version: The snow effect is really cool how is it accomplished?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(12-18-2015, 05:55 PM)willkuer Wrote: [ -> ]I would even doubt that it is possible with modern css. This is also really not the idea of css.
(I don't think that modern css supports getting the mouse position and making a transform dependent on it)

Not one that follows the mouse but CSS keyframing to move around divs would make it possible to animate snow.
Keyframing? Good to know... I actually plan to incorporate some motion into some html page i partially support. I dont really like js that much. Doing it with css would be nice. Probably most brwoser dont support it though...
(12-18-2015, 08:54 PM)willkuer Wrote: [ -> ]Keyframing? Good to know... I actually plan to incorporate some motion into some html page i partially support. I dont really like js that much. Doing it with css would be nice. Probably most brwoser dont support it though...

All modern versions of major browsers support keyframes in CSS 3.0

Looksee here: http://www.w3schools.com/cssref/css3_browsersupport.asp

Also example of animating with them: http://www.w3schools.com/cssref/css3_pr_...frames.asp

Edit: IDK about mobile browsers however.
Hmm seems like the guy is using an old version of that JS and it seems to run much better on that website. Lets see if the latest version will just work if i replace the js
Did you do it? It does seem to be slightly lighter. And a lot smoother.

Edit: Actually now it's using 100% of a core Sad It does look REALLY nice though lol. Super high FPS.

[Image: 2.png]
Yes, this is the 2013 build, while the old one was 2009. Damn, the higher fps really make it feel much better. By the way, the CPU performance is the same as before for me, around 10% of 4 cores, and that with other stuff working in the background.
It was the same for me at first but now it's not. It's a stead 13-15% of my 4 core 8 thread i7.

However the snow is soooooooooooo much smoother and nicer that I think it is worth it XD
According to the source commenting, altering this line:

Code:
this.animationInterval = 33;

to a lower value could potentially lower cpu usage at the expense of making it less smooth. At 33 it will be 30fps. At 50 it would be 20fps. I like the smooth though. But I bet it's wrecking some lower end CPUs lol Evil

I note it now excludes itself from running on mobile browsers now, which is good. That's the issue I had with it before - it made my phone hot and killed it's battery lol

Also this line
Code:
this.useGPU = true;             // Enable transform-based hardware acceleration, reduce CPU load.

suggests it can use the GPU, but it doesn't seem to use mine. Hmm.
Yeah I modified it, looks so much better now, even fixed the flickering bar at the bottom. I'll just leave it as is since people can disable it at will anyway
Dat 60FPS snow.
Pages: 1 2 3