Tim Anema
6314e1907b
Merge branch 'master' of github.com:tanema/light_world.lua
2015-02-18 10:25:49 -05:00
Tim Anema
9b5765e0ed
scaling and rotation now works
2015-02-18 10:23:17 -05:00
Tim Anema
115d64f51f
working on rotation and scaling of light bodies
2015-01-30 14:35:49 -05:00
Willem Thiart
2ccda79969
fixed the shadows of polygons without 8 vertices
2015-01-11 17:49:41 +09:00
Tim Anema
691da848de
added image stencils for objects so shadows are properly stenciled, and made it so that object that dont cast shadows have shadows cast over them.
2015-01-03 22:18:48 -05:00
Tim Anema
1026092cbd
learned how to create class like things in lua finally so I took out other peoples code
2014-12-23 16:51:07 -05:00
Tim Anema
e54c38d7e9
added back in the default normal maps
2014-12-22 09:35:04 -05:00
Tim Anema
4e5158601a
optimizing range checking now update is required
2014-12-21 13:14:46 -05:00
Tim Anema
7e6e3f23df
got rid of usedless normal maps and optimizes shadow bodies
2014-12-21 10:40:07 -05:00
Tim Anema
12b2bd8b32
added back in some options in the short example to give a better refraction example
2014-12-11 21:58:18 -05:00
Tim Anema
3c559635e9
better screen range checking
2014-12-10 21:31:17 -05:00
Tim Anema
4a969a0aec
fixed creation of bodies so that they all use x and y as the center point and not center and topleft
2014-12-10 21:06:12 -05:00
Tim Anema
9911d02fd4
added glow map support to animations
2014-12-05 15:01:15 -05:00
Tim Anema
8e30cacae0
finish up implementing the animation setup, through anim8proxy
2014-12-04 21:57:54 -05:00
Tim Anema
ada9857394
added in initial animations
2014-12-04 11:42:28 -05:00
Tim Anema
7d5ae45a9c
fixed body range testing
2014-12-03 20:39:33 -05:00
Tim Anema
d02bc54b05
added in checking to see if the shadow bodies should be drawn, if they are within the screen and within range of the light
2014-12-03 14:08:44 -05:00
Tim Anema
64bcbd1e94
circle shadow body optimizations
2014-12-03 09:07:20 -05:00
Tim Anema
5cbca9f63c
took care of default polygon normal map problems show up at edges
2014-12-03 08:31:09 -05:00
Tim Anema
c0a80da546
made polygons moveable
2014-12-02 21:26:46 -05:00
Tim Anema
ec19b3cadd
added a normal map to all bodies now so drawing shine is done with just the normal shading now
2014-12-02 10:05:52 -05:00
Tim Anema
9c81c71f89
just a few touchups before bed
2014-11-29 23:51:44 -05:00
Tim Anema
bbcd20a27e
colored shadows almost functional again
2014-11-29 23:20:02 -05:00
Tim Anema
012a5481e9
image shadows look correct again
2014-11-29 23:08:29 -05:00
Tim Anema
0a2da63f24
added image shadows, took out useless code
2014-11-29 20:19:03 -05:00
Tim Anema
117d908ad7
one light now works I need to figure out a way of doing multiple lights
2014-11-29 19:10:15 -05:00
Tim Anema
993e029a2f
made circle shadow bodies use arc instead of circle, also optimized so they were not drawn if not neccessary
2014-11-28 16:56:05 -05:00
Tim Anema
42c699590d
took out annoyance in naming
2014-11-28 10:55:43 -05:00
Tim Anema
7db34a4a02
made better shadow body calculations so that the z coordinate of the light effects the cast light
2014-11-28 10:20:00 -05:00
Tim Anema
64d8613549
normal mesh shadows can be drawn even if the item isnt a image
2014-11-18 21:07:33 -05:00
Tim Anema
2d1d65df4f
Merge pull request #11 from qrap/master
...
added move function to bodies
2014-10-28 20:50:24 -04:00
Tim Anema
b768c5479a
fixed the light drawing with translation and scaling
2014-10-28 20:47:46 -04:00
Guard13007
91996c4fc5
added move function to bodies
2014-10-28 11:40:51 -07:00
Tim Anema
302bd42d5f
minimized methods again
2014-10-26 15:35:53 -04:00
Tim Anema
5474b11c50
some proper refactoring so shine and shadows code are separate
2014-10-23 22:41:52 -04:00
Tim Anema
537ff2522c
converted the complex example to use the proper way of transformation
2014-10-23 08:25:12 -04:00
Tim Anema
0f882da300
finally coming up with a proper strategy to handle translation and zooming of canvases
2014-10-21 22:48:19 -04:00
Tim Anema
22c45f7bac
trying out some new postshaders from mari0, fixed a couple bugs
2014-10-08 08:55:05 -04:00
Tim Anema
702de1389a
refactored post shader to be part of the light world but still able to use it on its own, took out globals, and made adding and removing effects independant from the draw calls
2014-10-06 17:27:41 -04:00
Tim Anema
5e0320c4bf
fixe a bug in new image bodies
2014-10-06 09:31:14 -04:00
Tim Anema
b1c366e236
refactored into a normal map library which made body a bit smaller
2014-10-03 10:43:26 -04:00
Tim Anema
ae7f8f7b80
refractor redundant code in body now
2014-10-03 10:18:06 -04:00
Tim Anema
c167edccc6
small refactors because I am stuck
2014-10-02 23:04:22 -04:00
Tim Anema
3d15d0832e
singled out the drawing into one function with background and foreground callbacks, this will draw the refraction and reflection without the post shader
2014-10-02 20:32:31 -04:00
Tim Anema
654deb165c
small changes
2014-09-30 21:42:10 -04:00
Tim Anema
8aacf0f69c
making it work better with a camera, now working on scaling, finally after a week or working to get here
2014-09-30 18:19:37 -04:00
Tim Anema
45be0c56fa
refactoring,
...
taking out unused variables and redundant code, also took out debug variables. also moved the shaders in to the lib folder
for better portablility of the library
2014-09-29 10:03:34 -04:00
Tim Anema
9579dc0b15
refactor to update only the elements that are being drawn
2014-09-27 17:18:54 -04:00
Tim Anema
735d565142
split up calculate shadows a bit so it is a bit more managable
2014-09-27 15:58:15 -04:00
Tim Anema
9dd4e53119
light world no longer has any more globals
2014-09-27 13:46:46 -04:00