提交 3dfeb8a7 编写于 作者: M Mr.doob

BufferGeometryManipulator to GeometryEditor.

上级 ca07750a
...@@ -75,12 +75,12 @@ ...@@ -75,12 +75,12 @@
var plane = new THREE.PlaneGeometry( 2000, 2000, quality - 1, quality - 1 ); var plane = new THREE.PlaneGeometry( 2000, 2000, quality - 1, quality - 1 );
plane.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) ); 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 ); 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;
} }
......
...@@ -84,11 +84,11 @@ ...@@ -84,11 +84,11 @@
var geometry = new THREE.PlaneGeometry( 7500, 7500, worldWidth - 1, worldDepth - 1 ); var geometry = new THREE.PlaneGeometry( 7500, 7500, worldWidth - 1, worldDepth - 1 );
geometry.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) ); 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;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @author mrdoob / http://mrdoob.com/ * @author mrdoob / http://mrdoob.com/
*/ */
THREE.BufferGeometryManipulator = function ( bufferGeometry ) { THREE.GeometryEditor = function ( bufferGeometry ) {
this.vertices = []; this.vertices = [];
this.normals = []; this.normals = [];
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
"src/core/Face4.js", "src/core/Face4.js",
"src/core/BufferAttribute.js", "src/core/BufferAttribute.js",
"src/core/BufferGeometry.js", "src/core/BufferGeometry.js",
"src/core/BufferGeometryManipulator.js",
"src/core/Geometry2.js", "src/core/Geometry2.js",
"src/core/IndexedGeometry2.js", "src/core/IndexedGeometry2.js",
"src/core/Geometry.js", "src/core/Geometry.js",
"src/core/GeometryEditor.js",
"src/core/ProxyGeometry.js", "src/core/ProxyGeometry.js",
"src/core/proxies/MultiColor.js", "src/core/proxies/MultiColor.js",
"src/core/proxies/MultiVector3.js", "src/core/proxies/MultiVector3.js",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册