ÿØÿà JFIF ` ` ÿþ
|
Server : Apache System : Linux cloud.heroica.com.br 4.18.0-553.36.1.el8_10.x86_64 #1 SMP Wed Jan 22 03:07:54 EST 2025 x86_64 User : farolpborg ( 1053) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /proc/self/root/lib/node_modules/pm2/node_modules/charm/example/ |
Upload File : |
var charm = require('../')(process);
charm.reset();
var radius = 10;
var theta = 0;
var points = [];
var iv = setInterval(function () {
var x = 2 + (radius + Math.cos(theta) * radius) * 2;
var y = 2 + radius + Math.sin(theta) * radius;
points.unshift([ x, y ]);
var colors = [ 'red', 'yellow', 'green', 'cyan', 'blue', 'magenta' ];
points.forEach(function (p, i) {
charm.position(p[0], p[1]);
var c = colors[Math.floor(i / 12)];
charm.background(c).write(' ')
});
points = points.slice(0, 12 * colors.length - 1);
theta += Math.PI / 40;
}, 50);