Fling: a library

Showcase your libraries, tools and other projects that help your fellow love users.
paclito
Prole
Posts: 35
Joined: Wed Apr 22, 2009 8:33 pm

Re: Fling: a library

Post by paclito »

Superb work but...... you can ?
All of the examples i have see at this forum are like this code

Code: Select all

love.filesystem.require("somelib.lua")

function load()	
	-- Something to load game
end

function update( dt )
	-- the update code
end

function draw()
	-- the draw code
end
can you post one example that is like this and of course continue in the develop of this library... perhaps add easing and some functional examples with some help lines :-)

thanks!
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Fling: a library

Post by Robin »

The following is the example from my .love, in a more traditional form, ie not using the default hooks:

Code: Select all

require "fling.lua"

function load()
	img1 = fling.image('sun.png', .5, .5)
	fling.translate(img1, 40, 40, 5,
		function () fling.translate(img1, .9, 40, 3,
		function () fling.translate(img1, .9, .9, 7,
		function () fling.tween(img1, 0.01, .999, 'inquad', 3) end
		) end
		) end
	)
	fling.scale(img1, 7, 5, 6)
	fling.rotate(img1, 180, 20)
	fling.delay.scale(img1, -1, -1, 10, 1)
end

function update(dt)
	fling.update(dt)
end

function draw()
	fling.draw()
end

function keypressed(key)
	fling.translate(img1, .5, .5, 2)
end
And as for developing it further: I'm a bit stuck. If people who know how to implement easing and know flash could help me, that would be great. :neko:
Help us help you: attach a .love.
paclito
Prole
Posts: 35
Joined: Wed Apr 22, 2009 8:33 pm

Re: Fling: a library

Post by paclito »

ok, this is best... thanks, thanks and thanks ;)
now i understand the code. for the easing code, there is an library on the envy framework called anim.lua.
this library works for me.... callback... some easing types and some examples on the forum.
Post Reply

Who is online

Users browsing this forum: No registered users and 70 guests