kottore / away3d

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

[away3d lite] fireMouseMoveEvent() in render call prevents apps from only rendering when changes occur. #107

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
By placing the fireMouseMoveEvent() call in the View3D render call means 
that objects will not recieve their MouseEvent3D.MOUSE_OVER or 
MouseEvent3D.MOUSE_OUT events.  This prevents applications that only want 
to render when something has changed being able to detect these events. 

As a suggestion remove fireMouseMoveEvent() from render() and instead add 
another mouse listener for the MOUSE_MOVE event.  This seems to work in my 
testing but I might be missing part of the bigger picture.

View3D.as changes:

remove from render():

    if (mouseEnabled3D)
        fireMouseMoveEvent();

add to constructor:

    addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);

add event handler:

    private function onMouseMove(e:MouseEvent):void
    {
    if (mouseEnabled3D)
        fireMouseMoveEvent();       
    }

Original issue reported on code.google.com by mirsw...@gmail.com on 30 Mar 2010 at 10:47