nice one gabriel, don't stop doing this ;)

cheers!

2009/12/29 gabe <[email protected]>

> Thank you ! I have also ported the code to Away3D Lite (minimal port,
> without using templates, just to show what changes). Here is the
> Away3DLite version:
>
> Demo:
>
> http://www.iemar.tuwien.ac.at/processviz/away3d/insights/orthogrid/LightOrthoGrid.swf
>
> Source:
>
> http://www.iemar.tuwien.ac.at/processviz/away3d/insights/orthogrid/LightOrthoGrid.as.txt
>
> When you compare the two versions using DIFF, this is what strikes me
> the most:
>
> <code>
> AWAY3D Classic:
>                private function drag(e:MouseEvent):void {
>                        if(dragging) {
>                                var dx:int = e.stageX - sx;
>                                var dy:int = e.stageY - sy;
>                                view.camera.x = cx - (dx /
> view.camera.zoom);  // <---- NOTE
>                                view.camera.y = cy + (dy /
> view.camera.zoom);                   }
>                }
> AWAY3DLite:
>                private function drag(e:MouseEvent):void {
>                        if(dragging) {
>                                var dx:int = e.stageX - sx;
>                                var dy:int = e.stageY - sy;
>                                view.camera.x = cx + (dx /
> view.camera.zoom); // <--- NOTE
>                                view.camera.y = cy + (dy /
> view.camera.zoom);
>                        }
>                }
> </code>
>
> It seems that there is a difference in the x-axis direction of away3d
> and away3dlite. This is, I had to swap signs to achieve the same
> solution.
>
> cheers,
> Gabriel.
>
>
> On 29 Dez., 09:05, Michael Iv <[email protected]> wrote:
> > Very Nice !! Well Done
> >
> >
> >
> > On Mon, Dec 28, 2009 at 4:16 PM, gabe <[email protected]> wrote:
> > > I post my source and swf for a simple (endless) 2D grid drawn /as
> > > background/ to an orthographic view. This can be a usefull for
> > > implementing a 3D modeler in away3D or answering "how something can be
> > > drawn in a background layer".
> >
> > > Demo:
> >
> > >http://www.iemar.tuwien.ac.at/processviz/away3d/insights/orthogrid/Or.
> ..
> >
> > > Source:
> >
> > >http://www.iemar.tuwien.ac.at/processviz/away3d/insights/orthogrid/Or.
> ..
> >
> > > Sharing means caring.
> > > cheers,
> > > Gabriel
> >
> > > Acknowledgements: The endless grid code has been translated from Java
> > > (JGraph) to AS3.
> >
> > --
> > Michael Ivanov ,Programmer
> > Neurotech Solutions Ltd.
> > Flex|Flash |Air |Games|OS|
> > Tel-0526237969
> > [email protected]
> > [email protected]
>



-- 
katopz
http://www.sleepydesign.com

Reply via email to