Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jun 22nd, 2018 61 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. private function onRenderTick(event:Event=null):void
  2. {
  3.     if (_moveMouse)
  4.     {
  5.         TweenMax.to(_world, 2, { rotationY:-(mouseX - _lastMouseX) * .1 + _world.rotationY, rotationX:(mouseY - _lastMouseY) * .1 + _world.rotationX, ease:Expo.easeOut } );
  6.     }
  7.    
  8.     _view.render();
  9. }
  10.  
  11. /**
  12.  *  Mouse Rotation Event Handler
  13.  */
  14. private function onMousePress(e:MouseEvent):void
  15. {
  16.     _lastMouseX = mouseX;
  17.     _lastMouseY = mouseY;
  18.    
  19.     _moveMouse = true;
  20. }
  21.  
  22. private function onMouseRelease(e:MouseEvent):void
  23. {
  24.     _lastMouseX = 0;
  25.     _lastMouseY = 0;
  26.    
  27.     _moveMouse = false;
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top