2024年4月19日发(作者:)
if ([(x * 4 + y * 4 * ) + 3] > 128) {
var vertex = new 3();
vertex.x = () * 1000 - 500;
vertex.y = () * 1000 - 500;
vertex.z = -() * 500;
ation = {
x: x - / 2,
y: -y + / 2,
z: 0
};
= () / 200 + 0.015;
(vertex);
}
}
}
particles = new (geometry, material);
(particles);
requestAnimationFrame(render);
};
var init = function() {
rigin = '';
renderer = new enderer({
canvas: mentById("map"),
antialias: true,
alpha:true
});
e(ww, wh);
// arColor(0x181818);
scene = new ();
camera = new ctiveCamera(50, ww / wh, 0.1, 10000);
(-100, 0, 220);
(centerVector);
(camera);
texture = xture(imgBase64, undefined, function() {
imagedata = getImageData();
drawTheMap();
});
ntListener('resize', onResize, false);
};
var onResize = function() {
ww = idth;
wh = eight;
e(ww, wh);
= ww / wh;
ProjectionMatrix();
};
var render = function(a) {
requestAnimationFrame(render);
for (var i = 0, j = ; i < j; i++) {
var particle = es[i];
particle.x += (ation.x - particle.x) * ;
particle.y += (ation.y - particle.y) * ;
particle.z += (ation.z - particle.z) * ;
}
// if (a - previousTime > 100) {
// var index = (() * );
// var particle1 = es[index];
// var particle2 = es[ - index];
// (particle, () * 2 + 1, {
// x: particle2.x,
// y: particle2.y,
// ease: Out
// });
// (particle2, () * 2 + 1, {
// x: particle1.x,
// y: particle1.y,
// ease: Out
// });
// previousTime = a;
// }


发布评论