瀏覽代碼

Updated tests.

Mark Sibly 7 年之前
父節點
當前提交
d86bd96b8d

+ 34 - 0
modules/mojo3d-loaders/tests/assets/psionic/ninja animation ranges.txt

@@ -0,0 +1,34 @@
+hey guys heres all the ranges for the ninja model, 20 ranges and 300 frames....Phew!!
+
+you may need to scale or rotate the model and change animation speeds for various 3D game engines...
+
+Please check the numbers carefully cus they dont follow any order and in between ranges often skip a few frames, this as how I achieved certain moves in Character FX its not a mistake :)
+
+1-14	Walk (normal)
+15-30	Stealth Walk
+32-44	Punch and swipe sword
+45-59	Swipe and spin sword
+60-68	Overhead twohanded downswipe
+69-72	Up to block position (play backwards to lower sword if you want)
+73-83	Forward kick
+84-93	Pick up from floor (or down to crouch at frame 87)
+94-102	Jump
+103-111	Jump without height (for programmer controlled jumps)
+112-125	High jump to Sword Kill (Finish em off move??)
+126-133	Side Kick
+134-145	Spinning Sword attack (might wanna speed this up in game)
+146-158	Backflip
+159-165	Climb wall
+166-173	Death 1 - Fall back onto ground
+174-182	Death 2 - Fall forward onto ground
+184-205	Idle 1 - Breathe heavily
+206-250	Idle 2
+251-300	Idle 3
+
+Ok there it is, have fun and maybe drop by my forums hang out, ask questions, post your own work etc
+
+Feel free to use however you like, commercial etc, credits are Appreciated as a LOT of work went into this! ;-) 
+
+Psionic
+
+http://www.psionic3d.co.uk

二進制
modules/mojo3d-loaders/tests/assets/psionic/ninja.b3d


二進制
modules/mojo3d-loaders/tests/assets/psionic/nskinbl.jpg


+ 22 - 0
modules/mojo3d-loaders/tests/assets/psionic/turtle animation ranges.txt

@@ -0,0 +1,22 @@
+Animation info for Turtle:-
+
+1-11	Walk
+12-25	Swim
+26-40	Jump
+41-50	Attack/Bite
+51-64	Die onto back
+66-77	Go into Shell (reverse to pop back out again)
+79-87	360 spin
+89-100	Backflip
+101-120	Idle 1
+121-150	idle 2
+
+
+Thats it have fun!! ;-)
+
+Free for use in any Freeware, Commercial, Shareware etc
+
+Credit to me or a link to my website on your website would be nice but not essential, drop me an email and I'll link you up as well ;-)
+
+Psionic
+http://www.psionic3d.co.uk

+ 0 - 0
modules/mojo3d-loaders/tests/assets/turtle1.b3d → modules/mojo3d-loaders/tests/assets/psionic/turtle1.b3d


+ 0 - 0
modules/mojo3d-loaders/tests/assets/turtle1.png → modules/mojo3d-loaders/tests/assets/psionic/turtle1.png


+ 95 - 0
modules/mojo3d-loaders/tests/ninja.monkey2

@@ -0,0 +1,95 @@
+Namespace myapp
+
+#Import "<std>"
+#Import "<mojo>"
+#Import "<mojo3d>"
+#Import "<mojo3d-loaders>"
+
+#Import "assets/psionic/ninja.b3d"
+#Import "assets/psionic/nskinbl.jpg"
+
+Using std..
+Using mojo..
+Using mojo3d..
+
+Class MyWindow Extends Window
+	
+	Field _scene:Scene
+	
+	Field _camera:Camera
+	
+	Field _light:Light
+	
+	Field _ground:Model
+	
+	Field _ninja:Model
+	
+	Method New( title:String="Simple mojo app",width:Int=640,height:Int=480,flags:WindowFlags=WindowFlags.Resizable )
+
+		Super.New( title,width,height,flags )
+		
+		'create scene
+		'		
+		_scene=Scene.GetCurrent()
+		_scene.SkyTexture=Texture.Load( "asset::miramar-skybox.jpg",TextureFlags.FilterMipmap|TextureFlags.Cubemap )
+		
+		'create camera
+		'
+		_camera=New Camera
+		_camera.AddComponent<FlyBehaviour>()
+		_camera.Near=.1
+		_camera.Far=100
+		_camera.Move( 0,10,-20 )
+		
+		'create light
+		'
+		_light=New Light
+		_light.Rotate( 75,15,0 )	'aim directional light 'down' - Pi/2=90 degrees.
+		_light.CastsShadow=True
+		
+		'create ground
+		'
+		_ground=Model.CreateBox( New Boxf( -50,-5,-50,50,0,50 ),1,1,1,New PbrMaterial( Color.Green ) )
+		_ground.CastsShadow=False
+		
+		'create turtle
+		'		
+		_ninja=Model.LoadBoned( "asset::ninja.b3d" )
+'		_ninja.Scale=New Vec3f( .125 )
+
+		Local anim1:=_ninja.Animator.Animations[0].Slice( 1,14 )
+		Local anim2:=_ninja.Animator.Animations[0].Slice( 206,250 )
+		_ninja.Animator.Animations.Add( anim1 )
+		_ninja.Animator.Animations.Add( anim2 )
+		
+	End
+		
+	Method OnRender( canvas:Canvas ) Override
+		
+		RequestRender()
+		
+		If Keyboard.KeyDown( Key.Enter )
+			_ninja.Animator.Animate( 1,.4,.2 )
+		Else
+			_ninja.Animator.Animate( 2,.4,.2 )
+		Endif
+
+		_scene.Update()
+		
+		_scene.Render( canvas,_camera )
+		
+		canvas.Scale( Width/640.0,Height/480.0 )
+		
+		canvas.DrawText( "Width="+Width+", Height="+Height+", anim time="+_ninja.Animator.Time+", FPS="+App.FPS,0,0 )
+	End
+	
+End
+
+Function Main()
+
+	New AppInstance
+	
+	New MyWindow
+	
+	App.Run()
+End

+ 2 - 3
modules/mojo3d-loaders/tests/turtle.monkey2

@@ -6,8 +6,8 @@ Namespace myapp
 #Import "<mojo3d>"
 #Import "<mojo3d-loaders>"
 
-#Import "assets/turtle1.b3d"
-#Import "assets/turtle1.png"
+#Import "assets/psionic/turtle1.b3d"
+#Import "assets/psionic/turtle1.png"
 
 #Import "util"
 
@@ -80,7 +80,6 @@ Class MyWindow Extends Window
 		Next
 		
 		_turtle.Animator.Animate( 1,1 )
-		
 	End
 		
 	Method OnRender( canvas:Canvas ) Override