瀏覽代碼

Merge pull request #15127 from Mugen87/dev11

Examples: Removed usage of JSONLoader in misc_fps.html
Mr.doob 6 年之前
父節點
當前提交
90a6f04812

+ 4 - 17
examples/misc_fps.html

@@ -262,22 +262,12 @@
 
 			// init 3D stuff
 
-			function makePlatform( jsonUrl, textureUrl, textureQuality ) {
+			function makePlatform( url ) {
 
 				var placeholder = new THREE.Object3D();
 
-				var texture = new THREE.TextureLoader().load( textureUrl );
-				texture.minFilter = THREE.LinearFilter;
-				texture.anisotropy = textureQuality;
-
-				var loader = new THREE.JSONLoader();
-				loader.load( jsonUrl, function ( geometry ) {
-
-					geometry.computeFaceNormals();
-
-					var platform = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { map: texture } ) );
-
-					platform.name = "platform";
+				var loader = new THREE.ObjectLoader();
+				loader.load( url, function ( platform ) {
 
 					placeholder.add( platform );
 
@@ -308,12 +298,9 @@
 			scene.background = envMap;
 
 			scene.add( makePlatform(
-				'models/platform/platform.json',
-				'models/platform/platform.jpg',
-				renderer.capabilities.getMaxAnisotropy()
+				'models/json/platform/platform.json'
 			) );
 
-
 			// start the game
 
 			var start = function ( gameLoop, gameViewportSize ) {

+ 0 - 0
examples/models/platform/platform.jpg → examples/models/json/platform/platform.jpg


File diff suppressed because it is too large
+ 0 - 0
examples/models/json/platform/platform.json


File diff suppressed because it is too large
+ 0 - 5
examples/models/platform/platform.json


Some files were not shown because too many files changed in this diff