Skip to content

Commit

Permalink
docs lint-2 (#25814)
Browse files Browse the repository at this point in the history
* lint `/extras/core/Curve.html`

* lint `/extras/core/CurvePath.html`

* lint `/extras/core/Interpolations.html`

* lint `/extras/core/Path.html`

* lint `docs/api/en/extras/core/Shape.html`

* lint `docs/api/en/extras/core/ShapePath.html`

* lint `docs/api/en/extras/curves/ArcCurve.html`

* lint `docs/api/en/extras/curves/CatmullRomCurve3.html`

* lint `docs/api/en/extras/curves/CubicBezierCurve.html`

* lint `docs/api/en/extras/curves/CubicBezierCurve3.html`

* lint `docs/api/en/extras/curves/EllipseCurve.html`

* lint `docs/api/en/extras/curves/LineCurve.html`

* lint `docs/api/en/extras/curves/LineCurve3.html`

* lint `docs/api/en/extras/curves/QuadraticBezierCurve.html`

* lint `docs/api/en/extras/curves/QuadraticBezierCurve3.html`

* lint `docs/api/en/extras/curves/SplineCurve.html`

* lint `docs/api/en/extras/DataUtils.html`

* lint `docs/api/en/extras/Earcut.html`

* lint `docs/api/en/extras/ImageUtils.html`

* lint `docs/api/en/extras/PMREMGenerator.html`

* lint `docs/api/en/extras/ShapeUtils.html`
  • Loading branch information
vinaykulk621 committed Apr 12, 2023
1 parent a15bce8 commit eecc967
Show file tree
Hide file tree
Showing 21 changed files with 408 additions and 315 deletions.
14 changes: 7 additions & 7 deletions docs/api/en/extras/DataUtils.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
<body>
<h1>[name]</h1>

<p class="desc">
A class containing utility functions for data.
</p>
<p class="desc">A class containing utility functions for data.</p>

<h2>Methods</h2>

<h3>[method:Number toHalfFloat]( [param:Number val] )</h3>
<p>
val -- A single precision floating point value.<br /><br />
val -- A single precision floating point value.<br /><br />

Returns a half precision floating point value from the given single precision floating point value.
Returns a half precision floating point value from the given single
precision floating point value.
</p>

<h3>[method:Number fromHalfFloat]( [param:Number val] )</h3>
<p>
val -- A half precision floating point value.<br /><br />
val -- A half precision floating point value.<br /><br />

Returns a single precision floating point value from the given half precision floating point value.
Returns a single precision floating point value from the given half
precision floating point value.
</p>

<h2>Source</h2>
Expand Down
13 changes: 8 additions & 5 deletions docs/api/en/extras/Earcut.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,21 @@
<h1>[name]</h1>

<p class="desc">
An implementation of the earcut polygon triangulation algorithm. The code is a port of [link:https://github.com/mapbox/earcut mapbox/earcut].
An implementation of the earcut polygon triangulation algorithm. The code
is a port of [link:https://github.com/mapbox/earcut mapbox/earcut].
</p>

<h2>Methods</h2>

<h3>[method:Array triangulate]( data, holeIndices, dim )</h3>
<p>
data -- A flat array of vertex coordinates.<br />
holeIndices -- An array of hole indices if any.<br />
dim -- The number of coordinates per vertex in the input array.<br /><br />
data -- A flat array of vertex coordinates.<br />
holeIndices -- An array of hole indices if any.<br />
dim -- The number of coordinates per vertex in the input array.<br /><br />

Triangulates the given shape definition by returning an array of triangles. A triangle is defined by three consecutive integers representing vertex indices.
Triangulates the given shape definition by returning an array of
triangles. A triangle is defined by three consecutive integers
representing vertex indices.
</p>

<h2>Source</h2>
Expand Down
22 changes: 13 additions & 9 deletions docs/api/en/extras/ImageUtils.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,28 @@
<body>
<h1>[name]</h1>

<p class="desc">
A class containing utility functions for images.
</p>
<p class="desc">A class containing utility functions for images.</p>

<h2>Methods</h2>

<h3>[method:String getDataURL]( [param:HTMLCanvasElement image] | [param:HTMLImageElement image] | [param:ImageBitmap image] )</h3>
<h3>
[method:String getDataURL]( [param:HTMLCanvasElement image] |
[param:HTMLImageElement image] | [param:ImageBitmap image] )
</h3>
<p>
image -- The image object.<br /><br />
image -- The image object.<br /><br />

Returns a data URI containing a representation of the given image.
Returns a data URI containing a representation of the given image.
</p>

<h3>[method:Object sRGBToLinear]( [param:HTMLCanvasElement image] | [param:HTMLImageElement image] | [param:ImageBitmap image] )</h3>
<h3>
[method:Object sRGBToLinear]( [param:HTMLCanvasElement image] |
[param:HTMLImageElement image] | [param:ImageBitmap image] )
</h3>
<p>
image -- The image object.<br /><br />
image -- The image object.<br /><br />

Converts the given sRGB image data to linear color space.
Converts the given sRGB image data to linear color space.
</p>

<h2>Source</h2>
Expand Down
123 changes: 73 additions & 50 deletions docs/api/en/extras/PMREMGenerator.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,72 +10,91 @@
<h1>[name]</h1>

<p class="desc">
This class generates a Prefiltered, Mipmapped Radiance Environment Map (PMREM) from a cubeMap environment texture.
This allows different levels of blur to be quickly accessed based on material roughness.
Unlike a traditional mipmap chain, it only goes down to the LOD_MIN level (above), and then creates extra even more
filtered 'mips' at the same LOD_MIN resolution, associated with higher roughness levels. In this way we maintain
resolution to smoothly interpolate diffuse lighting while limiting sampling computation.<br/><br/>

Note: The minimum [page:MeshStandardMaterial]'s roughness depends on the size of the provided texture.
If your render has small dimensions or the shiny parts have a lot of curvature, you may still be able to get away with
a smaller texture size.

<table>
<tr>
<th>texture size</td><th>minimum roughness</td>
</tr>
<tr>
<td>16</td><td>0.21</td>
</tr>
<tr>
<td>32</td><td>0.15</td>
</tr>
<tr>
<td>64</td><td>0.11</td>
</tr>
<tr>
<td>128</td><td>0.076</td>
</tr>
<tr>
<td>256</td><td>0.054</td>
</tr>
<tr>
<td>512</td><td>0.038</td>
</tr>
<tr>
<td>1024</td><td>0.027</td>
</tr>
</table>
This class generates a Prefiltered, Mipmapped Radiance Environment Map
(PMREM) from a cubeMap environment texture. This allows different levels
of blur to be quickly accessed based on material roughness. Unlike a
traditional mipmap chain, it only goes down to the LOD_MIN level (above),
and then creates extra even more filtered 'mips' at the same LOD_MIN
resolution, associated with higher roughness levels. In this way we
maintain resolution to smoothly interpolate diffuse lighting while
limiting sampling computation.<br /><br />

Note: The minimum [page:MeshStandardMaterial]'s roughness depends on the
size of the provided texture. If your render has small dimensions or the
shiny parts have a lot of curvature, you may still be able to get away
with a smaller texture size.
</p>

<table>
<tr>
<th>texture size</th>
<td>minimum roughness</td>
</tr>
<tr>
<td>16</td>
<td>0.21</td>
</tr>
<tr>
<td>32</td>
<td>0.15</td>
</tr>
<tr>
<td>64</td>
<td>0.11</td>
</tr>
<tr>
<td>128</td>
<td>0.076</td>
</tr>
<tr>
<td>256</td>
<td>0.054</td>
</tr>
<tr>
<td>512</td>
<td>0.038</td>
</tr>
<tr>
<td>1024</td>
<td>0.027</td>
</tr>
</table>

<h2>Constructor</h2>

<h3>[name]( [param:WebGLRenderer renderer] )</h3>
<p>
This constructor creates a new [name].
</p>
<p>This constructor creates a new [name].</p>

<h2>Methods</h2>

<h3>[method:WebGLRenderTarget fromScene]( [param:Scene scene], [param:Number sigma], [param:Number near], [param:Number far] )</h3>
<h3>
[method:WebGLRenderTarget fromScene]( [param:Scene scene], [param:Number sigma], [param:Number near], [param:Number far] )
</h3>
<p>
[page:Scene scene] - The given scene.<br>
[page:Number sigma] - (optional) Specifies a blur radius in radians to be applied to the scene before PMREM generation. Default is `0`.<br>
[page:Number near] - (optional) The near plane value. Default is `0.1`.<br>
[page:Scene scene] - The given scene.<br />
[page:Number sigma] - (optional) Specifies a blur radius in radians to be
applied to the scene before PMREM generation. Default is `0`.<br />
[page:Number near] - (optional) The near plane value. Default is `0.1`.<br />
[page:Number far] - (optional) The far plane value. Default is `100`.<br /><br />

Generates a PMREM from a supplied Scene, which can be faster than using an image if networking bandwidth is low.
Optional near and far planes ensure the scene is rendered in its entirety (the cubeCamera is placed at the origin).
Generates a PMREM from a supplied Scene, which can be faster than using an
image if networking bandwidth is low. Optional near and far planes ensure
the scene is rendered in its entirety (the cubeCamera is placed at the
origin).
</p>

<h3>[method:WebGLRenderTarget fromEquirectangular]( [param:Texture equirectangular] )</h3>
<h3>
[method:WebGLRenderTarget fromEquirectangular]( [param:Texture equirectangular] )
</h3>
<p>
[page:Texture equirectangular] - The equirectangular texture.<br /><br />

Generates a PMREM from an equirectangular texture.
</p>

<h3>[method:WebGLRenderTarget fromCubemap]( [param:CubeTexture cubemap] )</h3>
<h3>
[method:WebGLRenderTarget fromCubemap]( [param:CubeTexture cubemap] )
</h3>
<p>
[page:CubeTexture cubemap] - The cubemap texture.<br /><br />

Expand All @@ -84,17 +103,21 @@ <h3>[method:WebGLRenderTarget fromCubemap]( [param:CubeTexture cubemap] )</h3>

<h3>[method:undefined compileCubemapShader]()</h3>
<p>
Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during your texture's network fetch for increased concurrency.
Pre-compiles the cubemap shader. You can get faster start-up by invoking
this method during your texture's network fetch for increased concurrency.
</p>

<h3>[method:undefined compileEquirectangularShader]()</h3>
<p>
Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during your texture's network fetch for increased concurrency.
Pre-compiles the equirectangular shader. You can get faster start-up by
invoking this method during your texture's network fetch for increased
concurrency.
</p>

<h3>[method:undefined dispose]()</h3>
<p>
Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.
Frees the GPU-related resources allocated by this instance. Call this
method whenever this instance is no longer used in your app.
</p>

<h2>Source</h2>
Expand Down
29 changes: 15 additions & 14 deletions docs/api/en/extras/ShapeUtils.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,40 @@
<h1>[name]</h1>

<p class="desc">
A class containing utility functions for shapes.<br /><br />
A class containing utility functions for shapes.<br /><br />

Note that these are all linear functions so it is necessary to calculate separately for
x, y (and z, w if present) components of a vector.
Note that these are all linear functions so it is necessary to calculate
separately for x, y (and z, w if present) components of a vector.
</p>


<h2>Methods</h2>

<h3>[method:Number area]( contour )</h3>
<p>
contour -- 2D polygon. An array of THREE.Vector2()<br /><br />
contour -- 2D polygon. An array of THREE.Vector2()<br /><br />

Calculate area of a ( 2D ) contour polygon.
Calculate area of a ( 2D ) contour polygon.
</p>

<h3>[method:Boolean isClockWise]( pts )</h3>
<p>
pts -- points defining a 2D polygon<br /><br />
pts -- points defining a 2D polygon<br /><br />

Note that this is a linear function so it is necessary to calculate separately for
x, y components of a polygon.<br /><br />
Note that this is a linear function so it is necessary to calculate
separately for x, y components of a polygon.<br /><br />

Used internally by [page:Path Path],
[page:ExtrudeGeometry ExtrudeGeometry] and [page:ShapeGeometry ShapeGeometry].
Used internally by [page:Path Path], [page:ExtrudeGeometry ExtrudeGeometry] and [page:ShapeGeometry ShapeGeometry].
</p>

<h3>[method:Array triangulateShape]( contour, holes )</h3>
<p>
contour -- 2D polygon. An array of [page:Vector2].<br />
holes -- An array that holds arrays of [page:Vector2]s. Each array represents a single hole definition.<br /><br />
contour -- 2D polygon. An array of [page:Vector2].<br />
holes -- An array that holds arrays of [page:Vector2]s. Each array
represents a single hole definition.<br /><br />

Used internally by [page:ExtrudeGeometry ExtrudeGeometry] and [page:ShapeGeometry ShapeGeometry] to calculate faces in shapes with holes.
Used internally by [page:ExtrudeGeometry ExtrudeGeometry] and
[page:ShapeGeometry ShapeGeometry] to calculate faces in shapes with
holes.
</p>

<h2>Source</h2>
Expand Down
Loading

0 comments on commit eecc967

Please sign in to comment.