2
0
Эх сурвалжийг харах

Docs: Visible type information for BufferGeometry.html

Don McCurdy 7 жил өмнө
parent
commit
c134fbaad8

+ 22 - 22
docs/api/core/BufferGeometry.html

@@ -99,7 +99,7 @@
 
 		<h2>Properties</h2>
 
-		<h3>[property:Hashmap attributes]</h3>
+		<h3>[property:Object attributes]</h3>
 		<div>
 		This hashmap has as id the name of the attribute to be set and as value the [page:BufferAttribute buffer] to set it to.
 		Rather than accessing this property directly, use [page:.addAttribute] and [page:.getAttribute] to access attributes of this geometry.
@@ -194,21 +194,21 @@
 
 		<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
 
-		<h3>[property:null addAttribute]( [page:String name], [page:BufferAttribute attribute] )</h3>
+		<h3>[method:null addAttribute]( [param:String name], [param:BufferAttribute attribute] )</h3>
 		<div>
 		Adds an attribute to this geometry. Use this rather than the attributes property,
 		because an internal hashmap of [page:.attributes] is maintained to speed up iterating over
 		attributes.
 		</div>
 
-		<h3>[method:null addGroup]( [page:Integer start], [page:Integer count], [page:Integer materialIndex] )</h3>
+		<h3>[method:null addGroup]( [param:Integer start], [param:Integer count], [param:Integer materialIndex] )</h3>
 		<div>
 			Adds a group to this geometry; see the [page:BufferGeometry.groups groups]
 			property for details.
 		</div>
 
 
-		<h3>[method:null applyMatrix]( [page:Matrix4 matrix] )</h3>
+		<h3>[method:null applyMatrix]( [param:Matrix4 matrix] )</h3>
 		<div>Bakes matrix transform directly into vertex coordinates.</div>
 
 		<h3>[method:null center] ()</h3>
@@ -217,7 +217,7 @@
 		<h3>[method:BufferGeometry clone]()</h3>
 		<div>Creates a clone of this BufferGeometry.</div>
 
-		<h3>[method:BufferGeometry copy]( [page:BufferGeometry bufferGeometry] )</h3>
+		<h3>[method:BufferGeometry copy]( [param:BufferGeometry bufferGeometry] )</h3>
 		<div>Copies another BufferGeometry to this BufferGeometry.</div>
 
 		<h3>[method:null clearGroups]( )</h3>
@@ -225,7 +225,7 @@
 
 		<h3>[method:null computeBoundingBox]()</h3>
 		<div>
-		Computes bounding box of the geometry, updating [page:.boundingBox] attribute.<br />
+		Computes bounding box of the geometry, updating [param:.boundingBox] attribute.<br />
 		Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are *null*.
 		</div>
 
@@ -244,7 +244,7 @@
 		You need to call this when you want the bufferGeometry removed while the application is running.
 		</div>
 
-		<h3>[method:BufferGeometry fromDirectGeometry]( [page:Geometry] )</h3>
+		<h3>[method:BufferGeometry fromDirectGeometry]( [param:Geometry] )</h3>
 		<div>
 			Populates this BufferGeometry with data from a [page:DirectGeometry] object.<br /><br />
 
@@ -252,16 +252,16 @@
 			and BufferGeometry.
 		</div>
 
-		<h3>[method:BufferGeometry fromGeometry]( [page:Geometry] )</h3>
+		<h3>[method:BufferGeometry fromGeometry]( [param:Geometry] )</h3>
 		<div>Populates this BufferGeometry with data from a [page:Geometry] object.</div>
 
-		<h3>[method:BufferAttribute getAttribute]( [page:String name] )</h3>
+		<h3>[method:BufferAttribute getAttribute]( [param:String name] )</h3>
 		<div>Returns the [page:BufferAttribute attribute] with the specified name.</div>
 
 		<h3>[method:BufferAttribute getIndex] ()</h3>
 		<div>Return the [page:.index] buffer.</div>
 
-		<h3>[method:BufferGeometry lookAt] ( [page:Vector3 vector] )</h3>
+		<h3>[method:BufferGeometry lookAt] ( [param:Vector3 vector] )</h3>
 		<div>
 		vector - A world vector to look at.<br /><br />
 
@@ -269,7 +269,7 @@
 		Use [page:Object3D.lookAt] for typical real-time mesh usage.
 		</div>
 
-		<h3>[method:null merge]( [page:BufferGeometry bufferGeometry], [page:Integer offset] )</h3>
+		<h3>[method:null merge]( [param:BufferGeometry bufferGeometry], [param:Integer offset] )</h3>
 		<div>Merge in another BufferGeometry with an optional offset of where to start merging in.</div>
 
 		<h3>[method:null normalizeNormals]()</h3>
@@ -278,43 +278,43 @@
 		This will correct lighting on the geometry surfaces.
 		</div>
 
-		<h3>[method:BufferAttribute removeAttribute]( [page:String name] )</h3>
+		<h3>[method:BufferAttribute removeAttribute]( [param:String name] )</h3>
 		<div>Removes the [page:BufferAttribute attribute] with the specified name.</div>
 
-		<h3>[method:BufferGeometry rotateX] ( [page:Float radians] )</h3>
+		<h3>[method:BufferGeometry rotateX] ( [param:Float radians] )</h3>
 		<div>
 		Rotate the geometry about the X axis. This is typically done as a one time operation, and not during a loop.
     Use [page:Object3D.rotation] for typical real-time mesh rotation.
 		</div>
 
-		<h3>[method:BufferGeometry rotateY] ( [page:Float radians] )</h3>
+		<h3>[method:BufferGeometry rotateY] ( [param:Float radians] )</h3>
 		<div>
 		Rotate the geometry about the Y axis. This is typically done as a one time operation, and not during a loop.
     Use [page:Object3D.rotation] for typical real-time mesh rotation.
 		</div>
 
-		<h3>[method:BufferGeometry rotateZ] ( [page:Float radians] )</h3>
+		<h3>[method:BufferGeometry rotateZ] ( [param:Float radians] )</h3>
 		<div>
 		Rotate the geometry about the Z axis. This is typically done as a one time operation, and not during a loop.
     Use [page:Object3D.rotation] for typical real-time mesh rotation.
 		</div>
 
-		<h3>[method:BufferGeometry scale] ( [page:Float x], [page:Float y], [page:Float z] )</h3>
+		<h3>[method:BufferGeometry scale] ( [param:Float x], [param:Float y], [param:Float z] )</h3>
 		<div>
 		Scale the geometry data. This is typically done as a one time operation, and not during a loop.
 		Use [page:Object3D.scale] for typical real-time mesh scaling.
 		</div>
 
-		<h3>[method:null setIndex] ( [page:BufferAttribute index] )</h3>
+		<h3>[method:null setIndex] ( [param:BufferAttribute index] )</h3>
 		<div>Set the [page:.index] buffer.</div>
 
-		<h3>[method:null setDrawRange] ( [page:Integer start], [page:Integer count] )</h3>
+		<h3>[method:null setDrawRange] ( [param:Integer start], [param:Integer count] )</h3>
 		<div>Set the [page:.drawRange] buffer. See that property for details.</div>
 
-		<h3>[method:BufferGeometry setFromObject] ( [page:Object3D object] )</h3>
+		<h3>[method:BufferGeometry setFromObject] ( [param:Object3D object] )</h3>
 		<div>Sets the attributes for this BufferGeometry from an [page:Object3D].</div>
 
-		<h3>[method:BufferGeometry setFromPoints] ( [page:Array points] )</h3>
+		<h3>[method:BufferGeometry setFromPoints] ( [param:Array points] )</h3>
 		<div>Sets the attributes for this BufferGeometry from an array of points.</div>
 
 		<h3>[method:Object toJSON]()</h3>
@@ -323,13 +323,13 @@
 		<h3>[method:BufferGeometry toNonIndexed]()</h3>
 		<div>Return a non-index version of an indexed BufferGeometry.</div>
 
