mining-outpost.js 921 B

1234567891011121314151617181920212223242526272829303132333435
  1. stages.push({
  2. id: "mining-outpost",
  3. setup: () => { },
  4. update: (delta) => {
  5. },
  6. draw: (context, delta) => {
  7. let radius = Math.min(canvas.width, canvas.height);
  8. context.fillStyle = "grey";
  9. context.beginPath();
  10. context.arc(0, 0, radius / 2, 0, 2 * Math.PI);
  11. context.fill();
  12. context.fillStyle = "cornflowerblue";
  13. context.beginPath();
  14. context.arc(0, 0, (radius / 2) - 10, 0, (1 / 6) * Math.PI);
  15. context.lineTo(0, 0);
  16. context.fill();
  17. for (let i = 1; i < 13; i++) {
  18. context.strokeStype = "black";
  19. context.beginPath();
  20. context.moveTo(0, 0);
  21. context.arc(0, 0, (radius / 2) - 10, ((i - 1) / 6) * Math.PI, (i / 6) * Math.PI);
  22. context.lineTo(0, 0);
  23. context.stroke();
  24. }
  25. context.font = `${Math.floor(canvas.width / 30)}px Orbitron`;
  26. context.textAlign = "center";
  27. context.fillStyle = "white";
  28. context.fillText(`Docking Bay`, radius / 4, radius / 8);
  29. },
  30. cleanup: () => { },
  31. });