0.3.9 • Published 7 months ago

diamond-game v0.3.9

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

#first install the package

npm install diamond-game

#then create html file like this and run with live server :

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Game</title>
  </head>
  <body style="padding: 0px;margin: 0px;overflow:hidden">
    <canvas
      style="width: 100vw;height: 100vh;margin: 0px;"
      id="canvas"
    ></canvas>
    <script type="module" src="./test.js"></script>
  </body>
</html>

#you can test the package like this :

// test.js
import Game from "./node_modules/diamond-game/dist/index.js";
let { test } = Game("canvas");
//test with simple game
test();

#then you can create your own game by these method :

import Game from "./node_modules/diamond-game/dist/index.js";
let {
  loop,
  Gravity,
  canvas,
  ctx,
  drawObject,
  test,
  GameObject,
  Controller,
  backInside,
  Rect,
  LoadImage,
  Sound
} = Game("canvas");
0.3.9

7 months ago

0.3.6

7 months ago

0.3.8

7 months ago

0.3.7

7 months ago

0.3.5

10 months ago

0.3.4

12 months ago

0.3.3

1 year ago

0.3.0

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.3

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.4

1 year ago

0.2.2

1 year ago

0.1.5

1 year ago

1.0.5

1 year ago

0.1.3

1 year ago

1.0.4

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago