| Site menu |
|
 |
| Statistics |
Total online: 1 Guests: 1 Users: 0 |
 |
|
 | |  |
|
5:46 AM Funebra™ Represantations |
Funebra Sphere Engine
const rows = 8;
const cols = 8;
const radius = 60;
let a = 0;
const spd = 0.01;
function ani(){
a += spd;
let p = 0;
for(let i=0;i<rows;i++){
let theta = i/(rows-1)*Math.PI;
for(let j=0;j<cols;j++){
let phi = j/cols*Math.PI*2;
let x = radius*Math.sin(theta)*Math.cos(phi);
let y = radius*Math.cos(theta);
let z = radius*Math.sin(theta)*Math.sin(phi);
let wave =
Math.sin(theta*8+a)
* Math.cos(phi*6+a);
let r = radius;
x = r*Math.sin(theta)*Math.cos(phi);
y = r*Math.cos(theta);
z = r*Math.sin(theta)*Math.sin(phi);
let rx = x*Math.cos(a)-z*Math.sin(a);
let rz = x*Math.sin(a)+z*Math.cos(a);
let ry = y*Math.cos(a*0.6)-rz*Math.sin(a*0.6);
rz = y*Math.sin(a*0.6)+rz*Math.cos(a*0.6);
let depth = 500;
let scale = depth/(depth+rz);
let sx = 400 + rx*scale;
let sy = 300 + ry*scale;
let dot = document.getElementById("ringa"+p);
if(dot){
dot.style.left = sx+"px";
dot.style.top = sy+"px";
dot.style.transform =
"translate(-50%,-50%) scale("+scale+")";
dot.style.color="rgb("+((phi+p)*a%32)/32*255+", 255, 0 )";
dot.style.opacity = scale;
}
p++;
}
}
requestAnimationFrame(ani);
}
ani();
|
|
Views: 3 |
Added by: pluser27
| Tags:
| Rating: 0.0/0
|
|
|
 | |  |
|
| Log In |
|
 |
| Search |
|
 |
| Calendar |
| « July 2026 » |
| Su |
Mo |
Tu |
We |
Th |
Fr |
Sa |
| | | | 1 | 2 | 3 | 4 | | 5 | 6 | 7 | 8 | 9 | 10 | 11 | | 12 | 13 | 14 | 15 | 16 | 17 | 18 | | 19 | 20 | 21 | 22 | 23 | 24 | 25 | | 26 | 27 | 28 | 29 | 30 | 31 | |
 |
| Entries archive |
|
 |
| Site friends |
|
 |
|