Click here for free DL of the app version that can save data.
No:46847 78
Prev Next
<html> <body> <canvas id="gam..ALL
Developer User18277|Date and time 24/2/26 11:00:59
Build time 4.15 sec|Game capacity 0.855KB|Script

class Game { constructor() { this.x = 50; this.y = 50; } render() { ctx.fillStyle = "white"; ctx.fillRect(0, 0, canvas.width, canvas.height); } move() { this.x += 10; this.y += 10; } draw() { ctx.fillStyle = "black"; ctx.beginPath(); ctx.arc(this.x, this.y, 10, 0, Math.PI * 2); ctx.fill(); } } let game = new Game(); let canvas = document.getElementById("gameboard"); let ctx = canvas.getContext("2d"); for ( let i=0; i<100; i++){ game.render(); if (i % 10 == 0){ game.move(); game.draw(); } }

Prev Next   Back  0  0 Menu 

[PR]現在の欲しいものランキング

Click here for free DL of the app version that can save data.

(C)2023 HisashiApp