Skip to content

Commit 6618a69

Browse files
authored
Added new docs generated with JSDocs (#32118)
* New Docs: Add translation disable flags. * Clean up. * Improved tables rendering. * Exclude WebGPURenderer.Nodes.js for now. * Changed jsdocs destination folder to docs. * Fixed navigation indentation. * Generated docs. * Replaced prettify.js with highlight.js * Clean up. * Updated docs.
1 parent 061ae57 commit 6618a69

File tree

783 files changed

+163405
-22
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

783 files changed

+163405
-22
lines changed

docs/index.html

Lines changed: 2405 additions & 0 deletions
Large diffs are not rendered by default.

docs/pages/AMFLoader.html

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>AMFLoader - Three.js Docs</title>
6+
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
7+
<script src="../scripts/highlight.min.js"></script>
8+
<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
9+
<link type="text/css" rel="stylesheet" href="../styles/page.css">
10+
</head>
11+
<body>
12+
<p class="inheritance" translate="no"><a href="Loader.html">Loader</a></p>
13+
<h1 translate="no">AMFLoader</h1>
14+
<section>
15+
<header>
16+
<div class="class-description"><p>A loader for the AMF format.</p>
17+
<p>The loader supports materials, color and ZIP compressed files.
18+
No constellation support (yet).</p></div>
19+
<h2>Code Example</h2>
20+
<div translate="no"><pre><code class="language-js">const loader = new AMFLoader();
21+
const object = await loader.loadAsync( './models/amf/rook.amf' );
22+
scene.add( object );
23+
</code></pre></div>
24+
</header>
25+
<article>
26+
<h2 class="subsection-title">Import</h2>
27+
<p><span translate="no">AMFLoader</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
28+
<pre><code class="language-js">import { AMFLoader } from 'three/addons/loaders/AMFLoader.js';</code></pre>
29+
<div class="container-overview">
30+
<h2>Constructor</h2>
31+
<h3 class="name name-method" id="AMFLoader" translate="no">new <a href="#AMFLoader">AMFLoader</a><span class="signature">( manager : <span class="param-type">LoadingManager</span> )</span> </h3>
32+
<div class="method">
33+
<div class="description">
34+
<p>Constructs a new AMF loader.</p>
35+
</div>
36+
<table class="params">
37+
<tbody>
38+
<tr>
39+
<td class="name"><code>manager</code></td>
40+
<td class="description last"><p>The loading manager.</p></td>
41+
</tr>
42+
</tbody>
43+
</table>
44+
</div>
45+
</div>
46+
<h2 class="subsection-title">Methods</h2>
47+
<h3 class="name name-method" id="load" translate="no">.<a href="#load">load</a><span class="signature">( url : <span class="param-type">string</span>, onLoad : <span class="param-type">function</span>, onProgress : <span class="param-type">onProgressCallback</span>, onError : <span class="param-type">onErrorCallback</span> )</span> </h3>
48+
<div class="method">
49+
<div class="description">
50+
<p>Starts loading from the given URL and passes the loaded AMF asset
51+
to the <code>onLoad()</code> callback.</p>
52+
</div>
53+
<table class="params">
54+
<tbody>
55+
<tr>
56+
<td class="name"><code>url</code></td>
57+
<td class="description last"><p>The path/URL of the file to be loaded. This can also be a data URI.</p></td>
58+
</tr>
59+
<tr>
60+
<td class="name"><code>onLoad</code></td>
61+
<td class="description last"><p>Executed when the loading process has been finished.</p></td>
62+
</tr>
63+
<tr>
64+
<td class="name"><code>onProgress</code></td>
65+
<td class="description last"><p>Executed while the loading is in progress.</p></td>
66+
</tr>
67+
<tr>
68+
<td class="name"><code>onError</code></td>
69+
<td class="description last"><p>Executed when errors occur.</p></td>
70+
</tr>
71+
</tbody>
72+
</table>
73+
<dl class="details">
74+
<dt class="tag-overrides"><strong>Overrides:</strong> <a href="Loader.html#load">Loader#load</a></dt>
75+
</dl>
76+
</div>
77+
<h3 class="name name-method" id="parse" translate="no">.<a href="#parse">parse</a><span class="signature">( data : <span class="param-type">ArrayBuffer</span> )</span><span class="type-signature"> : <a href="Group.html">Group</a></span> </h3>
78+
<div class="method">
79+
<div class="description">
80+
<p>Parses the given AMF data and returns the resulting group.</p>
81+
</div>
82+
<table class="params">
83+
<tbody>
84+
<tr>
85+
<td class="name"><code>data</code></td>
86+
<td class="description last"><p>The raw AMF asset data as an array buffer.</p></td>
87+
</tr>
88+
</tbody>
89+
</table>
90+
<dl class="details">
91+
<dt class="tag-overrides"><strong>Overrides:</strong> <a href="Loader.html#parse">Loader#parse</a></dt>
92+
</dl>
93+
<dl class="details">
94+
<dt class="tag-returns"><strong>Returns:</strong> A group representing the parsed asset.</dt>
95+
</dl>
96+
</div>
97+
<h2 class="subsection-title">Source</h2>
98+
<p>
99+
<a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/AMFLoader.js" target="_blank" rel="noopener" translate="no">examples/jsm/loaders/AMFLoader.js</a>
100+
</p>
101+
</article>
102+
</section>
103+
<script src="../scripts/linenumber.js"></script>
104+
<script src="../scripts/page.js"></script>
105+
</body>
106+
</html>

docs/pages/AONode.html

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>AONode - Three.js Docs</title>
6+
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
7+
<script src="../scripts/highlight.min.js"></script>
8+
<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
9+
<link type="text/css" rel="stylesheet" href="../styles/page.css">
10+
</head>
11+
<body>
12+
<p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a><a href="Node.html">Node</a><a href="LightingNode.html">LightingNode</a></p>
13+
<h1 translate="no">AONode</h1>
14+
<section>
15+
<header>
16+
<div class="class-description"><p>A generic class that can be used by nodes which contribute
17+
ambient occlusion to the scene. E.g. an ambient occlusion map
18+
node can be used as input for this module. Used in <a href="NodeMaterial.html">NodeMaterial</a>.</p></div>
19+
</header>
20+
<article>
21+
<div class="container-overview">
22+
<h2>Constructor</h2>
23+
<h3 class="name name-method" id="AONode" translate="no">new <a href="#AONode">AONode</a><span class="signature">( aoNode : <span class="param-type">Node.&lt;float></span> )</span> </h3>
24+
<div class="method">
25+
<div class="description">
26+
<p>Constructs a new AO node.</p>
27+
</div>
28+
<table class="params">
29+
<tbody>
30+
<tr>
31+
<td class="name"><code>aoNode</code></td>
32+
<td class="description last"><p>The ambient occlusion node.<br/>Default is <code>null</code>.</p></td>
33+
</tr>
34+
</tbody>
35+
</table>
36+
</div>
37+
</div>
38+
<h2 class="subsection-title">Properties</h2>
39+
<div class="member">
40+
<h3 class="name" id="aoNode" translate="no">.<a href="#aoNode">aoNode</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
41+
<div class="description">
42+
<p>The ambient occlusion node.<br/>Default is <code>null</code>.</p>
43+
</div>
44+
</div>
45+
<h2 class="subsection-title">Source</h2>
46+
<p>
47+
<a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/lighting/AONode.js" target="_blank" rel="noopener" translate="no">src/nodes/lighting/AONode.js</a>
48+
</p>
49+
</article>
50+
</section>
51+
<script src="../scripts/linenumber.js"></script>
52+
<script src="../scripts/page.js"></script>
53+
</body>
54+
</html>

docs/pages/ARButton.html

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>ARButton - Three.js Docs</title>
6+
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
7+
<script src="../scripts/highlight.min.js"></script>
8+
<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
9+
<link type="text/css" rel="stylesheet" href="../styles/page.css">
10+
</head>
11+
<body>
12+
<h1 translate="no">ARButton</h1>
13+
<section>
14+
<header>
15+
<div class="class-description"><p>A utility class for creating a button that allows to initiate
16+
immersive AR sessions based on WebXR. The button can be created
17+
with a factory method and then appended ot the website's DOM.</p></div>
18+
<h2>Code Example</h2>
19+
<div translate="no"><pre><code class="language-js">document.body.appendChild( ARButton.createButton( renderer ) );
20+
</code></pre></div>
21+
</header>
22+
<article>
23+
<h2 class="subsection-title">Import</h2>
24+
<p><span translate="no">ARButton</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
25+
<pre><code class="language-js">import { ARButton } from 'three/addons/webxr/ARButton.js';</code></pre>
26+
<div class="container-overview">
27+
<div class="method">
28+
</div>
29+
</div>
30+
<h2 class="subsection-title">Static Methods</h2>
31+
<h3 class="name name-method" id=".createButton" translate="no">.<a href="#.createButton">createButton</a><span class="signature">( renderer : <span class="param-type">WebGLRenderer | WebGPURenderer</span>, sessionInit : <span class="param-type">XRSessionInit</span> )</span><span class="type-signature"> : HTMLElement</span> </h3>
32+
<div class="method">
33+
<div class="description">
34+
<p>Constructs a new AR button.</p>
35+
</div>
36+
<table class="params">
37+
<tbody>
38+
<tr>
39+
<td class="name"><code>renderer</code></td>
40+
<td class="description last"><p>The renderer.</p></td>
41+
</tr>
42+
<tr>
43+
<td class="name"><code>sessionInit</code></td>
44+
<td class="description last"><p>The a configuration object for the AR session.</p></td>
45+
</tr>
46+
</tbody>
47+
</table>
48+
<dl class="details">
49+
<dt class="tag-returns"><strong>Returns:</strong> The button or an error message if <code>immersive-ar</code> isn't supported.</dt>
50+
</dl>
51+
</div>
52+
<h2 class="subsection-title">Source</h2>
53+
<p>
54+
<a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/webxr/ARButton.js" target="_blank" rel="noopener" translate="no">examples/jsm/webxr/ARButton.js</a>
55+
</p>
56+
</article>
57+
</section>
58+
<script src="../scripts/linenumber.js"></script>
59+
<script src="../scripts/page.js"></script>
60+
</body>
61+
</html>

docs/pages/AfterImageNode.html

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>AfterImageNode - Three.js Docs</title>
6+
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
7+
<script src="../scripts/highlight.min.js"></script>
8+
<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
9+
<link type="text/css" rel="stylesheet" href="../styles/page.css">
10+
</head>
11+
<body>
12+
<p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a><a href="Node.html">Node</a><a href="TempNode.html">TempNode</a></p>
13+
<h1 translate="no">AfterImageNode</h1>
14+
<section>
15+
<header>
16+
<div class="class-description"><p>Post processing node for creating an after image effect.</p></div>
17+
</header>
18+
<article>
19+
<h2 class="subsection-title">Import</h2>
20+
<p><span translate="no">AfterImageNode</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
21+
<pre><code class="language-js">import { afterImage } from 'three/addons/tsl/display/AfterImageNode.js';</code></pre>
22+
<div class="container-overview">
23+
<h2>Constructor</h2>
24+
<h3 class="name name-method" id="AfterImageNode" translate="no">new <a href="#AfterImageNode">AfterImageNode</a><span class="signature">( textureNode : <span class="param-type">TextureNode</span>, damp : <span class="param-type">Node.&lt;float></span> )</span> </h3>
25+
<div class="method">
26+
<div class="description">
27+
<p>Constructs a new after image node.</p>
28+
</div>
29+
<table class="params">
30+
<tbody>
31+
<tr>
32+
<td class="name"><code>textureNode</code></td>
33+
<td class="description last"><p>The texture node that represents the input of the effect.</p></td>
34+
</tr>
35+
<tr>
36+
<td class="name"><code>damp</code></td>
37+
<td class="description last"><p>The damping intensity. A higher value means a stronger after image effect.<br/>Default is <code>0.96</code>.</p></td>
38+
</tr>
39+
</tbody>
40+
</table>
41+
</div>
42+
</div>
43+
<h2 class="subsection-title">Properties</h2>
44+
<div class="member">
45+
<h3 class="name" id="damp" translate="no">.<a href="#damp">damp</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
46+
<div class="description">
47+
<p>How quickly the after-image fades. A higher value means the after-image
48+
persists longer, while a lower value means it fades faster. Should be in
49+
the range <code>[0, 1]</code>.</p>
50+
</div>
51+
</div>
52+
<div class="member">
53+
<h3 class="name" id="textureNode" translate="no">.<a href="#textureNode">textureNode</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
54+
<div class="description">
55+
<p>The texture node that represents the input of the effect.</p>
56+
</div>
57+
</div>
58+
<div class="member">
59+
<h3 class="name" id="textureNodeOld" translate="no">.<a href="#textureNodeOld">textureNodeOld</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
60+
<div class="description">
61+
<p>The texture represents the pervious frame.</p>
62+
</div>
63+
</div>
64+
<div class="member">
65+
<h3 class="name" id="updateBeforeType" translate="no">.<a href="#updateBeforeType">updateBeforeType</a><span class="type-signature"> : string</span> </h3>
66+
<div class="description">
67+
<p>The <code>updateBeforeType</code> is set to <code>NodeUpdateType.FRAME</code> since the node renders
68+
its effect once per frame in <code>updateBefore()</code>.<br/>Default is <code>'frame'</code>.</p>
69+
</div>
70+
<dl class="details">
71+
<dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#updateBeforeType">TempNode#updateBeforeType</a></dt>
72+
</dl>
73+
</div>
74+
<h2 class="subsection-title">Methods</h2>
75+
<h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
76+
<div class="method">
77+
<div class="description">
78+
<p>Frees internal resources. This method should be called
79+
when the effect is no longer required.</p>
80+
</div>
81+
<dl class="details">
82+
<dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#dispose">TempNode#dispose</a></dt>
83+
</dl>
84+
</div>
85+
<h3 class="name name-method" id="getTextureNode" translate="no">.<a href="#getTextureNode">getTextureNode</a><span class="signature">()</span><span class="type-signature"> : <a href="PassTextureNode.html">PassTextureNode</a></span> </h3>
86+
<div class="method">
87+
<div class="description">
88+
<p>Returns the result of the effect as a texture node.</p>
89+
</div>
90+
<dl class="details">
91+
<dt class="tag-returns"><strong>Returns:</strong> A texture node that represents the result of the effect.</dt>
92+
</dl>
93+
</div>
94+
<h3 class="name name-method" id="setSize" translate="no">.<a href="#setSize">setSize</a><span class="signature">( width : <span class="param-type">number</span>, height : <span class="param-type">number</span> )</span> </h3>
95+
<div class="method">
96+
<div class="description">
97+
<p>Sets the size of the effect.</p>
98+
</div>
99+
<table class="params">
100+
<tbody>
101+
<tr>
102+
<td class="name"><code>width</code></td>
103+
<td class="description last"><p>The width of the effect.</p></td>
104+
</tr>
105+
<tr>
106+
<td class="name"><code>height</code></td>
107+
<td class="description last"><p>The height of the effect.</p></td>
108+
</tr>
109+
</tbody>
110+
</table>
111+
</div>
112+
<h3 class="name name-method" id="setup" translate="no">.<a href="#setup">setup</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : <a href="PassTextureNode.html">PassTextureNode</a></span> </h3>
113+
<div class="method">
114+
<div class="description">
115+
<p>This method is used to setup the effect's TSL code.</p>
116+
</div>
117+
<table class="params">
118+
<tbody>
119+
<tr>
120+
<td class="name"><code>builder</code></td>
121+
<td class="description last"><p>The current node builder.</p></td>
122+
</tr>
123+
</tbody>
124+
</table>
125+
<dl class="details">
126+
<dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#setup">TempNode#setup</a></dt>
127+
</dl>
128+
<dl class="details">
129+
<dt class="tag-returns"><strong>Returns:</strong> </dt>
130+
</dl>
131+
</div>
132+
<h3 class="name name-method" id="updateBefore" translate="no">.<a href="#updateBefore">updateBefore</a><span class="signature">( frame : <span class="param-type">NodeFrame</span> )</span> </h3>
133+
<div class="method">
134+
<div class="description">
135+
<p>This method is used to render the effect once per frame.</p>
136+
</div>
137+
<table class="params">
138+
<tbody>
139+
<tr>
140+
<td class="name"><code>frame</code></td>
141+
<td class="description last"><p>The current node frame.</p></td>
142+
</tr>
143+
</tbody>
144+
</table>
145+
<dl class="details">
146+
<dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#updateBefore">TempNode#updateBefore</a></dt>
147+
</dl>
148+
</div>
149+
<h2 class="subsection-title">Source</h2>
150+
<p>
151+
<a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/display/AfterImageNode.js" target="_blank" rel="noopener" translate="no">examples/jsm/tsl/display/AfterImageNode.js</a>
152+
</p>
153+
</article>
154+
</section>
155+
<script src="../scripts/linenumber.js"></script>
156+
<script src="../scripts/page.js"></script>
157+
</body>
158+
</html>

0 commit comments

Comments
 (0)