This commit is contained in:
Mal
2020-01-19 00:45:17 +01:00
commit 893c226fe4
10 changed files with 541 additions and 0 deletions

17
js/module.js Normal file
View File

@@ -0,0 +1,17 @@
import RetroSprite from "./retro/RetroSprite.js";
let image = new Image();
image.src = 'graphics/mario.png';
image.onload = function () {
let sprite = new RetroSprite(image, 10);
let canvas = document.getElementById('canvas');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
let context = canvas.getContext('2d');
console.log(context);
sprite.draw(context);
};