diff --git a/source/package-lock.json b/source/package-lock.json index 271d96e..b30b7f4 100644 --- a/source/package-lock.json +++ b/source/package-lock.json @@ -1,12 +1,12 @@ { "name": "@funky-flask-test/funky-flask-test", - "version": "1.3.0", + "version": "1.3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@funky-flask-test/funky-flask-test", - "version": "1.3.0", + "version": "1.3.1", "devDependencies": { "@types/node": "^24.0.15", "typescript": "^5.8.3", diff --git a/source/package.json b/source/package.json index b6021ae..4b3d12e 100644 --- a/source/package.json +++ b/source/package.json @@ -1,6 +1,6 @@ { "name": "@funky-flask-test/funky-flask-test", - "version": "1.3.0", + "version": "1.3.1", "type": "module", "main": "./dist/index.jsx", "exports": { diff --git a/source/src/index.tsx b/source/src/index.tsx index c68af18..99b7ff7 100644 --- a/source/src/index.tsx +++ b/source/src/index.tsx @@ -4,6 +4,7 @@ export class RickGamePanel { private x = 20 private y = 180 private vy = 0 + private vx = 2 private onGround = false private gravity = 0.7 private jumpPower = -12 @@ -69,6 +70,7 @@ export class RickGamePanel { this.vy += this.gravity this.y += this.vy + this.x += this.vx // <--- move right if (this.y >= 180) { this.y = 180 @@ -86,6 +88,7 @@ export class RickGamePanel { requestAnimationFrame(this.frame) } + private draw() { this.ctx.clearRect(0, 0, 300, 200)