JavaScript

JavaScript

1
0

JavaScript bot parses codeblocks marked as javascript and executes your code...


JavaScript is "simple" bot with one job. It parses codeblocks marked as js (JavaScript) and executes the code inside. You do need to use return statement like you would do in functions that return value back to caller.

Included modules:

  • Geometry.js (https://github.com/UnrealSecurity/geometry.js)
  • Grid (https://github.com/UnrealSecurity/gridjs)
  • ICrypt

Predefined functions:

  • bsort(array input, function comparer)
  • shuffle(array input)
  • randomInt(int min, int max)
  • crypt(string input, string password, string salt)

...animation functions:

  • prepare(int interval)
  • frame()
  • clear()

Predefined variables:

  • canvas
  • ctx

Invite bot to your server:

  • https://discordapp.com/api/oauth2/authorize?client_id=680045457229086801&permissions=0&scope=bot

Images:

  • https://i.ibb.co/wYrh82n/image.png
  • https://i.ibb.co/vmfRR53/image.png

Animation example:

let center = new Point(canvas.width/2, canvas.height/2);
let circle = new Circle(center, 180);
let f = 30;
let points = circle.getPoints(10);
let d = points[0].distanceTo(points[1]);
let r = d/f;

ctx.fillStyle = '#ffb829';

function draw() {
   points.forEach(point=>{
      ctx.beginPath();
      ctx.arc(point.X, point.Y, 20, 0, Math.PI*2);
      ctx.fill();

      point.rotate(center, -r);
   });
}

prepare(30);
for (let i=0; i<f; i++) {
   draw(); frame(); clear();
}
return animation();

점수 & 리뷰


1

리뷰 2개

리뷰는 등록된 사용자만 남길 수 있습니다. 모든 리뷰는 Top.gg의 사이트 중재자가 관리합니다. 게시하기 전 저희의 지침을 반드시 확인해 주세요.

별점 5점

0

별점 4점

0

별점 3점

0

별점 2점

0

별점 1점

2