浏览代码

Renamed DynamicGeometry to DirectGeometry.

Mr.doob 10 年之前
父节点
当前提交
39e8a9762d

+ 1 - 1
examples/webgl_animation_cloth.html

@@ -191,7 +191,7 @@
 
 				// cloth geometry
 				clothGeometry = new THREE.ParametricGeometry( clothFunction, cloth.w, cloth.h );
-				clothGeometry = new THREE.DynamicGeometry().fromGeometry( clothGeometry );
+				clothGeometry = new THREE.DirectGeometry().fromGeometry( clothGeometry );
 
 				var uniforms = { texture:  { type: "t", value: clothTexture } };
 				var vertexShader = document.getElementById( 'vertexShaderDepth' ).textContent;

+ 1 - 1
examples/webgl_decals.html

@@ -111,7 +111,7 @@
 			light.position.set( 1, 0.75, 0.5 );
 			scene.add( light );
 
-			line = new THREE.Line( new THREE.DynamicGeometry(), new THREE.LineBasicMaterial( { linewidth: 4 } ) );
+			line = new THREE.Line( new THREE.DirectGeometry(), new THREE.LineBasicMaterial( { linewidth: 4 } ) );
 			line.geometry.vertices.push( new THREE.Vector3(), new THREE.Vector3() );
 			scene.add( line );
 

+ 1 - 1
examples/webgl_geometry_dynamic.html

@@ -96,7 +96,7 @@
 
 				}
 
-				geometry = new THREE.DynamicGeometry().fromGeometry( geometry );
+				geometry = new THREE.DirectGeometry().fromGeometry( geometry );
 
 				var texture = THREE.ImageUtils.loadTexture( "textures/water.jpg" );
 				texture.wrapS = texture.wrapT = THREE.RepeatWrapping;

+ 7 - 7
src/core/BufferGeometry.js

