提交 590bc8fd 编写于 作者: M Mr.doob

New Geometry2 and IndexedGeometry2 approach.

上级 8f894886
/**
* @author mrdoob / http://mrdoob.com/
*/
THREE.Geometry2 = function ( vertices, normals, uvs ) {
THREE.BufferGeometry.call( this );
this.attributes[ 'position' ] = { array: vertices, itemSize: 3 };
this.attributes[ 'normal' ] = { array: normals, itemSize: 3 };
this.attributes[ 'uv' ] = { array: uvs, itemSize: 2 };
};
THREE.Geometry2.prototype = Object.create( THREE.BufferGeometry.prototype );
\ No newline at end of file
/**
* @author mrdoob / http://mrdoob.com/
*/
THREE.IndexedGeometry2 = function ( indices, vertices, normals, uvs ) {
THREE.BufferGeometry.call( this );
this.attributes[ 'index' ] = { array: indices, itemSize: 1 };
this.attributes[ 'position' ] = { array: vertices, itemSize: 3 };
this.attributes[ 'normal' ] = { array: normals, itemSize: 3 };
this.attributes[ 'uv' ] = { array: uvs, itemSize: 2 };
};
THREE.IndexedGeometry2.prototype = Object.create( THREE.BufferGeometry.prototype );
\ No newline at end of file
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
"src/core/BufferGeometry.js", "src/core/BufferGeometry.js",
"src/core/BufferGeometryManipulator.js", "src/core/BufferGeometryManipulator.js",
"src/core/Geometry.js", "src/core/Geometry.js",
"src/core/Geometry2.js",
"src/core/IndexedGeometry2.js",
"src/cameras/Camera.js", "src/cameras/Camera.js",
"src/cameras/OrthographicCamera.js", "src/cameras/OrthographicCamera.js",
"src/cameras/PerspectiveCamera.js", "src/cameras/PerspectiveCamera.js",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册