浏览代码

Merge pull request #21049 from linbingquan/dev-cleanup-link

fix(src): Clean up the link.
Mr.doob 4 年之前
父节点
当前提交
35bcafe483

+ 2 - 2
src/cameras/OrthographicCamera.d.ts

@@ -3,11 +3,11 @@ import { Camera } from './Camera';
 /**
  * Camera with orthographic projection
  *
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/cameras/OrthographicCamera.js|src/cameras/OrthographicCamera.js}
+ *
  * @example
  * const camera = new THREE.OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 );
  * scene.add( camera );
- *
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/cameras/OrthographicCamera.js|src/cameras/OrthographicCamera.js}
  */
 export class OrthographicCamera extends Camera {
 

+ 1 - 1
src/cameras/PerspectiveCamera.js

@@ -62,7 +62,7 @@ PerspectiveCamera.prototype = Object.assign( Object.create( Camera.prototype ),
 	 */
 	setFocalLength: function ( focalLength ) {
 
-		// see http://www.bobatkins.com/photography/technical/field_of_view.html
+		/** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */
 		const vExtentSlope = 0.5 * this.getFilmHeight() / focalLength;
 
 		this.fov = MathUtils.RAD2DEG * 2 * Math.atan( vExtentSlope );

+ 1 - 1
src/core/BufferAttribute.d.ts

@@ -3,7 +3,7 @@ import { Matrix3 } from './../math/Matrix3';
 import { Matrix4 } from './../math/Matrix4';
 
 /**
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js|src/core/BufferAttribute.js}
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js|src/core/BufferAttribute.js}
  */
 export class BufferAttribute {
 

+ 1 - 1
src/core/BufferGeometry.d.ts

@@ -15,7 +15,7 @@ import { InterleavedBufferAttribute } from './InterleavedBufferAttribute';
  * It reduces memory costs and cpu cycles. But it is not as easy to work with because of all the necessary buffer calculations.
  * It is mainly interesting when working with static objects.
  *
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferGeometry.js|src/core/BufferGeometry.js}
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferGeometry.js|src/core/BufferGeometry.js}
  */
 export class BufferGeometry extends EventDispatcher {
 

+ 1 - 1
src/core/Clock.d.ts

@@ -1,7 +1,7 @@
 /**
  * Object for keeping track of time.
  *
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/Clock.js|src/core/Clock.js}
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/core/Clock.js|src/core/Clock.js}
  */
 export class Clock {
 

+ 1 - 1
src/core/DirectGeometry.d.ts

@@ -8,7 +8,7 @@ import { Geometry } from './Geometry';
 import { MorphTarget } from './Geometry';
 
 /**
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/DirectGeometry.js|src/core/DirectGeometry.js}
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/core/DirectGeometry.js|src/core/DirectGeometry.js}
  */
 export class DirectGeometry {
 

+ 1 - 1
src/core/GLBufferAttribute.d.ts

@@ -1,5 +1,5 @@
 /**
- * @see <a href="https://github.com/mrdoob/three.js/blob/master/src/core/GLBufferAttribute.js">src/core/GLBufferAttribute.js</a>
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/core/GLBufferAttribute.js|src/core/GLBufferAttribute.js}
  */
 
 export class GLBufferAttribute {

+ 1 - 1
src/core/Geometry.d.ts

@@ -35,7 +35,7 @@ export interface MorphNormals {
 /**
  * Base class for geometries
  *
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/Geometry.js|src/core/Geometry.js}
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/core/Geometry.js|src/core/Geometry.js}
  */
 export class Geometry extends EventDispatcher {
 

+ 2 - 2
src/core/InstancedBufferAttribute.d.ts

@@ -2,7 +2,7 @@ import { BufferGeometry } from './BufferGeometry';
 import { BufferAttribute } from './BufferAttribute';
 
 /**
- * @see {@link https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/BufferGeometryUtils.js|examples/jsm/utils/BufferGeometryUtils.js}
+ * see {@link https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/BufferGeometryUtils.js|examples/jsm/utils/BufferGeometryUtils.js}
  */
 export namespace BufferGeometryUtils {
 	export function mergeBufferGeometries(
@@ -33,7 +33,7 @@ export namespace GeometryUtils {
 }
 
 /**
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/InstancedBufferAttribute.js|src/core/InstancedBufferAttribute.js}
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/core/InstancedBufferAttribute.js|src/core/InstancedBufferAttribute.js}
  */
 export class InstancedBufferAttribute extends BufferAttribute {
 

+ 1 - 1
src/core/InstancedBufferGeometry.d.ts

@@ -1,7 +1,7 @@
 import { BufferGeometry } from './BufferGeometry';
 
 /**
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/InstancedBufferGeometry.js|src/core/InstancedBufferGeometry.js}
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/core/InstancedBufferGeometry.js|src/core/InstancedBufferGeometry.js}
  */
 export class InstancedBufferGeometry extends BufferGeometry {
 

+ 1 - 1
src/core/InstancedInterleavedBuffer.d.ts

@@ -1,7 +1,7 @@
 import { InterleavedBuffer } from './InterleavedBuffer';
 
 /**
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/InstancedInterleavedBuffer.js|src/core/InstancedInterleavedBuffer.js}
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/core/InstancedInterleavedBuffer.js|src/core/InstancedInterleavedBuffer.js}
  */
 export class InstancedInterleavedBuffer extends InterleavedBuffer {
 

+ 1 - 1
src/core/InterleavedBuffer.d.ts

@@ -2,7 +2,7 @@ import { InterleavedBufferAttribute } from './InterleavedBufferAttribute';
 import { Usage } from '../constants';
 
 /**
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/InterleavedBuffer.js|src/core/InterleavedBuffer.js}
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/core/InterleavedBuffer.js|src/core/InterleavedBuffer.js}
  */
 export class InterleavedBuffer {
 

+ 1 - 1
src/core/InterleavedBufferAttribute.d.ts

@@ -2,7 +2,7 @@ import { BufferAttribute } from './BufferAttribute';
 import { InterleavedBuffer } from './InterleavedBuffer';
 import { Matrix4 } from './../math/Matrix4';
 /**
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/InterleavedBufferAttribute.js|src/core/InterleavedBufferAttribute.js}
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/core/InterleavedBufferAttribute.js|src/core/InterleavedBufferAttribute.js}
  */
 export class InterleavedBufferAttribute {
 

+ 2 - 2
src/lights/DirectionalLight.d.ts

@@ -5,13 +5,13 @@ import { Light } from './Light';
 import { Vector3 } from '../math/Vector3';
 
 /**
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/lights/DirectionalLight.js|src/lights/DirectionalLight.js}
+ *
  * @example
  * // White directional light at half intensity shining from the top.
  * const directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 );
  * directionalLight.position.set( 0, 1, 0 );
  * scene.add( directionalLight );
- *
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/lights/DirectionalLight.js|src/lights/DirectionalLight.js}
  */
 export class DirectionalLight extends Light {
 

+ 2 - 2
src/math/Color.d.ts

@@ -9,10 +9,10 @@ export interface HSL {
 /**
  * Represents a color. See also {@link ColorUtils}.
  *
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/math/Color.js|src/math/Color.js}
+ *
  * @example
  * const color = new THREE.Color( 0xff0000 );
- *
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/math/Color.js|src/math/Color.js}
  */
 export class Color {
 

+ 4 - 4
src/math/Vector2.d.ts

@@ -341,9 +341,9 @@ export class Vector2 implements Vector {
 	/**
 	 * Computes the Manhattan length of this vector.
 	 *
-	 * @return {number}
+	 * see {@link http://en.wikipedia.org/wiki/Taxicab_geometry|Wikipedia: Taxicab Geometry}
 	 *
-	 * @see {@link http://en.wikipedia.org/wiki/Taxicab_geometry|Wikipedia: Taxicab Geometry}
+	 * @return {number}
 	 */
 	manhattanLength(): number;
 
@@ -375,11 +375,11 @@ export class Vector2 implements Vector {
 	/**
 	 * Computes the Manhattan length (distance) from this vector to the given vector v
 	 *
+	 * see {@link http://en.wikipedia.org/wiki/Taxicab_geometry|Wikipedia: Taxicab Geometry}
+	 *
 	 * @param {Vector2} v
 	 *
 	 * @return {number}
-	 *
-	 * @see {@link http://en.wikipedia.org/wiki/Taxicab_geometry|Wikipedia: Taxicab Geometry}
 	 */
 	manhattanDistanceTo( v: Vector2 ): number;
 

+ 7 - 9
src/math/Vector3.d.ts

@@ -12,17 +12,15 @@ import { Vector } from './Vector2';
 type Vector3Tuple = [number, number, number];
 
 /**
- * 3D vector.
+ * 3D vector. ( class Vector3 implements Vector<Vector3> )
+ *
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/math/Vector3.js}
  *
  * @example
  * const a = new THREE.Vector3( 1, 0, 0 );
  * const b = new THREE.Vector3( 0, 1, 0 );
  * const c = new THREE.Vector3();
  * c.crossVectors( a, b );
- *
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/math/Vector3.js}
- *
- * ( class Vector3 implements Vector<Vector3> )
  */
 export class Vector3 implements Vector {
 
@@ -193,20 +191,20 @@ export class Vector3 implements Vector {
 	/**
 	 * Computes the Manhattan length of this vector.
 	 *
-	 * @return {number}
+	 * see {@link http://en.wikipedia.org/wiki/Taxicab_geometry|Wikipedia: Taxicab Geometry}
 	 *
-	 * @see {@link http://en.wikipedia.org/wiki/Taxicab_geometry|Wikipedia: Taxicab Geometry}
+	 * @return {number}
 	 */
 	manhattanLength(): number;
 
 	/**
 	 * Computes the Manhattan length (distance) from this vector to the given vector v
 	 *
+	 * see {@link http://en.wikipedia.org/wiki/Taxicab_geometry|Wikipedia: Taxicab Geometry}
+	 *
 	 * @param {Vector3} v
 	 *
 	 * @return {number}
-	 *
-	 * @see {@link http://en.wikipedia.org/wiki/Taxicab_geometry|Wikipedia: Taxicab Geometry}
 	 */
 	manhattanDistanceTo( v: Vector3 ): number;
 

+ 2 - 2
src/math/Vector4.d.ts

@@ -164,9 +164,9 @@ export class Vector4 implements Vector {
 	/**
 	 * Computes the Manhattan length of this vector.
 	 *
-	 * @return {number}
+	 * see {@link http://en.wikipedia.org/wiki/Taxicab_geometry|Wikipedia: Taxicab Geometry}
 	 *
-	 * @see {@link http://en.wikipedia.org/wiki/Taxicab_geometry|Wikipedia: Taxicab Geometry}
+	 * @return {number}
 	 */
 	manhattanLength(): number;
 

+ 1 - 1
src/renderers/WebGLRenderer.d.ts

@@ -101,7 +101,7 @@ export interface WebGLDebug {
  * The WebGL renderer displays your beautifully crafted scenes using WebGL, if your device supports it.
  * This renderer has way better performance than CanvasRenderer.
  *
- * @see {@link https://github.com/mrdoob/three.js/blob/master/src/renderers/WebGLRenderer.js|src/renderers/WebGLRenderer.js}
+ * see {@link https://github.com/mrdoob/three.js/blob/master/src/renderers/WebGLRenderer.js|src/renderers/WebGLRenderer.js}
  */
 export class WebGLRenderer implements Renderer {