Browse Source

Merge pull request #2 from mrdoob/dev

Dev sync
Ben Adams 10 years ago
parent
commit
3e09c15a8d
4 changed files with 14 additions and 16 deletions
  1. 1 1
      LICENSE
  2. 4 6
      docs/api/core/Object3D.html
  3. 1 1
      examples/js/utils/ShadowMapViewer.js
  4. 8 8
      src/core/Object3D.js

+ 1 - 1
LICENSE

@@ -1,6 +1,6 @@
 The MIT License
 The MIT License
 
 
-Copyright © 2010-2015 three.js authors
+Copyright © 2010-2015 three.js authors
 
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 of this software and associated documentation files (the "Software"), to deal

+ 4 - 6
docs/api/core/Object3D.html

@@ -263,22 +263,20 @@
 		</div>
 		</div>
 
 
 
 
-		<h3>[method:Object3D getObjectByName]([page:String name], [page:Boolean recursive])</h3>
+		<h3>[method:Object3D getObjectByName]([page:String name])</h3>
 		<div>
 		<div>
 		name -- String to match to the children's Object3d.name property. <br />
 		name -- String to match to the children's Object3d.name property. <br />
-		recursive -- Boolean whether to search through the children's children. Default is false.
 		</div>
 		</div>
 		<div>
 		<div>
-		Searches through the object's children and returns the first with a matching name, optionally recursive.
+		Searches through the object's children and returns the first with a matching name.
 		</div>
 		</div>
 
 
-		<h3>[method:Object3D getObjectById]([page:Integer id], [page:Boolean recursive])</h3>
+		<h3>[method:Object3D getObjectById]([page:Integer id])</h3>
 		<div>
 		<div>
 		id -- Unique number of the object instance<br />
 		id -- Unique number of the object instance<br />
-		recursive -- Boolean whether to search through the children's children. Default is false.
 		</div>
 		</div>
 		<div>
 		<div>
-		Searches through the object's children and returns the first with a matching id, optionally recursive.
+		Searches through the object's children and returns the first with a matching id.
 		</div>
 		</div>
 
 
 		<h3>[method:Object3D translateOnAxis]([page:Vector3 axis], [page:Float distance])</h3>
 		<h3>[method:Object3D translateOnAxis]([page:Vector3 axis], [page:Float distance])</h3>

+ 1 - 1
examples/js/utils/ShadowMapViewer.js

@@ -14,7 +14,7 @@
  *		light.name = 'Sun';
  *		light.name = 'Sun';
  *
  *
  *	3) Create a shadow map viewer for that light and set its size and position optionally:
  *	3) Create a shadow map viewer for that light and set its size and position optionally:
- *		var shadowMapViewer = THREE.ShadowMapViewer( light );
+ *		var shadowMapViewer = new THREE.ShadowMapViewer( light );
  *		shadowMapViewer.size.set( 128, 128 );	//width, height  default: 256, 256
  *		shadowMapViewer.size.set( 128, 128 );	//width, height  default: 256, 256
  *		shadowMapViewer.position.set( 10, 10 );	//x, y in pixel	 default: 0, 0 (top left corner)
  *		shadowMapViewer.position.set( 10, 10 );	//x, y in pixel	 default: 0, 0 (top left corner)
  *
  *

+ 8 - 8
src/core/Object3D.js

@@ -368,33 +368,33 @@ THREE.Object3D.prototype = {
 
 
 	},
 	},
 
 
-	getChildByName: function ( name, recursive ) {
+	getChildByName: function ( name ) {
 
 
 		console.warn( 'THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().' );
 		console.warn( 'THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().' );
-		return this.getObjectByName( name, recursive );
+		return this.getObjectByName( name );
 
 
 	},
 	},
 
 
-	getObjectById: function ( id, recursive ) {
+	getObjectById: function ( id ) {
 
 
-		return this.getObjectByProperty( 'id', id, recursive );
+		return this.getObjectByProperty( 'id', id );
 
 
 	},
 	},
 
 
-	getObjectByName: function ( name, recursive ) {
+	getObjectByName: function ( name ) {
 
 
-		return this.getObjectByProperty( 'name', name, recursive );
+		return this.getObjectByProperty( 'name', name );
 
 
 	},
 	},
 
 
-	getObjectByProperty: function ( name, value, recursive ) {
+	getObjectByProperty: function ( name, value ) {
 
 
 		if ( this[ name ] === value ) return this;
 		if ( this[ name ] === value ) return this;
 
 
 		for ( var i = 0, l = this.children.length; i < l; i ++ ) {
 		for ( var i = 0, l = this.children.length; i < l; i ++ ) {
 
 
 			var child = this.children[ i ];
 			var child = this.children[ i ];
-			var object = child.getObjectByProperty( name, value, recursive );
+			var object = child.getObjectByProperty( name, value );
 
 
 			if ( object !== undefined ) {
 			if ( object !== undefined ) {