Commit Graph

42 Commits

Author SHA1 Message Date
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
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
3f62fde726 fixed light range for scaling 2014-12-02 21:45:19 -05:00
Tim Anema
8fee299900 just cleaning up some code 2014-12-01 20:41:09 -05:00
Tim Anema
0a2da63f24 added image shadows, took out useless code 2014-11-29 20:19:03 -05:00
Tim Anema
410388d423 fixed the multiple lights issue 2014-11-29 19:52:09 -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
f56ef4a197 got the start of a shader that will do normal shading and shine at the same time, I will throw in a shadow map there too and it will do it all in one pass 2014-11-29 14:52:05 -05:00
Tim Anema
aa3675d7ad just renaming some things 2014-11-29 08:54:43 -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
ac5b9afa16 made the normal shading reflect the shadow calculations a bit better and isolated the examples to one directory 2014-11-28 11:14:53 -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
Guard13007
40f18cae9b added light:move(x, y, z) 2014-11-10 13:02:02 -08:00
Tim Anema
820033810b added setVisible method to light so that the light can be turned on and off 2014-11-05 23:06:54 -05:00
Tim Anema
233d40ea39 fixed inaccuracy of the inRange method in Light. also added it to the draw methods in light so that they wont draw if not needed 2014-11-05 23:05:21 -05:00
Tim Anema
e74c0d8961 fixed the light drawing with translation and scaling 2014-10-28 21:03:00 -04:00
Tim Anema
b768c5479a fixed the light drawing with translation and scaling 2014-10-28 20:47:46 -04:00
Tim Anema
82061d93d0 added z to getPosition on light 2014-10-27 21:46:27 -04:00
Tim Anema
5add341a14 minimized body methods 2014-10-26 15:27:35 -04:00
Tim Anema
c9fac640d7 made the range adhere to the scale as well 2014-10-24 13:34:44 -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
5e8ef63d6d fixed light position 2014-10-23 12:17:28 -04:00
Tim Anema
7325cf8499 translation and scaling working just need to work out the proper light positioning at scale 2014-10-23 09:23:20 -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
b976a90afe just playing around with a few things, narrowed down my last issues with scaling and translation just need to figure out a workaround 2014-10-22 21:55:15 -04:00
Tim Anema
fe2a135663 almost complete converting entire project to using new canvas strategy, need to touch up the main shader to handle proper coordinates though 2014-10-22 08:37:19 -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
5e0320c4bf fixe a bug in new image bodies 2014-10-06 09:31:14 -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
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
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
Tim Anema
08e50a7b2a refactor body and light code to minimize size of monolithic method 2014-09-26 18:11:23 -04:00
Tim Anema
fd58dd6a86 changed the class handling 2014-09-26 16:52:16 -04:00
Tim Anema
d58fd39f7f refactoring to be a bit more sane and so I can understand the codebase a bit better 2014-09-26 12:48:46 -04:00
Tim Anema
b353eff979 fixed updating of shine drawing for translated co-ordiantes 2014-06-02 19:35:50 -04:00
Marcus Ihde
88b5014326 Add example browser. 2014-04-08 19:45:21 +02:00