Skip to content

Commit a06fd31

Browse files
aardgoosemrdoob
authored andcommitted
Correct object3d and its main derivatives' clone() method documentation. (mrdoob#9030)
1 parent 6e4e899 commit a06fd31

File tree

11 files changed

+35
-59
lines changed

11 files changed

+35
-59
lines changed

docs/api/core/Object3D.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,12 @@ <h3>[method:null updateMatrixWorld]( [page:Boolean force] )</h3>
250250
Updates global transform of the object and its children.
251251
</div>
252252

253-
<h3>[method:Object3D clone]()</h3>
253+
<h3>[method:Object3D clone]( [page:Boolean recursive] )</h3>
254254
<div>
255-
Creates a new clone of this object and all descendants.
255+
recursive -- if true, descendants of the object are also cloned. Default is true.
256+
</div>
257+
<div>
258+
Returns a clone of this object and optionaly all descendants.
256259
</div>
257260

258261

docs/api/objects/Bone.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,9 @@ <h3>[property:SkinnedMesh skin]</h3>
4444

4545
<h2>Methods</h2>
4646

47-
<h3>[method:Object3D clone]( [page:Object3D object] )</h3>
47+
<h3>[method:Bone clone]()</h3>
4848
<div>
49-
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned Bone Object.
50-
</div>
51-
<div>
52-
Clone a Bone Object.
49+
Returns a clone of this Bone object and its descendants.
5350
</div>
5451

5552
<h2>Source</h2>

docs/api/objects/LOD.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,12 @@ <h3>[method:null update]( [page:Camera camera] )</h3>
8484
Update the visiblility of the level of detail based on the distance from the camera.
8585
</div>
8686

87-
<h3>[method:Object3D clone]( [page:Object3D object] )</h3>
87+
<h3>[method:LOD clone]()</h3>
8888
<div>
89-
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned LOD Object.
90-
</div>
91-
<div>
92-
Clone a LOD Object.
89+
Returns a clone of this LOD object and its associated distance specific objects.
9390
</div>
9491

92+
9593
<h2>Source</h2>
9694

9795
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

docs/api/objects/LensFlare.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,12 @@ <h3>[method:null updateLensFlares]()</h3>
6767
Updates the lens flare based on the [page:LensFlare.positionScreen positionScreen] property.
6868
</div>
6969

70-
<h3>[method:Object3D clone]( [page:Object3D object] )</h3>
70+
<h3>[method:Lens Flare clone]()</h3>
7171
<div>
72-
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned LensFlare Object.
73-
</div>
74-
<div>
75-
Clone a LensFlare Object.
72+
Returns a clone of this LensFlare object and its descendants.
7673
</div>
7774

75+
7876
<h2>Source</h2>
7977

8078
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

docs/api/objects/Line.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,12 @@ <h3>[method:Array raycast]( [page:Raycaster raycaster], [page:Array intersects]
6565
Get intersections between a casted ray and this Line. [page:Raycaster.intersectObject] will call this method.
6666
</div>
6767

68-
<h3>[method:Object3D clone]( [page:Object3D object] )</h3>
68+
<h3>[method:Line clone]()</h3>
6969
<div>
70-
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned Line Object.
71-
</div>
72-
<div>
73-
Clone a Line Object.
70+
Returns a clone of this Line object and its descendants.
7471
</div>
7572

73+
7674
<h2>Source</h2>
7775

7876
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

docs/api/objects/LineSegments.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,13 @@ <h3>[method:Array raycast]( [page:Raycaster raycaster], [page:Array intersects]
4747
Get intersections between a casted ray and this Line. [page:Raycaster.intersectObject] will call this method.
4848
</div>
4949

50-
<h3>[method:Object3D clone]( [page:Object3D object] )</h3>
50+
<h3>[method:LineSegments clone]()</h3>
5151
<div>
52-
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned LineSegments Object.
53-
</div>
54-
<div>
55-
Clone a LineSegments Object.
52+
Returns a clone of this LineSegments object and its descendants.
5653
</div>
5754

5855

56+
5957
<h2>Source</h2>
6058

6159
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

docs/api/objects/Mesh.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,13 @@ <h3>[method:Array raycast]( [page:Raycaster raycaster], [page:Array intersects]
9191
Get intersections between a casted ray and this mesh. [page:Raycaster.intersectObject] will call this method.
9292
</div>
9393

94-
<h3>[method:Object3D clone]( [page:Object3D object] )</h3>
94+
<h3>[method:Mesh clone]()</h3>
9595
<div>
96-
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned Mesh Object.
97-
</div>
98-
<div>
99-
Clone a Mesh Object.
96+
Returns a clone of this Mesh object and its descendants.
10097
</div>
10198

10299

100+
103101
<h2>Source</h2>
104102

105103
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

docs/api/objects/Points.html

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,17 @@ <h3>[property:Material material]</h3>
3838

3939
<h2>Methods</h2>
4040

41-
<h3>[method:Points clone]()</h3>
42-
<div>
43-
This creates a clone of the particle system.
44-
</div>
45-
4641
<h3>[method:Array raycast]( [page:Raycaster raycaster], [page:Array intersects] )</h3>
4742
<div>
4843
Get intersections between a casted ray and this Points. [page:Raycaster.intersectObject] will call this method.
4944
</div>
5045

51-
<h3>[method:Object3D clone]( [page:Object3D object] )</h3>
52-
<div>
53-
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned Points Object.
54-
</div>
46+
<h3>[method:Points clone]()</h3>
5547
<div>
56-
Clone a Points Object.
48+
Returns a clone of this Points object and its descendants.
5749
</div>
5850

51+
5952
<h2>Source</h2>
6053

6154
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]

docs/api/objects/Skeleton.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ <h3>[method:null update]()</h3>
123123

124124
<h3>[method:Skeleton clone]()</h3>
125125
<div>
126-
Clone a Skeleton Object.
126+
Returns a clone of this Skeleton object.
127127
</div>
128+
128129

129130
<h2>Source</h2>
130131

docs/api/objects/SkinnedMesh.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,11 @@ <h3>[method:Bone addBone]( [page:Bone bone] )</h3>
130130
This method adds the bone to the skinned mesh when it is provided. It creates a new bone and adds that when no bone is given.
131131
</div>
132132

133-
<h3>[method:Object3D clone]( [page:Object3D object] )</h3>
133+
<h3>[method:SkinnedMesh clone]()</h3>
134134
<div>
135-
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned SkinnedMesh Object.
136-
</div>
137-
<div>
138-
Clone a SkinnedMesh Object.
135+
Returns a clone of this SkinnedMesh object and its descendants.
139136
</div>
137+
140138

141139
<h2>Source</h2>
142140

0 commit comments

Comments
 (0)