@@ -165,8 +165,8 @@ THREE.BufferGeometry.prototype = {
 
 				if ( geometry instanceof THREE.Geometry ) {
 
-					console.log( 'THREE.BufferGeometry.setFromObject(): Converted THREE.Geometry to THREE.DynamicGeometry as required for THREE.SkinnedMesh.', geometry );
-					geometry = new THREE.DynamicGeometry().fromGeometry( geometry );
+					console.log( 'THREE.BufferGeometry.setFromObject(): Converted THREE.Geometry to THREE.DirectGeometry as required for THREE.SkinnedMesh.', geometry );
+					geometry = new THREE.DirectGeometry().fromGeometry( geometry );
 
 				}
 
@@ -184,8 +184,8 @@ THREE.BufferGeometry.prototype = {
 
 				if ( geometry instanceof THREE.Geometry ) {
 
-					console.log( 'THREE.BufferGeometry.setFromObject(): Converted THREE.Geometry to THREE.DynamicGeometry as required for MorphTargets.', geometry );
-					geometry = new THREE.DynamicGeometry().fromGeometry( geometry );
+					console.log( 'THREE.BufferGeometry.setFromObject(): Converted THREE.Geometry to THREE.DirectGeometry as required for MorphTargets.', geometry );
+					geometry = new THREE.DirectGeometry().fromGeometry( geometry );
 
 				}
 
@@ -209,9 +209,9 @@ THREE.BufferGeometry.prototype = {
 
 			}
 
-			if ( geometry instanceof THREE.DynamicGeometry ) {
+			if ( geometry instanceof THREE.DirectGeometry ) {
 
-				this.fromDynamicGeometry( geometry );
+				this.fromDirectGeometry( geometry );
 
 			} else if ( geometry instanceof THREE.Geometry ) {
 
@@ -456,7 +456,7 @@ THREE.BufferGeometry.prototype = {
 
 	},
 
-	fromDynamicGeometry: function ( geometry ) {
+	fromDirectGeometry: function ( geometry ) {
 
 		var indices = new Uint16Array( geometry.faces.length * 3 );
 		this.addAttribute( 'index', new THREE.BufferAttribute( indices, 1 ).copyFacesArray( geometry.faces ) );

+ 8 - 8
src/core/DynamicGeometry.js → src/core/DirectGeometry.js

@@ -2,14 +2,14 @@
  * @author mrdoob / http://mrdoob.com/
  */
 
-THREE.DynamicGeometry = function () {
+THREE.DirectGeometry = function () {
 
 	Object.defineProperty( this, 'id', { value: THREE.GeometryIdCount ++ } );
 
 	this.uuid = THREE.Math.generateUUID();
 
 	this.name = '';
-	this.type = 'DynamicGeometry';
+	this.type = 'DirectGeometry';
 
 	this.vertices = [];
 	this.colors = [];
@@ -32,23 +32,23 @@ THREE.DynamicGeometry = function () {
 
 };
 
-THREE.DynamicGeometry.prototype = {
+THREE.DirectGeometry.prototype = {
 
-	constructor: THREE.DynamicGeometry,
+	constructor: THREE.DirectGeometry,
 
 	computeBoundingBox: THREE.Geometry.prototype.computeBoundingBox,
 	computeBoundingSphere: THREE.Geometry.prototype.computeBoundingSphere,
 
 	computeFaceNormals: function () {
 
-		console.warn( 'THREE.DynamicGeometry: computeFaceNormals() is not a method of this type of geometry.' );
+		console.warn( 'THREE.DirectGeometry: computeFaceNormals() is not a method of this type of geometry.' );
 		return this;
 
 	},
 
 	computeVertexNormals: function () {
 
-		console.warn( 'THREE.DynamicGeometry: computeVertexNormals() is not a method of this type of geometry.' );
+		console.warn( 'THREE.DirectGeometry: computeVertexNormals() is not a method of this type of geometry.' );
 		return this;
 
 	},
@@ -84,7 +84,7 @@ THREE.DynamicGeometry.prototype = {
 
 			if ( vertexUvs === undefined ) {
 
-				console.warn( 'THREE.DynamicGeometry.fromGeometry(): Missing vertexUVs', i );
+				console.warn( 'THREE.DirectGeometry.fromGeometry(): Missing vertexUVs', i );
 				vertexUvs = [ new THREE.Vector2(), new THREE.Vector2(), new THREE.Vector2() ];
 
 			}
@@ -116,4 +116,4 @@ THREE.DynamicGeometry.prototype = {
 
 };
 
-THREE.EventDispatcher.prototype.apply( THREE.DynamicGeometry.prototype );
+THREE.EventDispatcher.prototype.apply( THREE.DirectGeometry.prototype );

+ 1 - 1
src/extras/helpers/SkeletonHelper.js

@@ -9,7 +9,7 @@ THREE.SkeletonHelper = function ( object ) {
 
 	this.bones = this.getBoneList( object );
 
-	var geometry = new THREE.DynamicGeometry();
+	var geometry = new THREE.DirectGeometry();
 
 	for ( var i = 0; i < this.bones.length; i ++ ) {
 

+ 1 - 1
src/renderers/webgl/WebGLObjects.js

@@ -119,7 +119,7 @@ THREE.WebGLObjects = function ( gl, info ) {
 
 		var geometry = geometries.get( object );
 
-		if ( object.geometry instanceof THREE.DynamicGeometry ) {
+		if ( object.geometry instanceof THREE.DirectGeometry ) {
 
 			geometry.updateFromObject( object );
 

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

@@ -31,7 +31,7 @@
 	"src/core/InstancedInterleavedBuffer.js",
 	"src/core/InterleavedBufferAttribute.js",
 	"src/core/Geometry.js",
-	"src/core/DynamicGeometry.js",
+	"src/core/DirectGeometry.js",
 	"src/core/BufferGeometry.js",
 	"src/core/InstancedBufferGeometry.js",
 	"src/cameras/Camera.js",