GoogleCodeArchive / piccolo2d

Automatically exported from code.google.com/p/piccolo2d
0 stars 0 forks source link

Add shadow nodes to extras #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add shadow nodes to extras (see shadow.png).

The attached provides a static shadow node, static in that its shadow image
is created on instantiation and not updated.  It would be much more useful
if the shadow node could act as a decorator group for other nodes (see
GroupExample.java) or use/be an implementation of a NodeCache (see
NodeCacheExample.java).

http://code.google.com/p/piccolo2d/source/browse/piccolo2d.java/trunk/examples/s
rc/main/java/edu/umd/cs/piccolo/examples/GroupExample.java

http://code.google.com/p/piccolo2d/source/browse/piccolo2d.java/trunk/examples/s
rc/main/java/edu/umd/cs/piccolo/examples/NodeCacheExample.java

This still needs some work (see TODOs) so I have attached it as a patch
instead of committing to trunk.

Original issue reported on code.google.com by heue...@gmail.com on 19 Sep 2008 at 8:54

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by mr0...@mro.name on 4 Nov 2008 at 10:01

GoogleCodeExporter commented 9 years ago
Huh - that looks nice! As far as I'm concerned - commit it to the trunk. The 
class is
useful already, the subsequent development can happen in the trunk.

P.S.: I put the patch into my git proxy - whoever wants to follow
http://git.mro.name/piccolo2d.java.git - feel free.

Original comment by mr0...@mro.name on 5 Nov 2008 at 7:56

GoogleCodeExporter commented 9 years ago
Pushing off until version 2.0 so that I have time to determine what is wrong 
with the
radius calculations.

Original comment by heue...@gmail.com on 16 Mar 2009 at 5:56

GoogleCodeExporter commented 9 years ago
Cleaned up and added to extras as PShadow.

$ svn commit -m "Issue 64 ; adding ShadowUtils, PShadow to extras, 
ShadowExample to
examples" .
Sending        
examples/src/main/java/edu/umd/cs/piccolo/examples/ExampleRunner.java
Adding         
examples/src/main/java/edu/umd/cs/piccolo/examples/ShadowExample.java
Adding         extras/src/main/java/edu/umd/cs/piccolox/nodes/PShadow.java
Adding         extras/src/main/java/edu/umd/cs/piccolox/util/ShadowUtils.java
Adding         extras/src/test/java/edu/umd/cs/piccolox/nodes
Adding         extras/src/test/java/edu/umd/cs/piccolox/nodes/PShadowTest.java
Adding         
extras/src/test/java/edu/umd/cs/piccolox/util/ShadowUtilsTest.java
Transmitting file data ......
Committed revision 668.

Original comment by heue...@gmail.com on 20 Aug 2009 at 9:00

GoogleCodeExporter commented 9 years ago
I like the code. I think it should be moved into a compositions attribute of the
PNode class.

If we start doing this kind of composition, then we end up moving exactly in 
Jazz
Direction. If you read the PDF linked to from the piccolo2d website it uses 
fade as
an example of how this kind of composition is actually slower and harder to 
learn
than the monolithic architecture.

I just want to be sure that this change (which I think is a significant change 
in the
library's direction) has been fully thought out.  Refactoring a little would 
make
this fall in line with the expected structure.

Thoughts?

Original comment by allain.lalonde on 20 Aug 2009 at 9:21

GoogleCodeExporter commented 9 years ago

Original comment by mr0...@mro.name on 25 Oct 2009 at 6:36