b0.5 : like a module
love2d.js » Devlog
All change
love2d.js is now a module
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";
for better use on any IDE, struct change:
love.graphics.draw() –> become love.graphics_draw()
new class :
class Love
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.
class Canvas
It add new canvas in your page and draw on it. But drawing it’s only thing you can do with it.
add some function :
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
Get love2d.js
Download NowName your own price
love2d.js
framework love2d for javascript game
Status | In development |
Category | Tool |
Author | Magnus Oblerion |
Tags | Game engine, GitHub, LÖVE |
Languages | English |
More posts
- b0.6.2 : Write/Load SaveMay 31, 2024
- Offline documentation : manualApr 09, 2024
- b0.6 : Refactoring + open urlOct 23, 2023
- b0.4 touch fixesJun 01, 2022
Leave a comment
Log in with itch.io to leave a comment.