Mark Sibly 7 ani în urmă
părinte
comite
e28a1c17f2
1 a modificat fișierele cu 10 adăugiri și 7 ștergeri
  1. 10 7
      modules/mojo3d-loaders/tests/turtle.monkey2

+ 10 - 7
modules/mojo3d-loaders/tests/turtle.monkey2

@@ -31,9 +31,14 @@ Class MyWindow Extends Window
 
 		Super.New( title,width,height,flags )
 		
+		Print opengl.glGetString( opengl.GL_VERSION )
+		
+		SwapInterval=0
+		
 		'create scene
 		'		
 		_scene=Scene.GetCurrent()
+		
 		_scene.SkyTexture=Texture.Load( "asset::miramar-skybox.jpg",TextureFlags.FilterMipmap|TextureFlags.Cubemap )
 		
 		'create camera
@@ -65,29 +70,27 @@ Class MyWindow Extends Window
 		_turtle=Model.LoadBoned( "asset::turtle1.b3d" )
 		_turtle.Scale=New Vec3f( .125 )
 
-		Local walk:=_turtle.Animator.Animations[0].Slice( 1,11 )
+		Local walk:=_turtle.Animator.Animations[0].Slice( "Walk",1,11,AnimationMode.Looping )
 		_turtle.Animator.Animations.Add( walk )
 		
-		For Local i:=0 Until 360 Step 15
+		For Local i:=0 Until 360 Step 6
 			
 			Local copy:=_turtle.Copy()
 			
 			copy.RotateY( i )
-			copy.MoveZ( 12 )
+			copy.MoveZ( 30 )
 			
-			copy.Animator.Animate( 0,Rnd(.5,1.0) )
+			copy.Animator.Animate( copy.Animator.Animations[0],Rnd(.5,1.0) )
 			
 		Next
 		
-		_turtle.Animator.Animate( 1,1 )
+		_turtle.Animator.Animate( "Walk",1 )
 	End
 		
 	Method OnRender( canvas:Canvas ) Override
 		
 		RequestRender()
 
-		If Keyboard.KeyDown( Key.Space ) _turtle.Animator.Time+=.01
-		
 		_scene.Update()
 		
 		_scene.Render( canvas,_camera )