浏览代码

Merge pull request #19683 from gero3/cleanupClothSimultation

Cleanup cloth simulation GUI
Mr.doob 5 年之前
父节点
当前提交
2fabe35225
共有 1 个文件被更改,包括 14 次插入7 次删除
  1. 14 7
      examples/webgl_animation_cloth.html

+ 14 - 7
examples/webgl_animation_cloth.html

@@ -45,7 +45,7 @@
 			var params = {
 				enableWind: true,
 				showBall: false,
-				tooglePins: togglePins
+				togglePins: togglePins
 			};
 
 			var DAMPING = 0.03;
@@ -581,13 +581,20 @@
 				//
 
 				var gui = new GUI();
-				gui.add( params, 'enableWind' );
-				gui.add( params, 'showBall' );
-				gui.add( params, 'tooglePins' );
-
+				gui.add( params, 'enableWind' ).name( 'Enable wind' );
+				gui.add( params, 'showBall' ).name( 'Show ball' );
+				gui.add( params, 'togglePins' ).name( 'Toggle pins' );
 				//
 
-				if ( typeof TESTING !== 'undefined' ) { for ( var i = 0; i < 50; i ++ ) { simulate( 500 - 10 * i ); }; };
+				if ( typeof TESTING !== 'undefined' ) {
+
+					for ( var i = 0; i < 50; i ++ ) {
+
+						simulate( 500 - 10 * i );
+
+					}
+
+				}
 
 			}
 
@@ -637,4 +644,4 @@
 
 		</script>
 	</body>
-</html>
+</html>