Skip to content

Commit 5a79a2e

Browse files
authored
Docs: Add three/renderer jsdoc (#1516)
* Add initial docs * Remove use of "classdesc" * Update buffer * Add docs for three/renderer * Lint fixes * Update config * Fix config * lint fixes
1 parent aa10ecd commit 5a79a2e

28 files changed

Lines changed: 675 additions & 42 deletions

eslint.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,14 @@ export default [
118118
String: 'string',
119119
},
120120
tagNamePreference: {
121-
returns: 'return',
122-
extends: 'augments',
121+
return: 'returns',
122+
augments: 'extends',
123+
classdesc: false,
123124
},
124125
},
125126
},
126127
rules: {
128+
'jsdoc/check-tag-names': [ 'error', { definedTags: [ 'component', 'warn', 'note' ] } ],
127129
'jsdoc/check-types': 'error',
128130
'jsdoc/require-param-type': 'error',
129131
'jsdoc/require-returns-type': 'error',

src/babylonjs/renderer/loaders/B3DMLoader.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ import { B3DMLoaderBase } from '3d-tiles-renderer/core';
33
import { GLTFLoader } from './GLTFLoader.js';
44

55
/**
6-
* @classdesc
76
* Babylon.js loader for B3DM (Batched 3D Model) tile content. Parses the B3DM binary
87
* structure and delegates embedded GLB loading to GLTFLoader.
9-
* @augments B3DMLoaderBase
8+
* @extends B3DMLoaderBase
109
*/
1110
export class B3DMLoader extends B3DMLoaderBase {
1211

src/babylonjs/renderer/loaders/GLTFLoader.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ import '@babylonjs/loaders/glTF/2.0';
66
const _worldMatrix = /* @__PURE__ */ Matrix.Identity();
77

88
/**
9-
* @classdesc
109
* Babylon.js loader for GLTF and GLB tile content. Loads a buffer into a Babylon.js scene
1110
* and applies an optional adjustment transform for coordinate-system correction.
12-
* @augments LoaderBase
11+
* @extends LoaderBase
1312
*/
1413
export class GLTFLoader extends LoaderBase {
1514

src/babylonjs/renderer/tiles/TilesRenderer.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ const _frustumPlanes = /* @__PURE__ */ new Array( 6 ).fill( null ).map( () => ne
1515

1616
// TODO: implementation does not support left handed coordinate system
1717
/**
18-
* @classdesc
1918
* Babylon.js implementation of the 3D Tiles renderer. Manages tile loading, caching, traversal,
2019
* and scene management using the Babylon.js scene graph and camera APIs. Dispatches all events
2120
* defined by TilesRendererBase via Babylon.js Observables.
22-
* @augments TilesRendererBase
21+
* @extends TilesRendererBase
2322
*/
2423
export class TilesRenderer extends TilesRendererBase {
2524

src/core/plugins/CesiumIonAuthPlugin.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { GoogleCloudAuthPlugin } from './GoogleCloudAuthPlugin.js';
99
*/
1010

1111
/**
12-
* @classdesc
1312
* Plugin for authenticating requests to Cesium Ion. Handles token refresh, asset endpoint
1413
* resolution, and attribution collection. Automatically registers a GoogleCloudAuthPlugin
1514
* when the resolved asset is an external Google photorealistic tileset.

src/core/plugins/EnforceNonZeroErrorPlugin.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
2-
* @classdesc
32
* Plugin that ensures every tile has a non-zero geometric error. Tiles with a geometric
43
* error of zero are assigned a derived value based on the nearest ancestor with a non-zero
54
* error, halved once per level of depth below that ancestor.

src/core/plugins/GoogleCloudAuthPlugin.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { GoogleAttributionsManager } from './GoogleAttributionsManager.js';
44
const TILES_3D_API = 'https://tile.googleapis.com/v1/3dtiles/root.json';
55

66
/**
7-
* @classdesc
87
* Plugin for authenticating requests to the Google Cloud Maps APIs, including the
98
* Photorealistic 3D Tiles and 2D Map Tiles APIs. Handles session-token management,
109
* per-tile attribution collection, and optional logo attribution.

src/core/plugins/ImplicitTilingPlugin.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { SUBTREELoader } from './SUBTREELoader.js';
22

33
/**
4-
* @classdesc
54
* Plugin that adds support for 3D Tiles 1.1 implicit tiling. Intercepts tiles that carry
65
* an `implicitTiling` field and expands them by loading and parsing `.subtree` files,
76
* generating child tiles according to the implicit subdivision scheme.

src/core/plugins/SUBTREELoader.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class SUBTREELoader extends LoaderBase {
9494
/**
9595
*
9696
* @param {ArrayBuffer} buffer
97-
* @return {Subtree}
97+
* @returns {Subtree}
9898
*/
9999
parseBuffer( buffer ) {
100100

@@ -713,7 +713,7 @@ export class SUBTREELoader extends LoaderBase {
713713
* the actual bounding volumes should not be computed progressively by subdividing a non-root tile volume.
714714
* Instead, the exact bounding volumes are computed directly for a given level.
715715
* @param {Object | SubtreeTile} tile
716-
* @return {Object} object containing the bounding volume.
716+
* @returns {Object} object containing the bounding volume.
717717
*/
718718
getTileBoundingVolume( tile ) {
719719

@@ -800,7 +800,7 @@ export class SUBTREELoader extends LoaderBase {
800800
/**
801801
* Each child’s geometricError is half of its parent’s geometricError.
802802
* @param {Object | SubtreeTile} tile
803-
* @return {number}
803+
* @returns {number}
804804
*/
805805
getGeometricError( tile ) {
806806

src/core/plugins/auth/CesiumIonAuth.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
2-
* @classdesc
32
* Authentication helper for Cesium Ion. Fetches and caches a bearer token from the
43
* Cesium Ion endpoint and injects it into outgoing requests. Supports optional
54
* automatic token refresh on 4xx responses.

0 commit comments

Comments
 (0)