Skip to content

Commit caddbf4

Browse files
authored
JSDoc: More import sections. (#30860)
1 parent b076a7e commit caddbf4

File tree

315 files changed

+603
-86
lines changed

Some content is hidden

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

315 files changed

+603
-86
lines changed

examples/jsm/animation/AnimationClipCreator.js

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
* A utility class with factory methods for creating basic animation clips.
1212
*
1313
* @hideconstructor
14+
* @three_import import { AnimationClipCreator } from 'three/addons/animation/AnimationClipCreator.js';
1415
*/
1516
class AnimationClipCreator {
1617

examples/jsm/animation/CCDIKSolver.js

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ const _matrix = new Matrix4();
2929
* This class solves the Inverse Kinematics Problem with a [CCD Algorithm]{@link https://web.archive.org/web/20221206080850/https://sites.google.com/site/auraliusproject/ccd-algorithm}.
3030
*
3131
* `CCDIKSolver` is designed to work with instances of {@link SkinnedMesh}.
32+
*
33+
* @three_import import { CCDIKSolver } from 'three/addons/animation/CCDIKSolver.js';
3234
*/
3335
class CCDIKSolver {
3436

@@ -322,6 +324,7 @@ function setPositionOfBoneToAttributeArray( array, index, bone, matrixWorldInv )
322324
* Helper for visualizing IK bones.
323325
*
324326
* @augments Object3D
327+
* @three_import import { CCDIKHelper } from 'three/addons/animation/CCDIKSolver.js';
325328
*/
326329
class CCDIKHelper extends Object3D {
327330

examples/jsm/capabilities/WebGL.js

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* A utility module with basic WebGL 2 capability testing.
33
*
44
* @hideconstructor
5+
* @three_import import WebGL from 'three/addons/capabilities/WebGL.js';
56
*/
67
class WebGL {
78

examples/jsm/capabilities/WebGPU.js

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ if ( typeof window !== 'undefined' && isAvailable ) {
1010
* A utility module with basic WebGPU capability testing.
1111
*
1212
* @hideconstructor
13+
* @three_import import WebGPU from 'three/addons/capabilities/WebGPU.js';
1314
*/
1415
class WebGPU {
1516

examples/jsm/controls/ArcballControls.js

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ const _EPS = 0.000001;
107107
* animation loop when animations are on.
108108
*
109109
* @augments Controls
110+
* @three_import import { ArcballControls } from 'three/addons/controls/ArcballControls.js';
110111
*/
111112
class ArcballControls extends Controls {
112113

examples/jsm/controls/DragControls.js

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const STATE = {
5252
* ```
5353
*
5454
* @augments Controls
55+
* @three_import import { DragControls } from 'three/addons/controls/DragControls.js';
5556
*/
5657
class DragControls extends Controls {
5758

examples/jsm/controls/FirstPersonControls.js

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const _targetPosition = new Vector3();
1414
* This class is an alternative implementation of {@link FlyControls}.
1515
*
1616
* @augments Controls
17+
* @three_import import { FirstPersonControls } from 'three/addons/controls/FirstPersonControls.js';
1718
*/
1819
class FirstPersonControls extends Controls {
1920

examples/jsm/controls/FlyControls.js

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const _tmpQuaternion = new Quaternion();
2121
* (e.g. focus on a specific target).
2222
*
2323
* @augments Controls
24+
* @three_import import { FlyControls } from 'three/addons/controls/FlyControls.js';
2425
*/
2526
class FlyControls extends Controls {
2627

examples/jsm/controls/MapControls.js

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { OrbitControls } from './OrbitControls.js';
1212
* - Pan: Left mouse, or arrow keys / touch: one-finger move.
1313
*
1414
* @augments OrbitControls
15+
* @three_import import { MapControls } from 'three/addons/controls/MapControls.js';
1516
*/
1617
class MapControls extends OrbitControls {
1718

examples/jsm/controls/PointerLockControls.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const _PI_2 = Math.PI / 2;
5555
* ```
5656
*
5757
* @augments Controls
58+
* @three_import import { PointerLockControls } from 'three/addons/controls/PointerLockControls.js';
5859
*/
5960
class PointerLockControls extends Controls {
6061

@@ -200,7 +201,7 @@ class PointerLockControls extends Controls {
200201

201202
/**
202203
* Activates the pointer lock.
203-
*
204+
*
204205
* @param {boolean} [unadjustedMovement=false] - Disables OS-level adjustment for mouse acceleration, and accesses raw mouse input instead.
205206
* Setting it to true will disable mouse acceleration.
206207
*/

examples/jsm/controls/TrackballControls.js

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const _moveDirection = new Vector3();
5151
* to stay "right side up".
5252
*
5353
* @augments Controls
54+
* @three_import import { TrackballControls } from 'three/addons/controls/TrackballControls.js';
5455
*/
5556
class TrackballControls extends Controls {
5657

examples/jsm/controls/TransformControls.js

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const _objectChangeEvent = { type: 'objectChange' };
7272
* `TransformControls` expects that its attached 3D object is part of the scene graph.
7373
*
7474
* @augments Controls
75+
* @three_import import { TransformControls } from 'three/addons/controls/TransformControls.js';
7576
*/
7677
class TransformControls extends Controls {
7778

examples/jsm/csm/CSM.js

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ const _up = new Vector3( 0, 1, 0 );
2525
*
2626
* This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer},
2727
* use {@link CSMShadowNode} instead.
28+
*
29+
* @three_import import { CSM } from 'three/addons/csm/CSM.js';
2830
*/
2931
export class CSM {
3032

examples/jsm/csm/CSMFrustum.js

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ const inverseProjectionMatrix = new Matrix4();
44

55
/**
66
* Represents the frustum of a CSM instance.
7+
*
8+
* @three_import import { CSMFrustum } from 'three/addons/csm/CSMFrustum.js';
79
*/
810
class CSMFrustum {
911

examples/jsm/csm/CSMHelper.js

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
* A helper for visualizing the cascades of a CSM instance.
1717
*
1818
* @augments Group
19+
* @three_import import { CSMHelper } from 'three/addons/csm/CSMHelper.js';
1920
*/
2021
class CSMHelper extends Group {
2122

examples/jsm/csm/CSMShader.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { ShaderChunk } from 'three';
22

3-
/** @module CSMShader */
3+
/**
4+
* @module CSMShader
5+
* @three_import import { CSMShader } from 'three/addons/csm/CSMShader.js';
6+
*/
47

58
/**
69
* The object that holds the GLSL enhancements to enable CSM. This

examples/jsm/csm/CSMShadowNode.js

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class LwLight extends Object3D {
4242
* use {@link CSM} instead.
4343
*
4444
* @augments ShadowBaseNode
45+
* @three_import import { CSMShadowNode } from 'three/addons/csm/CSMShadowNode.js';
4546
*/
4647
class CSMShadowNode extends ShadowBaseNode {
4748

examples/jsm/curves/CurveExtras.js

+14
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
* A Granny Knot curve.
1818
*
1919
* @augments Curve
20+
* @three_import import { GrannyKnot } from 'three/addons/curves/CurveExtras.js';
2021
*/
2122
class GrannyKnot extends Curve {
2223

@@ -47,6 +48,7 @@ class GrannyKnot extends Curve {
4748
* A heart curve.
4849
*
4950
* @augments Curve
51+
* @three_import import { HeartCurve } from 'three/addons/curves/CurveExtras.js';
5052
*/
5153
class HeartCurve extends Curve {
5254

@@ -96,6 +98,7 @@ class HeartCurve extends Curve {
9698
* A Viviani curve.
9799
*
98100
* @augments Curve
101+
* @three_import import { VivianiCurve } from 'three/addons/curves/CurveExtras.js';
99102
*/
100103
class VivianiCurve extends Curve {
101104

@@ -146,6 +149,7 @@ class VivianiCurve extends Curve {
146149
* A knot curve.
147150
*
148151
* @augments Curve
152+
* @three_import import { KnotCurve } from 'three/addons/curves/CurveExtras.js';
149153
*/
150154
class KnotCurve extends Curve {
151155

@@ -179,6 +183,7 @@ class KnotCurve extends Curve {
179183
* A helix curve.
180184
*
181185
* @augments Curve
186+
* @three_import import { HelixCurve } from 'three/addons/curves/CurveExtras.js';
182187
*/
183188
class HelixCurve extends Curve {
184189

@@ -212,6 +217,7 @@ class HelixCurve extends Curve {
212217
* A Trefoil Knot.
213218
*
214219
* @augments Curve
220+
* @three_import import { TrefoilKnot } from 'three/addons/curves/CurveExtras.js';
215221
*/
216222
class TrefoilKnot extends Curve {
217223

@@ -261,6 +267,7 @@ class TrefoilKnot extends Curve {
261267
* A torus knot.
262268
*
263269
* @augments Curve
270+
* @three_import import { TorusKnot } from 'three/addons/curves/CurveExtras.js';
264271
*/
265272
class TorusKnot extends Curve {
266273

@@ -313,6 +320,7 @@ class TorusKnot extends Curve {
313320
* A Cinquefoil Knot.
314321
*
315322
* @augments Curve
323+
* @three_import import { CinquefoilKnot } from 'three/addons/curves/CurveExtras.js';
316324
*/
317325
class CinquefoilKnot extends Curve {
318326

@@ -365,6 +373,7 @@ class CinquefoilKnot extends Curve {
365373
* A Trefoil Polynomial Knot.
366374
*
367375
* @augments Curve
376+
* @three_import import { TrefoilPolynomialKnot } from 'three/addons/curves/CurveExtras.js';
368377
*/
369378
class TrefoilPolynomialKnot extends Curve {
370379

@@ -421,6 +430,7 @@ function scaleTo( x, y, t ) {
421430
* A Figure Eight Polynomial Knot.
422431
*
423432
* @augments Curve
433+
* @three_import import { FigureEightPolynomialKnot } from 'three/addons/curves/CurveExtras.js';
424434
*/
425435
class FigureEightPolynomialKnot extends Curve {
426436

@@ -470,6 +480,7 @@ class FigureEightPolynomialKnot extends Curve {
470480
* A Decorated Torus Knot 4a.
471481
*
472482
* @augments Curve
483+
* @three_import import { DecoratedTorusKnot4a } from 'three/addons/curves/CurveExtras.js';
473484
*/
474485
class DecoratedTorusKnot4a extends Curve {
475486

@@ -519,6 +530,7 @@ class DecoratedTorusKnot4a extends Curve {
519530
* A Decorated Torus Knot 4b.
520531
*
521532
* @augments Curve
533+
* @three_import import { DecoratedTorusKnot4b } from 'three/addons/curves/CurveExtras.js';
522534
*/
523535
class DecoratedTorusKnot4b extends Curve {
524536

@@ -568,6 +580,7 @@ class DecoratedTorusKnot4b extends Curve {
568580
* A Decorated Torus Knot 5a.
569581
*
570582
* @augments Curve
583+
* @three_import import { DecoratedTorusKnot5a } from 'three/addons/curves/CurveExtras.js';
571584
*/
572585
class DecoratedTorusKnot5a extends Curve {
573586

@@ -617,6 +630,7 @@ class DecoratedTorusKnot5a extends Curve {
617630
* A Decorated Torus Knot 5c.
618631
*
619632
* @augments Curve
633+
* @three_import import { DecoratedTorusKnot5c } from 'three/addons/curves/CurveExtras.js';
620634
*/
621635
class DecoratedTorusKnot5c extends Curve {
622636

examples/jsm/curves/NURBSCurve.js

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import * as NURBSUtils from '../curves/NURBSUtils.js';
1111
* Implementation is based on `(x, y [, z=0 [, w=1]])` control points with `w=weight`.
1212
*
1313
* @augments Curve
14+
* @three_import import { NURBSCurve } from 'three/addons/curves/NURBSCurve.js';
1415
*/
1516
class NURBSCurve extends Curve {
1617

examples/jsm/curves/NURBSSurface.js

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import * as NURBSUtils from '../curves/NURBSUtils.js';
77
* This class represents a NURBS surface.
88
*
99
* Implementation is based on `(x, y [, z=0 [, w=1]])` control points with `w=weight`.
10+
*
11+
* @three_import import { NURBSSurface } from 'three/addons/curves/NURBSSurface.js';
1012
*/
1113
class NURBSSurface {
1214

examples/jsm/curves/NURBSUtils.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import {
33
Vector4
44
} from 'three';
55

6-
/** @module NURBSUtils */
6+
/**
7+
* @module NURBSUtils
8+
* @three_import import * as NURBSUtils from 'three/addons/curves/NURBSUtils.js';
9+
*/
710

811
/**
912
* Finds knot vector span.

examples/jsm/curves/NURBSVolume.js

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import * as NURBSUtils from '../curves/NURBSUtils.js';
77
* This class represents a NURBS volume.
88
*
99
* Implementation is based on `(x, y [, z=0 [, w=1]])` control points with `w=weight`.
10+
*
11+
* @three_import import { NURBSVolume } from 'three/addons/curves/NURBSVolume.js';
1012
*/
1113
class NURBSVolume {
1214

examples/jsm/effects/AnaglyphEffect.js

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import { FullScreenQuad } from '../postprocessing/Pass.js';
1414
*
1515
* Note that this class can only be used with {@link WebGLRenderer}.
1616
* When using {@link WebGPURenderer}, use {@link AnaglyphPassNode}.
17+
*
18+
* @three_import import { AnaglyphEffect } from 'three/addons/effects/AnaglyphEffect.js';
1719
*/
1820
class AnaglyphEffect {
1921

examples/jsm/effects/AsciiEffect.js

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* A class that creates an ASCII effect.
33
*
44
* The ASCII generation is based on [jsascii]{@link https://github.com/hassadee/jsascii/blob/master/jsascii.js}.
5+
*
6+
* @three_import import { AsciiEffect } from 'three/addons/effects/AsciiEffect.js';
57
*/
68
class AsciiEffect {
79

examples/jsm/effects/OutlineEffect.js

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import {
2121
*
2222
* }
2323
* ```
24+
*
25+
* @three_import import { OutlineEffect } from 'three/addons/effects/OutlineEffect.js';
2426
*/
2527
class OutlineEffect {
2628

examples/jsm/effects/ParallaxBarrierEffect.js

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import { FullScreenQuad } from '../postprocessing/Pass.js';
1313
*
1414
* Note that this class can only be used with {@link WebGLRenderer}.
1515
* When using {@link WebGPURenderer}, use {@link ParallaxBarrierPassNode}.
16+
*
17+
* @three_import import { ParallaxBarrierEffect } from 'three/addons/effects/ParallaxBarrierEffect.js';
1618
*/
1719
class ParallaxBarrierEffect {
1820

examples/jsm/effects/PeppersGhostEffect.js

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import {
88
* A class that implements a peppers ghost effect.
99
*
1010
* Reference: [Reflective Prism]{@link http://www.instructables.com/id/Reflective-Prism/?ALLSTEPS}
11+
*
12+
* @three_import import { PeppersGhostEffect } from 'three/addons/effects/PeppersGhostEffect.js';
1113
*/
1214
class PeppersGhostEffect {
1315

examples/jsm/effects/StereoEffect.js

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import {
88
*
99
* Note that this class can only be used with {@link WebGLRenderer}.
1010
* When using {@link WebGPURenderer}, use {@link StereoPassNode}.
11+
*
12+
* @three_import import { StereoEffect } from 'three/addons/effects/StereoEffect.js';
1113
*/
1214
class StereoEffect {
1315

examples/jsm/environments/DebugEnvironment.js

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {
2626
* ```
2727
*
2828
* @augments Scene
29+
* @three_import import { DebugEnvironment } from 'three/addons/environments/DebugEnvironment.js';
2930
*/
3031
class DebugEnvironment extends Scene {
3132

examples/jsm/environments/RoomEnvironment.js

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {
2626
* ```
2727
*
2828
* @augments Scene
29+
* @three_import import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';
2930
*/
3031
class RoomEnvironment extends Scene {
3132

examples/jsm/exporters/DRACOExporter.js

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import { Color, ColorManagement, SRGBColorSpace } from 'three';
1919
* const exporter = new DRACOExporter();
2020
* const data = exporter.parse( mesh, options );
2121
* ```
22+
*
23+
* @three_import import { DRACOExporter } from 'three/addons/exporters/DRACOExporter.js';
2224
*/
2325
class DRACOExporter {
2426

examples/jsm/exporters/EXRExporter.js

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ const ZIP_COMPRESSION = 3;
2626
* const exporter = new EXRExporter();
2727
* const result = await exporter.parse( renderer, options );
2828
* ```
29+
*
30+
* @three_import import { EXRExporter } from 'three/addons/exporters/EXRExporter.js';
2931
*/
3032
class EXRExporter {
3133

0 commit comments

Comments
 (0)