Skip to content

Commit a33da3c

Browse files
authored
New Docs: Generate old docs system and design (#32036)
* New Docs: Generate old doc system. * New Docs: Added THREE instance and ASCII Art. * New Docs: Templates clean up. * New Docs: Clean up. * New Docs: Avoid generating redundant tags. * New Docs: Fixed search results and link colors. * New Docs: Implemented full inheritance breadcrumbs. * New Docs: Reimplemented old css. * New Docs: Fixed hash links. * New Docs: Implemented @marcofugaro search results design. * New Docs: Clean up. * New Docs: Clean up. * New Docs: Do not include private properties/methods in results. * New Docs: Separated Global from TSL. * New Docs: Clean up. * New Docs: Clean up. * New Docs: Clean up. * New Docs: Removed fuse.js. * New Docs: Replaced examples link with manual. * New Docs: Removed (nullable) from properties/methods. * New Docs: Bring back geometry/materials/... viewers. * New Docs: Separate code snippet from description. * New Docs: Removed unused div container. * New Docs: Moved Import section before Constructor section. * New Docs: Ensure TSL is always uppercase. * New Docs: Clean up. * New Docs: Added missing @tsl tags. * New Docs: Added missing @tsl and @Private tags. * New Docs: Simplified TSL handling. * Added webgpu_materials_basic to puppeteer exceition list.
1 parent 2ab3390 commit a33da3c

Some content is hidden

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

56 files changed

+3892
-1088
lines changed

examples/jsm/tsl/display/DenoiseNode.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ export default DenoiseNode;
259259
/**
260260
* Generates denoise samples based on the given parameters.
261261
*
262+
* @private
262263
* @param {number} numSamples - The number of samples.
263264
* @param {number} numRings - The number of rings.
264265
* @param {number} radiusExponent - The radius exponent.
@@ -283,6 +284,7 @@ function generateDenoiseSamples( numSamples, numRings, radiusExponent ) {
283284
/**
284285
* Generates a default noise texture for the given size.
285286
*
287+
* @private
286288
* @param {number} [size=64] - The texture size.
287289
* @return {DataTexture} The generated noise texture.
288290
*/

examples/jsm/tsl/display/boxBlur.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { Fn, vec2, uv, Loop, vec4, premultiplyAlpha, unpremultiplyAlpha, max, in
1414
*
1515
* Reference: {@link https://github.com/lettier/3d-game-shaders-for-beginners/blob/master/demonstration/shaders/fragment/box-blur.frag}.
1616
*
17+
* @tsl
1718
* @function
1819
* @param {Node<vec4>} textureNode - The texture node that should be blurred.
1920
* @param {Object} [options={}] - Additional options for the hash blur effect.

examples/jsm/tsl/display/hashBlur.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { float, Fn, vec2, uv, sin, rand, degrees, cos, Loop, vec4, premultiplyAl
1212
*
1313
* Reference: {@link https://www.shadertoy.com/view/4lXXWn}.
1414
*
15+
* @tsl
1516
* @function
1617
* @param {Node<vec4>} textureNode - The texture node that should be blurred.
1718
* @param {Node<float>} [bluramount=float(0.1)] - This node determines the amount of blur.

examples/jsm/tsl/lighting/TiledLightsNode.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ import {
55
Fn, If, Return, textureLoad, instanceIndex, screenCoordinate, directPointLight
66
} from 'three/tsl';
77

8+
/**
9+
* TSL function that checks if a circle intersects with an axis-aligned bounding box (AABB).
10+
*
11+
* @tsl
12+
* @function
13+
* @param {Node<vec2>} circleCenter - The center of the circle.
14+
* @param {Node<float>} radius - The radius of the circle.
15+
* @param {Node<vec2>} minBounds - The minimum bounds of the AABB.
16+
* @param {Node<vec2>} maxBounds - The maximum bounds of the AABB.
17+
* @return {Node<bool>} True if the circle intersects the AABB.
18+
*/
819
export const circleIntersectsAABB = /*@__PURE__*/ Fn( ( [ circleCenter, radius, minBounds, maxBounds ] ) => {
920

1021
// Find the closest point on the AABB to the circle's center using method chaining
@@ -419,4 +430,13 @@ class TiledLightsNode extends LightsNode {
419430

420431
export default TiledLightsNode;
421432

433+
/**
434+
* TSL function that creates a tiled lights node.
435+
*
436+
* @tsl
437+
* @function
438+
* @param {number} [maxLights=1024] - The maximum number of lights.
439+
* @param {number} [tileSize=32] - The tile size.
440+
* @return {TiledLightsNode} The tiled lights node.
441+
*/
422442
export const tiledLights = /*@__PURE__*/ nodeProxy( TiledLightsNode );

files/main.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,50 @@ hr {
304304
padding: 0 var(--panel-padding) var(--panel-padding) var(--panel-padding);
305305
}
306306

307+
#panel #searchResults {
308+
flex: 1;
309+
overflow-y: auto;
310+
overflow-x: hidden;
311+
-webkit-overflow-scrolling: touch;
312+
padding: 0 var(--panel-padding) var(--panel-padding) var(--panel-padding);
313+
}
314+
315+
#panel #searchResults .search-result-group {
316+
margin-bottom: 12px;
317+
}
318+
319+
#panel #searchResults .search-result-class {
320+
display: block;
321+
color: var(--text-color);
322+
font-weight: 500;
323+
margin-bottom: 2px;
324+
}
325+
326+
#panel #searchResults .search-result-class:hover {
327+
color: var(--color-blue);
328+
}
329+
330+
#panel #searchResults .search-result-member {
331+
display: block;
332+
color: var(--text-color);
333+
margin-left: 16px;
334+
margin-bottom: 1px;
335+
}
336+
337+
#panel #searchResults .search-result-member:hover {
338+
color: var(--color-blue);
339+
}
340+
341+
#panel #searchResults .search-result-class.selected,
342+
#panel #searchResults .search-result-member.selected {
343+
color: var(--color-blue);
344+
text-decoration: underline;
345+
}
346+
347+
#panel #searchResults strong {
348+
font-weight: 600;
349+
}
350+
307351
#panel #content ul {
308352
list-style-type: none;
309353
padding: 0px;

