فهرست منبع

MD2 Clean up.

Mr.doob 10 سال پیش
والد
کامیت
87cf8392e8
66فایلهای تغییر یافته به همراه30 افزوده شده و 2489 حذف شده
  1. 2 2
      examples/index.html
  2. 3 3
      examples/js/MD2Character.js
  3. 3 3
      examples/js/MD2CharacterComplex.js
  4. 0 15
      examples/models/animated/ogro/ogro-light.js
  5. 0 72
      examples/models/animated/ogro/weapon-light.js
  6. 0 15
      examples/models/animated/ratamahatta/ratamahatta.js
  7. 0 73
      examples/models/animated/ratamahatta/ratamahatta.txt
  8. 0 2
      examples/models/animated/ratamahatta/readme.txt
  9. 0 193
      examples/models/animated/ratamahatta/w_bfg.js
  10. 0 224
      examples/models/animated/ratamahatta/w_blaster.js
  11. 0 224
      examples/models/animated/ratamahatta/w_chaingun.js
  12. 0 224
      examples/models/animated/ratamahatta/w_glauncher.js
  13. 0 224
      examples/models/animated/ratamahatta/w_hyperblaster.js
  14. 0 224
      examples/models/animated/ratamahatta/w_machinegun.js
  15. 0 215
      examples/models/animated/ratamahatta/w_railgun.js
  16. 0 80
      examples/models/animated/ratamahatta/w_rlauncher.js
  17. 0 224
      examples/models/animated/ratamahatta/w_shotgun.js
  18. 0 224
      examples/models/animated/ratamahatta/w_sshotgun.js
  19. 0 226
      examples/models/animated/ratamahatta/weapon.js
  20. 0 0
      examples/models/md2/ogro/Ogro.txt
  21. BIN
      examples/models/md2/ogro/ogro.md2
  22. 0 0
      examples/models/md2/ogro/skins/arboshak.png
  23. 0 0
      examples/models/md2/ogro/skins/ctf_b.png
  24. 0 0
      examples/models/md2/ogro/skins/ctf_r.png
  25. 0 0
      examples/models/md2/ogro/skins/darkam.png
  26. 0 0
      examples/models/md2/ogro/skins/freedom.png
  27. 0 0
      examples/models/md2/ogro/skins/gib.png
  28. 0 0
      examples/models/md2/ogro/skins/gordogh.png
  29. 0 0
      examples/models/md2/ogro/skins/grok.jpg
  30. 0 0
      examples/models/md2/ogro/skins/igdosh.png
  31. 0 0
      examples/models/md2/ogro/skins/khorne.png
  32. 0 0
      examples/models/md2/ogro/skins/nabogro.png
  33. 0 0
      examples/models/md2/ogro/skins/ogrobase.png
  34. 0 0
      examples/models/md2/ogro/skins/sharokh.png
  35. 0 0
      examples/models/md2/ogro/skins/weapon.jpg
  36. BIN
      examples/models/md2/ogro/weapon.md2
  37. 0 0
      examples/models/md2/ratamahatta/ratamahatta.md2
  38. 0 0
      examples/models/md2/ratamahatta/skins/ctf_b.png
  39. 0 0
      examples/models/md2/ratamahatta/skins/ctf_r.png
  40. 0 0
      examples/models/md2/ratamahatta/skins/dead.png
  41. 0 0
      examples/models/md2/ratamahatta/skins/gearwhore.png
  42. 0 0
      examples/models/md2/ratamahatta/skins/ratamahatta.png
  43. 0 0
      examples/models/md2/ratamahatta/skins/w_bfg.png
  44. 0 0
      examples/models/md2/ratamahatta/skins/w_blaster.png
  45. 0 0
      examples/models/md2/ratamahatta/skins/w_chaingun.png
  46. 0 0
      examples/models/md2/ratamahatta/skins/w_glauncher.png
  47. 0 0
      examples/models/md2/ratamahatta/skins/w_hyperblaster.png
  48. 0 0
      examples/models/md2/ratamahatta/skins/w_machinegun.png
  49. 0 0
      examples/models/md2/ratamahatta/skins/w_railgun.png
  50. 0 0
      examples/models/md2/ratamahatta/skins/w_rlauncher.png
  51. 0 0
      examples/models/md2/ratamahatta/skins/w_shotgun.png
  52. 0 0
      examples/models/md2/ratamahatta/skins/w_sshotgun.png
  53. 0 0
      examples/models/md2/ratamahatta/skins/weapon.png
  54. 0 0
      examples/models/md2/ratamahatta/w_bfg.md2
  55. 0 0
      examples/models/md2/ratamahatta/w_blaster.md2
  56. 0 0
      examples/models/md2/ratamahatta/w_chaingun.MD2
  57. 0 0
      examples/models/md2/ratamahatta/w_glauncher.md2
  58. 0 0
      examples/models/md2/ratamahatta/w_hyperblaster.md2
  59. 0 0
      examples/models/md2/ratamahatta/w_machinegun.md2
  60. 0 0
      examples/models/md2/ratamahatta/w_railgun.md2
  61. 0 0
      examples/models/md2/ratamahatta/w_rlauncher.md2
  62. 0 0
      examples/models/md2/ratamahatta/w_shotgun.md2
  63. 0 0
      examples/models/md2/ratamahatta/w_sshotgun.md2
  64. 0 0
      examples/models/md2/ratamahatta/weapon.md2
  65. 16 16
      examples/webgl_loader_md2.html
  66. 6 6
      examples/webgl_loader_md2_control.html

