Skip to content

Releases: oblerion/love2d.js

b0.6.3 : add gamepad

18 Apr 20:39
Compare
Choose a tag to compare

add

gamepad support

  • love.joystiks_getJoysticks() -> array of object : Joystick class
  • love.joystick_getJoystickCount() -> number of gamepad connected

Joystick class = gamepad

  • Joystick.getButtonCount() -> number // get number of button
  • Joystick.getAxisCount() -> number // get number of axis and analog button
  • Joystick.getId() -> number
  • Joystick.getName() -> string
  • Joystick.isDown(id:number) -> bool // return true if button id is down
  • Joystick.getAxis(id:number) -> number -1.0 -> 1.0 // axis or analog button

b0.6.2-2 fix patch

26 Sep 20:05
Compare
Choose a tag to compare

fix

  • touch/mouse position with scroll x/y
  • touch start fix

new

  • love.window_getWidth() -> get width of screen
  • love.window.getHeight() -> get height of screen

b0.6.2-1 : upgrade touch support

23 Sep 06:29
Compare
Choose a tag to compare

Fix

  • touch don't work
  • example update

b0.6.2 : read/write save

31 May 15:09
Compare
Choose a tag to compare

Add

  • system get Os
  • window get/set title
  • system read/write save

Fix

  • cursor style

Offline documentation : manual

09 Apr 12:14
d895a62
Compare
Choose a tag to compare

You can download official manual and print it like old time.

b0.6-1 popup fix

30 Oct 18:46
Compare
Choose a tag to compare

Fix

  • openURL can no longer open a page in a loop

b0.6 Refactoring + open url

22 Oct 18:00
Compare
Choose a tag to compare

Add

  • love.system_openURL(url)
  • love.touchpressed(id,x,y,dx,dy,force) ;
  • love.touchreleased(id,x,y,dx,dy,force) ;

Edit

  • Now that the love variable is initialised in love2d.js, it can be included in several javascript files.
  • Refactoring the code, renaming a few internal functions (_ for private) and a few corrections.
  • _disableRightClickMenu() function is called when mouse/touch events are loaded.
  • All events are loaded by default.

Delete

  • input class
  • canvas class
  • Timer,Colour

b0.5

31 Oct 13:51
7a9aa12
Compare
Choose a tag to compare

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";

module doc of mozilla

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

b0.4

01 Jun 13:06
516aca6
Compare
Choose a tag to compare

mouse != touch
add function to get touches position

b0.3

20 Mar 15:01
ec4df59
Compare
Choose a tag to compare

add:
new system for main loop
love.graphics.getMode() --> get width,height of screen
love.event.quit() --> void , break main loop and stop game