Browse Source

BufferGeometryManipulator to GeometryEditor.

Mr.doob 11 năm trước cách đây
mục cha
commit
3dfeb8a74c

+ 3 - 3
examples/canvas_geometry_terrain.html

@@ -75,12 +75,12 @@
 				var plane = new THREE.PlaneGeometry( 2000, 2000, quality - 1, quality - 1 );
 				plane.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) );
 
-				var manipulator = new THREE.BufferGeometryManipulator( plane );
+				var editor = new THREE.GeometryEditor( plane );
 
-				for ( var i = 0, l = manipulator.vertices.length; i < l; i ++ ) {
+				for ( var i = 0, l = editor.vertices.length; i < l; i ++ ) {
 
 					var x = i % quality, y = Math.floor( i / quality );
-					manipulator.vertices[ i ].y = data[ ( x * step ) + ( y * step ) * 1024 ] * 2 - 128;
+					editor.vertices[ i ].y = data[ ( x * step ) + ( y * step ) * 1024 ] * 2 - 128;
 
 				}
 

+ 3 - 3
examples/webgl_geometry_terrain.html

@@ -84,11 +84,11 @@
 				var geometry = new THREE.PlaneGeometry( 7500, 7500, worldWidth - 1, worldDepth - 1 );
 				geometry.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) );
 
-				var manipulator = new THREE.BufferGeometryManipulator( geometry );
+				var editor = new THREE.GeometryEditor( geometry );
 
-				for ( var i = 0, l = manipulator.vertices.length; i < l; i ++ ) {
+				for ( var i = 0, l = editor.vertices.length; i < l; i ++ ) {
 
-					manipulator.vertices[ i ].y = data[ i ] * 10;
+					editor.vertices[ i ].y = data[ i ] * 10;
 
 				}
 

+ 1 - 1
src/core/BufferGeometryManipulator.js → src/core/GeometryEditor.js

@@ -2,7 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  */
 
-THREE.BufferGeometryManipulator = function ( bufferGeometry ) {
+THREE.GeometryEditor = function ( bufferGeometry ) {
 
 	this.vertices = [];
 	this.normals = [];

+ 1 - 1
utils/build/includes/common.json

@@ -28,10 +28,10 @@
 	"src/core/Face4.js",
 	"src/core/BufferAttribute.js",
 	"src/core/BufferGeometry.js",
-	"src/core/BufferGeometryManipulator.js",
 	"src/core/Geometry2.js",
 	"src/core/IndexedGeometry2.js",
 	"src/core/Geometry.js",
+	"src/core/GeometryEditor.js",
 	"src/core/ProxyGeometry.js",
 	"src/core/proxies/MultiColor.js",
 	"src/core/proxies/MultiVector3.js",