+ 2 - 2
examples/index.html

@@ -258,6 +258,8 @@
 				"webgl_loader_gltf",
 				"webgl_loader_json_blender",
 				"webgl_loader_json_objconverter",
+				"webgl_loader_md2",
+				"webgl_loader_md2_control",
 				"webgl_loader_msgpack",
 				"webgl_loader_obj",
 				"webgl_loader_obj_mtl",
@@ -315,8 +317,6 @@
 				"webgl_morphtargets",
 				"webgl_morphtargets_horse",
 				"webgl_morphtargets_human",
-				"webgl_morphtargets_md2",
-				"webgl_morphtargets_md2_control",
 				"webgl_multiple_canvases_circle",
 				"webgl_multiple_canvases_complex",
 				"webgl_multiple_canvases_grid",

+ 3 - 3
examples/js/MD2Character.js

@@ -39,7 +39,7 @@ THREE.MD2Character = function () {
 
 		// BODY
 
-		var loader = new THREE.JSONLoader();
+		var loader = new THREE.MD2Loader();
 
 		loader.load( config.baseUrl + config.body, function( geo ) {
 
@@ -199,8 +199,8 @@ THREE.MD2Character = function () {
 
 	function createPart( geometry, skinMap ) {
 
-		var materialWireframe = new THREE.MeshBasicMaterial( { color: 0xffaa00, wireframe: true, shading: THREE.SmoothShading, morphTargets: true } );
-		var materialTexture = new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe: false, shading: THREE.SmoothShading, map: skinMap, morphTargets: true } );
+		var materialWireframe = new THREE.MeshLambertMaterial( { color: 0xffaa00, wireframe: true, shading: THREE.SmoothShading, morphTargets: true, morphNormals: true } );
+		var materialTexture = new THREE.MeshLambertMaterial( { color: 0xffffff, wireframe: false, shading: THREE.SmoothShading, map: skinMap, morphTargets: true, morphNormals: true } );
 
 		//
 

+ 3 - 3
examples/js/MD2CharacterComplex.js

@@ -152,7 +152,7 @@ THREE.MD2CharacterComplex = function () {
 
 		// BODY
 
-		var loader = new THREE.JSONLoader();
+		var loader = new THREE.MD2Loader();
 
 		loader.load( config.baseUrl + config.body, function( geo ) {
 
@@ -522,8 +522,8 @@ THREE.MD2CharacterComplex = function () {
 
 	function createPart( geometry, skinMap ) {
 
-		var materialWireframe = new THREE.MeshBasicMaterial( { color: 0xffaa00, wireframe: true, shading: THREE.SmoothShading, morphTargets: true } );
-		var materialTexture = new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe: false, shading: THREE.SmoothShading, map: skinMap, morphTargets: true } );
+		var materialWireframe = new THREE.MeshLambertMaterial( { color: 0xffaa00, wireframe: true, shading: THREE.SmoothShading, morphTargets: true, morphNormals: true } );
+		var materialTexture = new THREE.MeshLambertMaterial( { color: 0xffffff, wireframe: false, shading: THREE.SmoothShading, map: skinMap, morphTargets: true, morphNormals: true } );
 
 		//
 

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 15
examples/models/animated/ogro/ogro-light.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 72
examples/models/animated/ogro/weapon-light.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 15
examples/models/animated/ratamahatta/ratamahatta.js


+ 0 - 73
examples/models/animated/ratamahatta/ratamahatta.txt

@@ -1,73 +0,0 @@
-11-02-98
-
-================================================================
-
-Model Name              : Ratamahatta
-
-installation directory  : quake2/baseq2/players/Ratamahatta
-
-Author                  : Brian "EvilBastard" Collins
-
-additional skins by     :
-
-	'Gearwhore'  by MrRogers
-	'Jaws'       by Claudius Brunnecker
-
-Email Address           : [email protected]
-
-Website Address         : http://www.deviousassassins.com/EvilBastard/
-
-Model description       : 
-
-	It's been a long time in the making, but he's finaly done. This PPM is the prize of the Bodyshop Q2 tournament won by Tank Abbot. I hope he likes it  ;P
-
-Model Info	        :
-	Ratamahatta is a fun loving guy, who like to pull the wings off files, and similarly amusing things. After a long day of gratuitous destruction and rolling around in his own filth, Rat always enjoys a spot of tea.
-
-Additional Credits to   : 
-	
-	* Idsoftware 
-	* NST!!! Know it and love it
-
-Thanks to               :
-
-	Npherno and MrRogers for all the help
-	Virus[DA] for hosting my website.
-	Rogue13 and John McPherson for the advise and input.
-
-================================================================
-
-* Play Information *
-
-New Sounds              : NO
-
-CTF Skins               : YES
-
-VWEP Support            : No
-
-
-* Construction *
-
-Poly Count              : 666 tris.md2 / 119 weapon.md2
-
-Vert Count              : 344 tris.md2 / 85 weapon.md2
-
-Skin Count              : 4 DM, 2 CTF
-
-Base		        : Forgotten One
-
-Editor used             : 
-		Modeling - lightwave	
-		Animation- lightwave + puppetmaster
-		Skining  - NST 
-		Painting - Photoshop, NST
-		Viewing  - Skin View 
-		
-Known Bugs              : None that i know of.
-
-
-* Copyright / Permissions *
-QUAKE(R) and QUAKE II(R) are registered trademarks of id Software, Inc.
-Feel free to edit my model as you see fit, just be sure to mention me
-in the readme file. This model is not to be distributed as part of any
-commercial product.

+ 0 - 2
examples/models/animated/ratamahatta/readme.txt

@@ -1,2 +0,0 @@
-Ratamahatta character by Brian Collins
-From http://planetquake.gamespy.com/View.php?view=Quake2.Detail&id=368

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 193
examples/models/animated/ratamahatta/w_bfg.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 224
examples/models/animated/ratamahatta/w_blaster.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 224
examples/models/animated/ratamahatta/w_chaingun.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 224
examples/models/animated/ratamahatta/w_glauncher.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 224
examples/models/animated/ratamahatta/w_hyperblaster.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 224
examples/models/animated/ratamahatta/w_machinegun.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 215
examples/models/animated/ratamahatta/w_railgun.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 80
examples/models/animated/ratamahatta/w_rlauncher.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 224
examples/models/animated/ratamahatta/w_shotgun.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 224
examples/models/animated/ratamahatta/w_sshotgun.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 226
examples/models/animated/ratamahatta/weapon.js


+ 0 - 0
examples/models/animated/ogro/Ogro.txt → examples/models/md2/ogro/Ogro.txt


BIN
examples/models/md2/ogro/ogro.md2


+ 0 - 0
examples/models/animated/ogro/skins/arboshak.png → examples/models/md2/ogro/skins/arboshak.png


+ 0 - 0
examples/models/animated/ogro/skins/ctf_b.png → examples/models/md2/ogro/skins/ctf_b.png


+ 0 - 0
examples/models/animated/ogro/skins/ctf_r.png → examples/models/md2/ogro/skins/ctf_r.png


+ 0 - 0
examples/models/animated/ogro/skins/darkam.png → examples/models/md2/ogro/skins/darkam.png


+ 0 - 0
examples/models/animated/ogro/skins/freedom.png → examples/models/md2/ogro/skins/freedom.png


+ 0 - 0
examples/models/animated/ogro/skins/gib.png → examples/models/md2/ogro/skins/gib.png


+ 0 - 0
examples/models/animated/ogro/skins/gordogh.png → examples/models/md2/ogro/skins/gordogh.png


+ 0 - 0
examples/models/animated/ogro/skins/grok.jpg → examples/models/md2/ogro/skins/grok.jpg


+ 0 - 0
examples/models/animated/ogro/skins/igdosh.png → examples/models/md2/ogro/skins/igdosh.png


+ 0 - 0
examples/models/animated/ogro/skins/khorne.png → examples/models/md2/ogro/skins/khorne.png


+ 0 - 0
examples/models/animated/ogro/skins/nabogro.png → examples/models/md2/ogro/skins/nabogro.png


+ 0 - 0
examples/models/animated/ogro/skins/ogrobase.png → examples/models/md2/ogro/skins/ogrobase.png


+ 0 - 0
examples/models/animated/ogro/skins/sharokh.png → examples/models/md2/ogro/skins/sharokh.png


+ 0 - 0
examples/models/animated/ogro/skins/weapon.jpg → examples/models/md2/ogro/skins/weapon.jpg


BIN
examples/models/md2/ogro/weapon.md2


+ 0 - 0
examples/models/animated/ratamahatta/src/ratamahatta.md2 → examples/models/md2/ratamahatta/ratamahatta.md2


+ 0 - 0
examples/models/animated/ratamahatta/skins/ctf_b.png → examples/models/md2/ratamahatta/skins/ctf_b.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/ctf_r.png → examples/models/md2/ratamahatta/skins/ctf_r.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/dead.png → examples/models/md2/ratamahatta/skins/dead.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/gearwhore.png → examples/models/md2/ratamahatta/skins/gearwhore.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/ratamahatta.png → examples/models/md2/ratamahatta/skins/ratamahatta.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/w_bfg.png → examples/models/md2/ratamahatta/skins/w_bfg.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/w_blaster.png → examples/models/md2/ratamahatta/skins/w_blaster.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/w_chaingun.png → examples/models/md2/ratamahatta/skins/w_chaingun.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/w_glauncher.png → examples/models/md2/ratamahatta/skins/w_glauncher.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/w_hyperblaster.png → examples/models/md2/ratamahatta/skins/w_hyperblaster.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/w_machinegun.png → examples/models/md2/ratamahatta/skins/w_machinegun.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/w_railgun.png → examples/models/md2/ratamahatta/skins/w_railgun.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/w_rlauncher.png → examples/models/md2/ratamahatta/skins/w_rlauncher.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/w_shotgun.png → examples/models/md2/ratamahatta/skins/w_shotgun.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/w_sshotgun.png → examples/models/md2/ratamahatta/skins/w_sshotgun.png


+ 0 - 0
examples/models/animated/ratamahatta/skins/weapon.png → examples/models/md2/ratamahatta/skins/weapon.png


+ 0 - 0
examples/models/animated/ratamahatta/src/w_bfg.md2 → examples/models/md2/ratamahatta/w_bfg.md2


+ 0 - 0
examples/models/animated/ratamahatta/src/w_blaster.md2 → examples/models/md2/ratamahatta/w_blaster.md2


+ 0 - 0
examples/models/animated/ratamahatta/src/w_chaingun.MD2 → examples/models/md2/ratamahatta/w_chaingun.MD2


+ 0 - 0
examples/models/animated/ratamahatta/src/w_glauncher.md2 → examples/models/md2/ratamahatta/w_glauncher.md2


+ 0 - 0
examples/models/animated/ratamahatta/src/w_hyperblaster.md2 → examples/models/md2/ratamahatta/w_hyperblaster.md2


+ 0 - 0
examples/models/animated/ratamahatta/src/w_machinegun.md2 → examples/models/md2/ratamahatta/w_machinegun.md2


+ 0 - 0
examples/models/animated/ratamahatta/src/w_railgun.md2 → examples/models/md2/ratamahatta/w_railgun.md2


+ 0 - 0
examples/models/animated/ratamahatta/src/w_rlauncher.md2 → examples/models/md2/ratamahatta/w_rlauncher.md2


+ 0 - 0
examples/models/animated/ratamahatta/src/w_shotgun.md2 → examples/models/md2/ratamahatta/w_shotgun.md2


+ 0 - 0
examples/models/animated/ratamahatta/src/w_sshotgun.md2 → examples/models/md2/ratamahatta/w_sshotgun.md2


+ 0 - 0
examples/models/animated/ratamahatta/src/weapon.md2 → examples/models/md2/ratamahatta/weapon.md2


+ 16 - 16
examples/webgl_morphtargets_md2.html → examples/webgl_loader_md2.html

@@ -36,15 +36,15 @@
 
 	<body>
 		<div id="info">
-			<a href="http://threejs.org" target="_blank">three.js</a> - morphtargets -
-			MD2 character by <a href="http://planetquake.gamespy.com/View.php?view=Quake2.Detail&id=368">Brian Collins</a><br />
-			converted by <a href="https://twitter.com/#!/oosmoxiecode">@oosmoxiecode</a>'s <a href="http://oos.moxiecode.com/blog/2012/01/md2-to-json-converter/">MD2 converter<a>
+			<a href="http://threejs.org" target="_blank">three.js</a> - MD2 Loader -
+			Character by <a href="http://planetquake.gamespy.com/View.php?view=Quake2.Detail&id=368">Brian Collins</a>
 		</div>
 
 		<script src="../build/three.min.js"></script>
 
 		<script src="js/controls/OrbitControls.js"></script>
 
+		<script src='js/loaders/MD2Loader.js'></script>
 		<script src='js/MD2Character.js'></script>
 
 		<script src='js/Detector.js'></script>
@@ -179,21 +179,21 @@
 
 				var config = {
 
-					baseUrl: "models/animated/ratamahatta/",
+					baseUrl: "models/md2/ratamahatta/",
 
-					body: "ratamahatta.js",
+					body: "ratamahatta.md2",
 					skins: [ "ratamahatta.png", "ctf_b.png", "ctf_r.png", "dead.png", "gearwhore.png" ],
-					weapons:  [  [ "weapon.js", "weapon.png" ],
-								 [ "w_bfg.js", "w_bfg.png" ],
-								 [ "w_blaster.js", "w_blaster.png" ],
-								 [ "w_chaingun.js", "w_chaingun.png" ],
-								 [ "w_glauncher.js", "w_glauncher.png" ],
-								 [ "w_hyperblaster.js", "w_hyperblaster.png" ],
-								 [ "w_machinegun.js", "w_machinegun.png" ],
-								 [ "w_railgun.js", "w_railgun.png" ],
-								 [ "w_rlauncher.js", "w_rlauncher.png" ],
-								 [ "w_shotgun.js", "w_shotgun.png" ],
-								 [ "w_sshotgun.js", "w_sshotgun.png" ]
+					weapons:  [  [ "weapon.md2", "weapon.png" ],
+								 [ "w_bfg.md2", "w_bfg.png" ],
+								 [ "w_blaster.md2", "w_blaster.png" ],
+								 [ "w_chaingun.md2", "w_chaingun.png" ],
+								 [ "w_glauncher.md2", "w_glauncher.png" ],
+								 [ "w_hyperblaster.md2", "w_hyperblaster.png" ],
+								 [ "w_machinegun.md2", "w_machinegun.png" ],
+								 [ "w_railgun.md2", "w_railgun.png" ],
+								 [ "w_rlauncher.md2", "w_rlauncher.png" ],
+								 [ "w_shotgun.md2", "w_shotgun.png" ],
+								 [ "w_sshotgun.md2", "w_sshotgun.png" ]
 								]
 
 				};

+ 6 - 6
examples/webgl_morphtargets_md2_control.html → examples/webgl_loader_md2_control.html

@@ -36,9 +36,8 @@
 
 	<body>
 		<div id="info">
-			<a href="http://threejs.org" target="_blank">three.js</a> - morphtargets -
-			Ogro by <a href="http://planetquake.gamespy.com/View.php?view=Quake2.Detail&id=556">Magarnigal</a> -
-			converted by <a href="https://twitter.com/#!/oosmoxiecode">@oosmoxiecode</a>'s <a href="http://oos.moxiecode.com/blog/2012/01/md2-to-json-converter/">MD2 converter</a><br />
+			<a href="http://threejs.org" target="_blank">three.js</a> - MD2 Loader -
+			Ogro by <a href="http://planetquake.gamespy.com/View.php?view=Quake2.Detail&id=556">Magarnigal</a><br />
 			use arrows to control characters, mouse for camera
 		</div>
 
@@ -46,6 +45,7 @@
 
 		<script src="js/controls/OrbitControls.js"></script>
 
+		<script src='js/loaders/MD2Loader.js'></script>
 		<script src='js/MD2CharacterComplex.js'></script>
 		<script src='js/Gyroscope.js'></script>
 
@@ -173,13 +173,13 @@
 
 				var configOgro = {
 
-					baseUrl: "models/animated/ogro/",
+					baseUrl: "models/md2/ogro/",
 
-					body: "ogro-light.js",
+					body: "ogro.md2",
 					skins: [ "grok.jpg", "ogrobase.png", "arboshak.png", "ctf_r.png", "ctf_b.png", "darkam.png", "freedom.png",
 							 "gib.png", "gordogh.png", "igdosh.png", "khorne.png", "nabogro.png",
 							 "sharokh.png" ],
-					weapons:  [ [ "weapon-light.js", "weapon.jpg" ] ],
+					weapons:  [ [ "weapon.md2", "weapon.jpg" ] ],
 					animations: {
 						move: "run",
 						idle: "stand",

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است