[javascript]Luv.js

Discuss any ports of LÖVE to different platforms.
User avatar
Davidobot
Party member
Posts: 1149
Joined: Sat Mar 31, 2012 5:18 am
Location: Game-Dev. Land
Contact:

Re: [javascript]Luv.js

Post by Davidobot » Mon Nov 11, 2013 4:27 pm

Another question: can you loop music?
My library:
LovelyMoon

Check out my current project:
Raycaster

Oh hey, I have a website now!

User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [javascript]Luv.js

Post by kikito » Mon Nov 11, 2013 5:19 pm

Yes, you should be able to play music in a loop. Assuming that you have the music ogg file loaded in a variable called music, you can do:

Code: Select all

music.play({loop: true});
If you are not doing anything weird with the music (like playing it simultaneously with different offsets/volumes) you should be able to later stop the music with:

Code: Select all

music.stop();
If you are doing something more complex with sound instances you will have to stop each instance independently. If you don't know what a sound instance is, you can probably disregard this paragraph.

Full disclosure: While the API exists and the tests pass, I still have not tested them completely - I have not used them in a game/demo yet. loop is one of the options I have not tested yet. It should work, but if it doesn't please let me know. Pretty please with a cherry on top.
When I write def I mean function.

User avatar
Davidobot
Party member
Posts: 1149
Joined: Sat Mar 31, 2012 5:18 am
Location: Game-Dev. Land
Contact:

Re: [javascript]Luv.js

Post by Davidobot » Mon Nov 11, 2013 6:19 pm

My library:
LovelyMoon

Check out my current project:
Raycaster

Oh hey, I have a website now!

User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [javascript]Luv.js

Post by kikito » Mon Nov 11, 2013 7:36 pm

Nice ^^
When I write def I mean function.

User avatar
Davidobot
Party member
Posts: 1149
Joined: Sat Mar 31, 2012 5:18 am
Location: Game-Dev. Land
Contact:

Re: [javascript]Luv.js

Post by Davidobot » Sat Mar 22, 2014 6:18 pm

This should be moved to the "Ports" section of the forum.
My library:
LovelyMoon

Check out my current project:
Raycaster

Oh hey, I have a website now!

User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: [javascript]Luv.js

Post by T-Bone » Tue Mar 25, 2014 8:59 am

Davidobot wrote:This should be moved to the "Ports" section of the forum.
Is it really a port though? I see luv.js more like a standalone, albeit very LÖVE-inspired, javascirpt game framework. But perhaps the difference doesn't matter much. If HÖVE counts as a port, so should luv.js I guess (since they both use different languages with a LÖVE-like API),

User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [javascript]Luv.js

Post by kikito » Thu Mar 27, 2014 3:16 pm

I don't consider Luv.js a port at all, but If people want to move the post here, I'm ok with it (it is actually easier to find here :P)
When I write def I mean function.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests