提交 d1c1cf7d 编写于 作者: M moraxy

Docs: Fixed some [param:] tags and added missing ones. Updated page.js regex.

The modified regex now supports multiline parameter lists, which some methods required for formatting reasons. Almost no changes to the actual documentation blurbs, except for one in math/Euler.
上级 d2b5ec8e
......@@ -18,7 +18,7 @@
<h2>Constructor</h2>
<h3>[name]( binding, typeName, valueSize )</h3>
<h3>[name]( [param:PropertyBinding binding], [param:String typeName], [param:Number valueSize] )</h3>
<p>
-- binding <br />
-- typeName <br />
......@@ -29,12 +29,12 @@
<h2>Properties</h2>
<h3>[property:Number binding]</h3>
<h3>[property:PropertyBinding binding]</h3>
<p>
</p>
<h3>[property:Number buffer]</h3>
<h3>[property:TypedArray buffer]</h3>
<p>
Buffer with size [page:PropertyMixer valueSize] * 4. <br /><br />
This has the layout: [ incoming | accu0 | accu1 | orig ]<br /><br />
......@@ -67,14 +67,14 @@
<h2>Methods</h2>
<h3>[method:null accumulate]( accuIndex, weight )</h3>
<h3>[method:null accumulate]( [param:Number accuIndex], [param:Number weight] )</h3>
<p>
Accumulate data in [page:PropertyMixer.buffer buffer][accuIndex] 'incoming' region into 'accu[i]'.<br />
If weight is *0* this does nothing.
</p>
<h3>[method:null apply]( accuIndex )</h3>
<h3>[method:null apply]( [param:Number accuIndex] )</h3>
<p>
Apply the state of [page:PropertyMixer.buffer buffer] 'accu[i]' to the binding when accus differ.
</p>
......
......@@ -64,7 +64,7 @@
Return a new camera with the same properties as this one.
</p>
<h3>[method:Camera copy]( [param:Camera source] )</h3>
<h3>[method:Camera copy]( [param:Camera source], [param:Boolean recursive] )</h3>
<p>
Copy the properties from the source camera into this one.
</p>
......
......@@ -55,7 +55,7 @@
<h2>Methods</h2>
<h3>[method:null update]( camera )</h3>
<h3>[method:null update]( [param:PerspectiveCamera camera] )</h3>
<p>
Update the stereo cameras based on the camera passed in.
</p>
......
......@@ -131,28 +131,28 @@
<h3>[method:null copyAt] ( [param:Integer index1], [param:BufferAttribute bufferAttribute], [param:Integer index2] ) </h3>
<p>Copy a vector from bufferAttribute[index2] to [page:BufferAttribute.array array][index1].</p>
<h3>[method:BufferAttribute copyColorsArray]( colors ) </h3>
<h3>[method:BufferAttribute copyColorsArray]( [param:Array colors] ) </h3>
<p>Copy an array representing RGB color values into [page:BufferAttribute.array array].</p>
<h3>[method:BufferAttribute copyVector2sArray]( vectors ) </h3>
<h3>[method:BufferAttribute copyVector2sArray]( [param:Array vectors] ) </h3>
<p>Copy an array representing [page:Vector2]s into [page:BufferAttribute.array array].</p>
<h3>[method:BufferAttribute copyVector3sArray]( vectors ) </h3>
<h3>[method:BufferAttribute copyVector3sArray]( [param:Array vectors] ) </h3>
<p>Copy an array representing [page:Vector3]s into [page:BufferAttribute.array array].</p>
<h3>[method:BufferAttribute copyVector4sArray]( vectors ) </h3>
<h3>[method:BufferAttribute copyVector4sArray]( [param:Array vectors] ) </h3>
<p>Copy an array representing [page:Vector4]s into [page:BufferAttribute.array array].</p>
<h3>[method:Number getX]( index ) </h3>
<h3>[method:Number getX]( [param:Integer index] ) </h3>
<p>Returns the x component of the vector at the given index.</p>
<h3>[method:Number getY]( index ) </h3>
<h3>[method:Number getY]( [param:Integer index] ) </h3>
<p>Returns the y component of the vector at the given index.</p>
<h3>[method:Number getZ]( index ) </h3>
<h3>[method:Number getZ]( [param:Integer index] ) </h3>
<p>Returns the z component of the vector at the given index.</p>
<h3>[method:Number getW]( index ) </h3>
<h3>[method:Number getW]( [param:Integer index] ) </h3>
<p>Returns the w component of the vector at the given index.</p>
<h3>[method:null onUpload]( [param:Function callback] ) </h3>
......@@ -185,25 +185,25 @@
<h3>[method:BufferAttribute setDynamic] ( [param:Boolean value] ) </h3>
<p>Set [page:BufferAttribute.dynamic dynamic] to value.</p>
<h3>[method:BufferAttribute setX]( index, x ) </h3>
<h3>[method:BufferAttribute setX]( [param:Integer index], [param:Float x] ) </h3>
<p>Sets the x component of the vector at the given index.</p>
<h3>[method:BufferAttribute setY]( index, y ) </h3>
<h3>[method:BufferAttribute setY]( [param:Integer index], [param:Float y] ) </h3>
<p>Sets the y component of the vector at the given index.</p>
<h3>[method:BufferAttribute setZ]( index, z ) </h3>
<h3>[method:BufferAttribute setZ]( [param:Integer index], [param:Float z] ) </h3>
<p>Sets the z component of the vector at the given index.</p>
<h3>[method:BufferAttribute setW]( index, w ) </h3>
<h3>[method:BufferAttribute setW]( [param:Integer index], [param:Float w] ) </h3>
<p>Sets the w component of the vector at the given index.</p>
<h3>[method:BufferAttribute setXY]( index, x, y ) </h3>
<h3>[method:BufferAttribute setXY]( [param:Integer index], [param:Float x], [param:Float y] ) </h3>
<p>Sets the x and y components of the vector at the given index.</p>
<h3>[method:BufferAttribute setXYZ]( index, x, y, z ) </h3>
<h3>[method:BufferAttribute setXYZ]( [param:Integer index], [param:Float x], [param:Float y], [param:Float z] ) </h3>
<p>Sets the x, y and z components of the vector at the given index.</p>
<h3>[method:BufferAttribute setXYZW]( index, x, y, z, w ) </h3>
<h3>[method:BufferAttribute setXYZW]( [param:Integer index], [param:Float x], [param:Float y], [param:Float z], [param:Float w] ) </h3>
<p>Sets the x, y, z and w components of the vector at the given index.</p>
......
......@@ -91,13 +91,13 @@
<h2>Methods</h2>
<h3>[property:null computeGroups]( [page:Geometry geometry] )</h3>
<h3>[property:null computeGroups]( [param:Geometry geometry] )</h3>
<p>
Compute the parts of the geometry that have different materialIndex.
See [page:BufferGeometry.groups].
</p>
<h3>[property:null fromGeometry]( [page:Geometry geometry] )</h3>
<h3>[property:null fromGeometry]( [param:Geometry geometry] )</h3>
<p>Pass in a [page:Geometry] instance for conversion.</p>
......
......@@ -91,15 +91,15 @@
Set [page:InterleavedBuffer.dynamic dynamic] to value.
</p>
<h3>[method:InterleavedBuffer copy]( source ) </h3>
<h3>[method:InterleavedBuffer copy]( [param:InterleavedBuffer source] ) </h3>
<p>
Copies another [name] to this [name].
</p>
<h3>[method:InterleavedBuffer copyAt]( index1, attribute, index2 ) </h3>
<h3>[method:InterleavedBuffer copyAt]( [param:Integer index1], [param:InterleavedBuffer attribute], [param:Integer index2] ) </h3>
<p>Copies data from attribute[index2] to [page:InterleavedBuffer.array array][index1].</p>
<h3>[method:InterleavedBuffer set]( value, offset ) </h3>
<h3>[method:InterleavedBuffer set]( [param:TypedArray value], [param:Integer offset] ) </h3>
<p>
value - The source (typed) array.<br/>
offset - The offset into the target array at which to begin writing values from the source array. Default is *0*.<br/><br />
......
......@@ -62,37 +62,37 @@
<h2>Methods</h2>
<h3>[method:Number getX]( index ) </h3>
<h3>[method:Number getX]( [param:Integer index] ) </h3>
<p>Returns the x component of the item at the given index.</p>
<h3>[method:Number getY]( index ) </h3>
<h3>[method:Number getY]( [param:Integer index] ) </h3>
<p>Returns the y component of the item at the given index.</p>
<h3>[method:Number getZ]( index ) </h3>
<h3>[method:Number getZ]( [param:Integer index] ) </h3>
<p>Returns the z component of the item at the given index.</p>
<h3>[method:Number getW]( index ) </h3>
<h3>[method:Number getW]( [param:Integer index] ) </h3>
<p>Returns the w component of the item at the given index.</p>
<h3>[method:null setX]( index, x ) </h3>
<h3>[method:null setX]( [param:Integer index], [param:Float x] ) </h3>
<p>Sets the x component of the item at the given index.</p>
<h3>[method:null setY]( index, y ) </h3>
<h3>[method:null setY]( [param:Integer index], [param:Float y] ) </h3>
<p>Sets the y component of the item at the given index.</p>
<h3>[method:null setZ]( index, z ) </h3>
<h3>[method:null setZ]( [param:Integer index], [param:Float z] ) </h3>
<p>Sets the z component of the item at the given index.</p>
<h3>[method:null setW]( index, w ) </h3>
<h3>[method:null setW]( [param:Integer index], [param:Float w] ) </h3>
<p>Sets the w component of the item at the given index.</p>
<h3>[method:null setXY]( index, x, y ) </h3>
<h3>[method:null setXY]( [param:Integer index], [param:Float x], [param:Float y] ) </h3>
<p>Sets the x and y components of the item at the given index.</p>
<h3>[method:null setXYZ]( index, x, y, z ) </h3>
<h3>[method:null setXYZ]( [param:Integer index], [param:Float x], [param:Float y], [param:Float z] ) </h3>
<p>Sets the x, y and z components of the item at the given index.</p>
<h3>[method:null setXYZW]( index, x, y, z, w ) </h3>
<h3>[method:null setXYZW]( [param:Integer index], [param:Float x], [param:Float y], [param:Float z], [param:Float w] ) </h3>
<p>Sets the x, y, z and w components of the item at the given index.</p>
......
......@@ -144,7 +144,7 @@
Updates the ray with a new origin and direction.
</p>
<h3>[method:Array intersectObject]( [page:Object3D object], [param:Boolean recursive], [param:Array optionalTarget] )</h3>
<h3>[method:Array intersectObject]( [param:Object3D object], [param:Boolean recursive], [param:Array optionalTarget] )</h3>
<p>
[page:Object3D object] — The object to check for intersection with the ray.<br />
[page:Boolean recursive] — If true, it also checks all descendants. Otherwise it only checks intersecton with the object. Default is false.<br />
......
......@@ -50,7 +50,7 @@
<p>See the base [page:LineSegments] class for common methods.</p>
<h3>[method:void updateMatrixWorld]( force )</h3>
<h3>[method:void updateMatrixWorld]( [param:Boolean force] )</h3>
<p>
This overrides the method in the base [page:Object3D] class so that it
also updates the wireframe box to the extent of the [page:Box3Helper.box .box]
......
......@@ -51,7 +51,7 @@
<h2>Methods</h2>
<p>See the base [page:LineSegments] class for common methods.</p>
<h3>[method:void updateMatrixWorld]( force )</h3>
<h3>[method:void updateMatrixWorld]( [param:Boolean force] )</h3>
<p>
This overrides the method in the base [page:Object3D] class so that it also
updates the helper object according to the [page:PlaneHelper.plane .plane] and
......
......@@ -55,7 +55,7 @@ var starField = new THREE.Points( starsGeometry, starsMaterial );
scene.add( starField );
</code>
<h3>[name]( [page:Object parameters] )</h3>
<h3>[name]( [param:Object parameters] )</h3>
<p>
[page:Object parameters] - (optional) an object with one or more properties defining the material's appearance.
Any property of the material (including any property inherited from [page:Material]) can be passed in here.<br /><br />
......
......@@ -37,7 +37,7 @@ scene.add( sprite );
</code>
<h3>[name]( [page:Object parameters] )</h3>
<h3>[name]( [param:Object parameters] )</h3>
<p>
[page:Object parameters] - (optional) an object with one or more properties defining the material's appearance.
Any property of the material (including any property inherited from [page:Material]) can be passed in here.<br /><br />
......
......@@ -50,7 +50,7 @@
and [page:.y y] properties to this cylindrical.
</p>
<h3>[method:Cylindrical set]( [param:Float radius], [param:Float phi], [param:Float theta] )</h3>
<h3>[method:Cylindrical set]( [param:Float radius], [param:Float theta], [param:Float y] )</h3>
<p>Sets values of this cylindrical's [page:.radius radius], [page:.theta theta]
and [page:.y y] properties.</p>
......
......@@ -176,8 +176,13 @@
Returns an array of the form [[page:.x x], [page:.y y], [page:.z z], [page:.order order ]].
</p>
<h3>[method:Vector3 toVector3]()</h3>
<p>Returns the Euler's [page:.x x], [page:.y y] and [page:.z z] properties as a [page:Vector3].</p>
<h3>[method:Vector3 toVector3]( [param:Vector3 optionalResult] )</h3>
<p>
[page:Vector3 optionalResult] — (optional) If specified, the result will be copied into this Vector,
otherwise a new one will be created. <br /><br />
Returns the Euler's [page:.x x], [page:.y y] and [page:.z z] properties as a [page:Vector3].
</p>
<h2>Source</h2>
......
......@@ -55,11 +55,11 @@
</p>
<h3>[method:Float mapLinear](
[page:Float x],
[page:Float a1],
[page:Float a2],
[page:Float b1],
[page:Float b2] )</h3>
[param:Float x],
[param:Float a1],
[param:Float a2],
[param:Float b1],
[param:Float b2] )</h3>
<p>
[page:Float x] — Value to be mapped.<br />
[page:Float a1] — Minimum value for range A.<br />
......
......@@ -146,9 +146,9 @@ m.elements = [ 11, 21, 31,
<h3>
[method:this set](
[page:Float n11], [page:Float n12], [page:Float n13],
[page:Float n21], [page:Float n22], [page:Float n23],
[page:Float n31], [page:Float n32], [page:Float n33] )
[param:Float n11], [param:Float n12], [param:Float n13],
[param:Float n21], [param:Float n22], [param:Float n23],
[param:Float n31], [param:Float n32], [param:Float n33] )
</h3>
<p>
[page:Float n11] - value to put in row 1, col 1.<br />
......@@ -171,8 +171,8 @@ m.elements = [ 11, 21, 31,
<h3>
[method:this setUvTransform](
[page:Float tx], [page:Float ty], [page:Float sx], [page:Float sy],
[page:Float rotation], [page:Float cx], [page:Float cy] )
[param:Float tx], [param:Float ty], [param:Float sx], [param:Float sy],
[param:Float rotation], [param:Float cx], [param:Float cy] )
</h3>
<p>
[page:Float tx] - offset x<br />
......
......@@ -369,10 +369,10 @@ x, y, 1, 0,
<p>Multiplies the columns of this matrix by vector [page:Vector3 v].</p>
<h3>[method:this set](
[page:Float n11], [page:Float n12], [page:Float n13], [page:Float n14],
[page:Float n21], [page:Float n22], [page:Float n23], [page:Float n24],
[page:Float n31], [page:Float n32], [page:Float n33], [page:Float n34],
[page:Float n41], [page:Float n42], [page:Float n43], [page:Float n44] )</h3>
[param:Float n11], [param:Float n12], [param:Float n13], [param:Float n14],
[param:Float n21], [param:Float n22], [param:Float n23], [param:Float n24],
[param:Float n31], [param:Float n32], [param:Float n33], [param:Float n34],
[param:Float n41], [param:Float n42], [param:Float n43], [param:Float n44] )</h3>
<p>
Set the [page:.elements elements] of this matrix to the supplied row-major values [page:Float n11],
[page:Float n12], ... [page:Float n44].
......
......@@ -263,13 +263,13 @@ q.slerp( qb, t )
<h3>
[method:null slerpFlat](
[page:Array dst],
[page:Integer dstOffset],
[page:Array src0],
[page:Integer srcOffset0],
[page:Array src1],
[page:Integer srcOffset1],
[page:Float t]
[param:Array dst],
[param:Integer dstOffset],
[param:Array src0],
[param:Integer srcOffset0],
[param:Array src1],
[param:Integer srcOffset1],
[param:Float t]
)
</h3>
<p>
......
......@@ -86,7 +86,7 @@
<h2>Methods</h2>
<p>See the base [page:Object3D] class for common methods.</p>
<h3>[method:null setDrawMode]()</h3>
<h3>[method:null setDrawMode]( [param:Integer value] )</h3>
<p>Set the value of [page:.drawMode drawMode].</p>
<h3>[method:Mesh clone]()</h3>
......
......@@ -234,12 +234,12 @@
[page:Texture.rotation .rotation], and [page:Texture.center .center].
</p>
<h3>[method:Texture clone]( [param:Texture texture] )</h3>
<h3>[method:Texture clone]()</h3>
<p>
Make copy of the texture. Note this is not a "deep copy", the image is shared.
</p>
<h3>[method:Texture toJSON]( meta )</h3>
<h3>[method:Texture toJSON]( [param:Object meta] )</h3>
<p>
meta -- optional object containing metadata.<br />
Convert the material to three.js JSON format.
......@@ -250,7 +250,7 @@
Call [page:EventDispatcher EventDispatcher].dispatchEvent with a 'dispose' event type.
</p>
<h3>[method:null transformUv]( uv )</h3>
<h3>[method:null transformUv]( [param:Vector2 uv] )</h3>
<p>
Transform the uv based on the value of this texture's [page:Texture.offset .offset], [page:Texture.repeat .repeat],
[page:Texture.wrapS .wrapS], [page:Texture.wrapT .wrapT] and [page:Texture.flipY .flipY] properties.
......
......@@ -60,7 +60,7 @@ function onDocumentLoad( event ) {
// 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|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( /\[(?: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]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册