Wallpaper Engine

Wallpaper Engine

Sound Splitter
Possibly_Insane 2021년 7월 5일 오전 2시 30분
Custom Idle Animation
Hi,

Is there any way to modify the idle animation? The current one looks like two moving sin waves multiplied together, while I'd like to use something a bit more complicated like this for example: https://www.desmos.com/calculator/vvdvfqae0v

I can code it in myself, I'm just not even sure where the code for the idle animation is.

Thanks.
Possibly_Insane 님이 마지막으로 수정; 2021년 7월 5일 오전 4시 27분
< >
전체 댓글 3개 중 1~3개 표시 중
Squee  [개발자] 2021년 7월 5일 오전 5시 06분 
Well it is pretty much 2 sin waves added up ..

If you can look past my horrible coding you can find it in index.html in the block from 762 and 775 ( includes comments of another animation ) .

Note:
- Do copy the code to your own projects folder to avoid any translation updates from overwriting your own code.
- Audio data goes from low to high frequency in 64 values, total is 128 values. So 0-63 is left channel i believe, and array indexes 64 - 127 the right. When you are showing more bars then other values are automatically determined using cosine interpolation.
- I believe in this wallpaper I split the normal audio from the idle one so normalization should not affect it.
- The code is really really sloppy, almost no comments, and commented bits that don't even belong in there :)
Squee 님이 마지막으로 수정; 2021년 7월 5일 오전 5시 13분
Possibly_Insane 2021년 7월 5일 오전 6시 17분 
thanks for the prompt reply, and thanks for making such a cool wallpaper in the first place!
Possibly_Insane 2021년 7월 5일 오전 9시 55분 
if anyone wants to try what I came up with, just replace the section of code Squee mentioned with this:

var p = performance.now()/(7000);
var p2 = performance.now()/(10000);
var v = 0.1*((((Math.PI*Math.cos(p))-(2*Math.PI))*Math.cos(((Math.PI*Math.cos(p2))+(2*Math.PI))*(i+50)/3))+(((Math.PI*Math.cos(p2))+(2*Math.PI))*Math.sin(((Math.PI*Math.cos(p))-(2*Math.PI))*(i+50)/3)));
data = v+0.2;
data[i+64]= -v+0.2;
Possibly_Insane 님이 마지막으로 수정; 2021년 7월 5일 오전 9시 56분
< >
전체 댓글 3개 중 1~3개 표시 중
페이지당 표시 개수: 1530 50