Commit Graph

153 Commits

Author SHA1 Message Date
vrld
64f11b9ea5 Merge pull request #20 from out-of-pixel/master
add angle function
2013-07-30 02:40:50 -07:00
Guido Lorenz
003ebea480 Add dist2() function to vector-light
This returns the squared distance between the two vectors.
2013-07-24 16:16:50 +02:00
out-of-pixel
4afcac5b36 add function angle()
returns the angle between a vector and the default rotation
2013-06-29 17:39:03 +02:00
Matthias Richter
e9b86ef2d5 Rename truncate to trim. Cleanup code. 2013-04-27 12:26:56 +02:00
vrld
5cecfac51a Merge pull request #17 from ricardozanini/master
Truncate Function on Vector Module
2013-04-27 03:15:27 -07:00
Ricardo Zanini
ba8f724844 Added a truncate function to Vector Module. Based on this article: http://blog.signalsondisplay.com/?p=336 2013-04-25 23:07:57 -03:00
vrld
b2b033c431 Merge pull request #14 from clofresh/fix-gs-leave
Fix "self" param to the GS.leave callback
2013-04-12 02:12:01 -07:00
Carlo Cabanilla
11cf27df4d Fix "self" param to the GS.leave callback 2013-04-11 23:44:17 -03:00
Matthias Richter
4f6c85e514 Add timer.tween 2013-03-31 20:53:53 +02:00
Matthias Richter
c6b75aaa9f Fix issue #13: Timer.do_for crashes when after is not supplied 2013-03-23 15:13:12 +01:00
Matthias Richter
ef2c4f6c56 Fix class commons compatibility 2013-02-25 18:46:04 +01:00
Matthias Richter
615dd8f111 Fix gamestate:init() bug, and error on undefined callbacks 2013-02-25 18:46:04 +01:00
vrld
63f1cb933d Merge pull request #12 from Yonaba/master
Small typo fix in the Readme
2013-02-23 04:08:41 -08:00
Roland Yonaba
5685ddf9f4 Update README.md
Typo fixed
2013-02-20 19:17:02 +00:00
Matthias Richter
b0e56809b0 Remove ringbuffer.lua 2013-02-20 17:06:00 +01:00
Matthias Richter
e95ca05202 Update readme 2013-02-20 16:58:20 +01:00
Matthias Richter
8d4e5bb65f Update license header 2013-02-20 16:54:57 +01:00
Matthias Richter
9f678bc0e2 Rewrite class system 2013-02-20 15:53:13 +01:00
Matthias Richter
5b1b67b23e Deprecate gamestate constructor 2013-02-20 15:51:50 +01:00
Matthias Richter
f080a9c14a [Gamestate] Remove __index metamethod for new gamestates (world of pain) 2013-01-27 11:43:39 +01:00
Matthias Richter
d22749990d Allow arbitraty gamestate callbacks 2013-01-26 12:56:59 +01:00
Matthias Richter
bf862c9b40 Issue 9: Add camera:zoom[To]() 2012-11-01 18:59:08 +01:00
Matthias Richter
9b6aba60dd Add camera:lookAt(x,y). Augment camera:rotation([phi]). 2012-10-07 13:24:28 +02:00
Matthias Richter
914ee08202 Return GS callback result (for love.quit(), etc) 2012-10-06 09:46:36 +02:00
Matthias Richter
b02273c936 timer.lua: Add do_for(). Remove Interpolator, Oscillator. 2012-10-02 18:28:22 +02:00
Matthias Richter
0f29310dcf Remove camera dependencies. Add pos + rotation getter.
hump.camera is not independent of hump.vector-light.
camera:pos() returns the camera position.
camera:rotation() returns the camera rotation.
2012-09-10 10:38:24 +02:00
Matthias Richter
7f92f2c4f1 brief(er) vector factory 2012-06-12 12:58:33 +02:00
Matthias Richter
f78bfa3ca8 Make normalisation in hump.vector-light consistent with hump.vector 2012-05-19 01:36:10 +02:00
Matthias Richter
4f03a71f59 Code cleanup 2012-05-19 01:34:56 +02:00
vrld
b259e75208 Merge pull request #5 from am0d/master
Fixes divide-by-zero error in vector:normalize() and vector:normalize_inplace()
2012-05-18 16:29:47 -07:00
Matthias Richter
b12f02fb16 Add hump.signal 2012-05-16 15:11:03 +02:00
Matthias Richter
7aa3073037 Add individual timer support (as requested by mofr) 2012-05-08 17:34:41 +02:00
a_m0d
1c683f50a4 Fix divide-by-zero error in vector:normalize()
and vector:normalize_in_place()
2012-04-18 22:57:47 -04:00
Matthias Richter
006f040a8b update readme 2012-04-12 16:10:28 +02:00
Matthias Richter
78308d9aab Include add/sub again 2012-04-12 16:08:36 +02:00
Matthias Richter
ca7977d7da Make hump.camera use vector-light 2012-04-10 17:32:01 +02:00
Matthias Richter
4441aa7e1b Add light vector module 2012-04-10 17:00:15 +02:00
Matthias Richter
adcceed73b Update license header 2012-04-10 17:00:02 +02:00
Matthias Richter
42c3b9b47e Make Timer.add[Periodic]() return timer handle. Export Timer.handle 2012-03-31 15:05:07 +02:00
Matthias Richter
7c257c891d Implement issue #4: Ability to cancel specific timers 2012-03-31 14:31:43 +02:00
Matthias Richter
9d76e4d020 Remove name inference in class.lua. 2012-03-31 14:27:24 +02:00
Matthias Richter
f5adba2cb8 Camera to require vector in any case.
Before custom vector classes named Vector or vector could override hump
vector class. This feature may result in confusing bugs, so it should
better be removed.
2012-02-17 21:13:18 +01:00
Matthias Richter
3957c73548 Fix wrong variable name in vector:mirrorOn() (thanks, Dani Ka!) 2012-02-17 21:12:41 +01:00
Matthias Richter
1bdeb7ef4a Avoid unnecessary creation of vector objects 2012-01-21 23:35:31 +01:00
Matthias Richter
99ece87eb6 Metatable magic in gamestate 2011-11-19 20:41:43 +01:00
Matthias Richter
cd3df0c49f Camera: More intuitive functions names 2011-11-16 13:45:20 +01:00
Matthias Richter
31760b00c7 Update class to match class.commons spec 2011-11-16 13:34:59 +01:00
Matthias Richter
e2144b525d Adhere to Class-Commons specs with delayed initializers 2011-09-28 18:17:04 +02:00
Matthias Richter
dfac6aa4ce Add metatable to object before calling the constructor.
Previously, a constructor had no access to static members via self.
E.g. this would have failed:

  class = require 'class'
  A = class{function(self) assert(self.foo) end}
  A.foo = true
  a = A()
2011-09-28 17:48:25 +02:00
Matthias Richter
c8440e2bc0 Fix issue #2: mousepressed doesn't work in gamestate.lua (thanks, benloran!) 2011-09-08 14:26:02 +02:00