src/geometries/BoxGeometry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { Vector3 } from '../math/Vector3.js';
1515
* ```
1616
*
1717
* @augments BufferGeometry
18+
* @demo scenes/geometry-browser.html#BoxGeometry
1819
*/
1920
class BoxGeometry extends BufferGeometry {
2021

src/geometries/CapsuleGeometry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { Vector3 } from '../math/Vector3.js';
1313
* ```
1414
*
1515
* @augments BufferGeometry
16+
* @demo scenes/geometry-browser.html#CapsuleGeometry
1617
*/
1718
class CapsuleGeometry extends BufferGeometry {
1819

src/geometries/CircleGeometry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { Vector2 } from '../math/Vector2.js';
1919
* ```
2020
*
2121
* @augments BufferGeometry
22+
* @demo scenes/geometry-browser.html#CircleGeometry
2223
*/
2324
class CircleGeometry extends BufferGeometry {
2425

src/geometries/ConeGeometry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { CylinderGeometry } from './CylinderGeometry.js';
1111
* ```
1212
*
1313
* @augments CylinderGeometry
14+
* @demo scenes/geometry-browser.html#ConeGeometry
1415
*/
1516
class ConeGeometry extends CylinderGeometry {
1617

src/geometries/CylinderGeometry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { Vector2 } from '../math/Vector2.js';
1414
* ```
1515
*
1616
* @augments BufferGeometry
17+
* @demo scenes/geometry-browser.html#CylinderGeometry
1718
*/
1819
class CylinderGeometry extends BufferGeometry {
1920

0 commit comments

Comments
 (0)