Posted October 31, 2022 by Oblerion Studio
all you script need to be module, like it.
<script type="module" src="main.js"></script>
you need to import all element that you need in js script
import Love from "./love2d.js";
// you can use Love class now
//----------------------------------
// for more than one import
import {Love,Canvas} from "./love2d.js";
love.graphics.draw() –> become love.graphics_draw()
It need to be create at start, only one time. It create main canvas(draw space) and load all event on it. It’s contains all you need for use this framework.
It add new canvas in your page and draw on it. But drawing it’s only thing you can do with it.
love.timer_getDelta() –> get delta time between two frame
love.graphics_setAlpha(a) –> set alpha color for all after
disableRightClickMenu() –> now can use right click for game
disableConsole() –> disable keyboard shortcuts of console on page