-		<h3>[method:BufferGeometry translate] ( [page:Float x], [page:Float y], [page:Float z] )</h3>
+		<h3>[method:BufferGeometry translate] ( [param:Float x], [param:Float y], [param:Float z] )</h3>
 		<div>
 		Translate the geometry. This is typically done as a one time operation, and not during a loop.
     Use [page:Object3D.position] for typical real-time mesh translation.
 		</div>
 
-		<h3>[method:BufferGeometry updateFromObject] ( [page:Object3D object] )</h3>
+		<h3>[method:BufferGeometry updateFromObject] ( [param:Object3D object] )</h3>
 		<div>Updates the attributes for this BufferGeometry from an [page:Object3D].</div>
 
 

+ 9 - 0
docs/page.css

@@ -115,3 +115,12 @@ a.permalink {
 	float: right;
 	margin-left: 5px;
 }
+
+a.param,
+span.param {
+	color: #999;
+}
+
+a.param:hover {
+	color: #777;
+}

+ 4 - 2
docs/page.js

@@ -59,8 +59,9 @@ function onDocumentLoad( event ) {
 	text = text.replace( /\[page:([\w\.]+) ([\w\.\s]+)\]/gi, "<a onclick=\"window.parent.setUrlFragment('$1')\" title=\"$1\">$2</a>" ); // [page:name title]
 	// text = text.replace( /\[member:.([\w]+) ([\w\.\s]+)\]/gi, "<a onclick=\"window.parent.setUrlFragment('" + name + ".$1')\" title=\"$1\">$2</a>" );
 
-	text = text.replace( /\[(?:member|property|method):([\w]+)\]/gi, "[member:$1 $1]" ); // [member:name] to [member:name title]
-	text = text.replace( /\[(?:member|property|method):([\w]+) ([\w\.\s]+)\]/gi, "<a onclick=\"window.parent.setUrlFragment('" + name + ".$2')\" target=\"_parent\" title=\"" + name + ".$2\" class=\"permalink\">#</a> .<a onclick=\"window.parent.setUrlFragment('$1')\" title=\"$1\" id=\"$2\">$2</a> " );
+	text = text.replace( /\[(member|property|method|param):([\w]+)\]/gi, "[$1:$2 $2]" ); // [member:name] to [member:name title]
+	text = text.replace( /\[(?:member|property|method):([\w]+) ([\w\.\s]+)\]\s*(\(.*\))?/gi, "<a onclick=\"window.parent.setUrlFragment('" + name + ".$2')\" target=\"_parent\" title=\"" + name + ".$2\" class=\"permalink\">#</a> .<a onclick=\"window.parent.setUrlFragment('" + name + ".$2')\" id=\"$2\">$2</a> $3 : <a class=\"param\" onclick=\"window.parent.setUrlFragment('$1')\">$1</a>" );
+	text = text.replace( /\[param:([\w\.]+) ([\w\.\s]+)\]/gi, "$2 : <a class=\"param\" onclick=\"window.parent.setUrlFragment('$1')\">$1</a>" ); // [param:name title]
 
 	text = text.replace( /\[link:([\w|\:|\/|\.|\-|\_]+)\]/gi, "[link:$1 $1]" ); // [link:url] to [link:url title]
 	text = text.replace( /\[link:([\w|\:|\/|\.|\-|\_|\(|\)|\#|\=]+) ([\w|\:|\/|\.|\-|\_|\s]+)\]/gi, "<a href=\"$1\"  target=\"_blank\">$2</a>" ); // [link:url title]
@@ -69,6 +70,7 @@ function onDocumentLoad( event ) {
 	text = text.replace( /\[example:([\w\_]+)\]/gi, "[example:$1 $1]" ); // [example:name] to [example:name title]
 	text = text.replace( /\[example:([\w\_]+) ([\w\:\/\.\-\_ \s]+)\]/gi, "<a href=\"../examples/#$1\"  target=\"_blank\">$2</a>" ); // [example:name title]
 
+	text = text.replace( /<a class="param" onclick="window.parent.setUrlFragment\('\w+'\)">(null|Boolean|Object|Array|Number|String|Integer|Float)<\/a>/gi, '<span class="param">$1</span>' ); // remove links to primitive types
 
 	document.body.innerHTML = text;