소스 검색

Examples: Removed usage of JSONLoader in misc_fps.html

Mugen87 6 년 전
부모
커밋
74df0cebff
4개의 변경된 파일4개의 추가작업 그리고 20개의 파일을 삭제
  1. 4 15
      examples/misc_fps.html
  2. 0 0
      examples/models/json/platform/platform.json
  3. BIN
      examples/models/platform/platform.jpg
  4. 0 5
      examples/models/platform/platform.json

+ 4 - 15
examples/misc_fps.html

@@ -262,20 +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 } ) );
+				var loader = new THREE.ObjectLoader();
+				loader.load( url, function ( platform ) {
 
 					platform.name = "platform";
 
@@ -308,12 +300,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/json/platform/platform.json


BIN
examples/models/platform/platform.jpg


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 5
examples/models/platform/platform.json


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.