Explorar o código

Examples: CurveModifier examples clean up.

Mr.doob %!s(int64=4) %!d(string=hai) anos
pai
achega
39aca0494b

+ 2 - 0
examples/files.json

@@ -179,6 +179,8 @@
 		"webgl_math_obb",
 		"webgl_math_orientation_transform",
 		"webgl_mirror",
+		"webgl_modifier_curve",
+		"webgl_modifier_curve_instanced",
 		"webgl_modifier_edgesplit",
 		"webgl_modifier_simplifier",
 		"webgl_modifier_subdivision",

+ 0 - 0
examples/jsm/misc/CurveModifier.d.ts → examples/jsm/modifiers/CurveModifier.d.ts


+ 0 - 0
examples/jsm/misc/CurveModifier.js → examples/jsm/modifiers/CurveModifier.js


BIN=BIN
examples/screenshots/webgl_modifier_curve.jpg


BIN=BIN
examples/screenshots/webgl_modifier_curve_instanced.jpg


+ 9 - 9
examples/misc_curve_modifier.html → examples/webgl_modifier_curve.html

@@ -21,7 +21,7 @@
 			import * as THREE from "../build/three.module.js";
 			import { TransformControls } from "./jsm/controls/TransformControls.js";
 			import Stats from "./jsm/libs/stats.module.js";
-			import { Flow } from "./jsm/misc/CurveModifier.js";
+			import { Flow } from "./jsm/modifiers/CurveModifier.js";
 
 			const ACTION_SELECT = 1,
 				ACTION_NONE = 0;
@@ -69,7 +69,7 @@
 					handle.position.copy( handlePos );
 					curveHandles.push( handle );
 					scene.add( handle );
-			
+
 				}
 
 				const curve = new THREE.CatmullRomCurve3(
@@ -128,9 +128,9 @@
 					flow = new Flow( objectToCurve );
 					flow.updateCurve( 0, curve );
 					scene.add( flow.object3D );
-			
+
 				} );
-			
+
 				//
 
 				renderer = new THREE.WebGLRenderer( { antialias: true } );
@@ -146,7 +146,7 @@
 						action = ACTION_SELECT;
 						mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
 						mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
-			
+
 					},
 					false
 				);
@@ -162,7 +162,7 @@
 						flow.updateCurve( 0, curve );
 
 					}
-			
+
 				} );
 
 				stats = new Stats();
@@ -197,7 +197,7 @@
 						const target = intersects[ 0 ].object;
 						control.attach( target );
 						scene.add( control );
-			
+
 					}
 
 				}
@@ -205,7 +205,7 @@
 				if ( flow ) {
 
 					flow.moveAlongCurve( 0.001 );
-			
+
 				}
 
 				render();
@@ -219,7 +219,7 @@
 				if ( mixer ) {
 
 					mixer.update( delta );
-			
+
 				}
 
 				renderer.render( scene, camera );

+ 9 - 9
examples/misc_curve_modifier_instanced.html → examples/webgl_modifier_curve_instanced.html

@@ -21,7 +21,7 @@
 			import * as THREE from "../build/three.module.js";
 			import { TransformControls } from "./jsm/controls/TransformControls.js";
 			import Stats from "./jsm/libs/stats.module.js";
-			import { InstancedFlow } from "./jsm/misc/CurveModifier.js";
+			import { InstancedFlow } from "./jsm/modifiers/CurveModifier.js";
 
 			const ACTION_SELECT = 1,
 				ACTION_NONE = 0;
@@ -96,7 +96,7 @@
 						curve,
 						line
 					};
-			
+
 				} );
 
 
@@ -155,9 +155,9 @@
 						flow.object3D.setColorAt( i, new THREE.Color( 0xffffff * Math.random() ) );
 
 					}
-			
+
 				} );
-			
+
 				//
 
 				renderer = new THREE.WebGLRenderer( { antialias: true } );
@@ -173,7 +173,7 @@
 						action = ACTION_SELECT;
 						mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
 						mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
-			
+
 					},
 					false
 				);
@@ -193,7 +193,7 @@
 						} );
 
 					}
-			
+
 				} );
 
 				stats = new Stats();
@@ -228,7 +228,7 @@
 						const target = intersects[ 0 ].object;
 						control.attach( target );
 						scene.add( control );
-			
+
 					}
 
 				}
@@ -236,7 +236,7 @@
 				if ( flow ) {
 
 					flow.moveAlongCurve( 0.001 );
-			
+
 				}
 
 				render();
@@ -250,7 +250,7 @@
 				if ( mixer ) {
 
 					mixer.update( delta );
-			
+
 				}
 
 				renderer.render( scene, camera );