From 2f4360da15db524bc5ba296978543b6eb5ec70a4 Mon Sep 17 00:00:00 2001 From: Yorick van Klinken Date: Wed, 24 Jul 2024 16:46:41 +0200 Subject: [PATCH] docs: #3132 Update all Markdown comment symbol links to {@apilink} (#3137) Used the following setup to search for and replace the Markdown comments: Search: `\[\[([a-zA-Z 0-9._]*)\|([a-zA-Z 0-9._]*)\]\]` and `\[\[([a-zA-Z 0-9._]*)\]\]` Replace: `{@apilink $1 | `$2`}` and `{@apilink $1}` I wasn't sure if all the "normal" comments had to be replaced as wel, because `src/engine/Actions/ActionContext.ts` contains both `{@apilink Action}` and `[[EasingFunctions]]`. It's easy to do with a small modification, so give me a shout if that's preferred. Closes #3132 --- src/engine/Actions/Action.ts | 2 +- src/engine/Actions/Action/ActionSequence.ts | 2 +- src/engine/Actions/Action/ParallelActions.ts | 2 +- src/engine/Actions/ActionContext.ts | 20 ++--- src/engine/Actions/ActionQueue.ts | 6 +- src/engine/Actions/ActionsComponent.ts | 12 +-- src/engine/Actor.ts | 42 ++++----- src/engine/Camera.ts | 32 +++---- src/engine/Collision/BodyComponent.ts | 18 ++-- src/engine/Collision/BoundingBox.ts | 6 +- src/engine/Collision/ColliderComponent.ts | 8 +- src/engine/Collision/Colliders/Collider.ts | 2 +- .../Collision/Colliders/CompositeCollider.ts | 2 +- .../Collision/Colliders/PolygonCollider.ts | 6 +- src/engine/Collision/Colliders/Shape.ts | 10 +-- .../Detection/SpatialPartitionStrategy.ts | 4 +- src/engine/Collision/Group/CollisionGroup.ts | 6 +- src/engine/Collision/Physics.ts | 14 +-- src/engine/Collision/PhysicsConfig.ts | 22 ++--- src/engine/Collision/Solver/ContactBias.ts | 6 +- src/engine/Collision/SolverStrategy.ts | 4 +- src/engine/Color.ts | 4 +- src/engine/Debug/DebugConfig.ts | 20 ++--- src/engine/Director/Director.ts | 2 +- src/engine/Director/Loader.ts | 4 +- src/engine/Engine.ts | 90 +++++++++---------- src/engine/EntityComponentSystem/Component.ts | 2 +- .../Components/TransformComponent.ts | 2 +- src/engine/EntityComponentSystem/Entity.ts | 6 +- src/engine/EntityComponentSystem/System.ts | 4 +- .../EntityComponentSystem/SystemManager.ts | 2 +- src/engine/EventDispatcher.ts | 2 +- src/engine/Events.ts | 34 +++---- src/engine/Flags.ts | 6 +- src/engine/Graphics/Animation.ts | 24 ++--- src/engine/Graphics/Canvas.ts | 6 +- src/engine/Graphics/Circle.ts | 4 +- .../Context/ExcaliburGraphicsContext.ts | 10 +-- src/engine/Graphics/Context/renderer.ts | 2 +- src/engine/Graphics/Context/shader.ts | 12 +-- src/engine/Graphics/Context/texture-loader.ts | 2 +- src/engine/Graphics/Context/vertex-layout.ts | 4 +- src/engine/Graphics/DebugGraphicsComponent.ts | 2 +- src/engine/Graphics/Font.ts | 4 +- src/engine/Graphics/FontCommon.ts | 2 +- src/engine/Graphics/Graphic.ts | 18 ++-- src/engine/Graphics/GraphicsComponent.ts | 2 +- src/engine/Graphics/ImageSource.ts | 2 +- src/engine/Graphics/Polygon.ts | 4 +- .../Graphics/PostProcessor/PostProcessor.ts | 4 +- src/engine/Graphics/Raster.ts | 14 +-- src/engine/Graphics/Rectangle.ts | 2 +- src/engine/Graphics/Sprite.ts | 4 +- src/engine/Graphics/SpriteFont.ts | 2 +- src/engine/Graphics/SpriteSheet.ts | 8 +- src/engine/Input/CapturePointerConfig.ts | 2 +- src/engine/Input/Gamepad.ts | 4 +- src/engine/Input/PointerSystem.ts | 4 +- src/engine/Input/PointerType.ts | 2 +- src/engine/Interfaces/AudioImplementation.ts | 2 +- src/engine/Interfaces/Loadable.ts | 2 +- src/engine/Label.ts | 4 +- src/engine/Math/affine-matrix.ts | 2 +- src/engine/Math/coord-plane.ts | 2 +- src/engine/Math/vector.ts | 2 +- src/engine/Particles/ParticleEmitter.ts | 4 +- src/engine/Particles/Particles.ts | 10 +-- src/engine/Resources/Gif.ts | 6 +- src/engine/Resources/Resource.ts | 4 +- src/engine/Resources/Sound/Sound.ts | 8 +- src/engine/Scene.ts | 66 +++++++------- src/engine/Screen.ts | 28 +++--- src/engine/ScreenElement.ts | 2 +- src/engine/TileMap/IsometricMap.ts | 16 ++-- src/engine/TileMap/TileMap.ts | 24 ++--- src/engine/Trigger.ts | 2 +- src/engine/Util/Clock.ts | 4 +- src/engine/Util/DrawUtil.ts | 6 +- src/engine/Util/EasingFunctions.ts | 2 +- src/engine/Util/Log.ts | 34 +++---- 80 files changed, 389 insertions(+), 389 deletions(-) diff --git a/src/engine/Actions/Action.ts b/src/engine/Actions/Action.ts index 4d2e7e944..c21422811 100644 --- a/src/engine/Actions/Action.ts +++ b/src/engine/Actions/Action.ts @@ -1,7 +1,7 @@ import { Entity } from '../EntityComponentSystem/Entity'; /** - * Used for implementing actions for the [[ActionContext|Action API]]. + * Used for implementing actions for the {@apilink ActionContext | `Action API`}. */ export interface Action { id: number; diff --git a/src/engine/Actions/Action/ActionSequence.ts b/src/engine/Actions/Action/ActionSequence.ts index cee3657db..7c6ef28cd 100644 --- a/src/engine/Actions/Action/ActionSequence.ts +++ b/src/engine/Actions/Action/ActionSequence.ts @@ -5,7 +5,7 @@ import { ActionQueue } from '../ActionQueue'; /** * Action that can represent a sequence of actions, this can be useful in conjunction with - * [[ParallelActions]] to run multiple sequences in parallel. + * {@apilink ParallelActions} to run multiple sequences in parallel. */ export class ActionSequence implements Action { id = nextActionId(); diff --git a/src/engine/Actions/Action/ParallelActions.ts b/src/engine/Actions/Action/ParallelActions.ts index 19c9907cb..f7c4654b4 100644 --- a/src/engine/Actions/Action/ParallelActions.ts +++ b/src/engine/Actions/Action/ParallelActions.ts @@ -2,7 +2,7 @@ import { Entity } from '../../EntityComponentSystem'; import { Action, nextActionId } from '../Action'; /** - * Action that can run multiple [[Action]]s or [[ActionSequence]]s at the same time + * Action that can run multiple {@apilink Action}s or {@apilink ActionSequence}s at the same time */ export class ParallelActions implements Action { id = nextActionId(); diff --git a/src/engine/Actions/ActionContext.ts b/src/engine/Actions/ActionContext.ts index 33a2f4571..c1bc79250 100644 --- a/src/engine/Actions/ActionContext.ts +++ b/src/engine/Actions/ActionContext.ts @@ -61,21 +61,21 @@ export class ActionContext { /** * This method will move an actor to the specified `x` and `y` position over the - * specified duration using a given [[EasingFunctions]] and return back the actor. This + * specified duration using a given {@apilink EasingFunctions} and return back the actor. This * method is part of the actor 'Action' fluent API allowing action chaining. * @param pos The x,y vector location to move the actor to * @param duration The time it should take the actor to move to the new location in milliseconds - * @param easingFcn Use [[EasingFunction]] or a custom function to use to calculate position, Default is [[EasingFunctions.Linear]] + * @param easingFcn Use {@apilink EasingFunction} or a custom function to use to calculate position, Default is {@apilink EasingFunctions.Linear} */ public easeTo(pos: Vector, duration: number, easingFcn?: EasingFunction): ActionContext; /** * This method will move an actor to the specified `x` and `y` position over the - * specified duration using a given [[EasingFunctions]] and return back the actor. This + * specified duration using a given {@apilink EasingFunctions} and return back the actor. This * method is part of the actor 'Action' fluent API allowing action chaining. * @param x The x location to move the actor to * @param y The y location to move the actor to * @param duration The time it should take the actor to move to the new location in milliseconds - * @param easingFcn Use [[EasingFunction]] or a custom function to use to calculate position, Default is [[EasingFunctions.Linear]] + * @param easingFcn Use {@apilink EasingFunction} or a custom function to use to calculate position, Default is {@apilink EasingFunctions.Linear} */ public easeTo(x: number, y: number, duration: number, easingFcn?: EasingFunction): ActionContext; public easeTo(...args: any[]): ActionContext { @@ -101,18 +101,18 @@ export class ActionContext { /** * This method will move an actor by a specified vector offset relative to the current position given - * a duration and a [[EasingFunction]]. This method is part of the actor 'Action' fluent API allowing action chaining. + * a duration and a {@apilink EasingFunction}. This method is part of the actor 'Action' fluent API allowing action chaining. * @param offset Vector offset relative to the current position * @param duration The duration in milliseconds - * @param easingFcn Use [[EasingFunction]] or a custom function to use to calculate position, Default is [[EasingFunctions.Linear]] + * @param easingFcn Use {@apilink EasingFunction} or a custom function to use to calculate position, Default is {@apilink EasingFunctions.Linear} */ public easeBy(offset: Vector, duration: number, easingFcn?: EasingFunction): ActionContext; /** * This method will move an actor by a specified x and y offset relative to the current position given - * a duration and a [[EasingFunction]]. This method is part of the actor 'Action' fluent API allowing action chaining. + * a duration and a {@apilink EasingFunction}. This method is part of the actor 'Action' fluent API allowing action chaining. * @param offset Vector offset relative to the current position * @param duration The duration in milliseconds - * @param easingFcn Use [[EasingFunction]] or a custom function to use to calculate position, Default is [[EasingFunctions.Linear]] + * @param easingFcn Use {@apilink EasingFunction} or a custom function to use to calculate position, Default is {@apilink EasingFunctions.Linear} */ public easeBy(offsetX: number, offsetY: number, duration: number, easingFcn?: EasingFunction): ActionContext; public easeBy(...args: any[]): ActionContext { @@ -202,7 +202,7 @@ export class ActionContext { * method is part of the actor 'Action' fluent API allowing action chaining. * @param angleRadians The angle to rotate to in radians * @param speed The angular velocity of the rotation specified in radians per second - * @param rotationType The [[RotationType]] to use for this rotation + * @param rotationType The {@apilink RotationType} to use for this rotation */ public rotateTo(angleRadians: number, speed: number, rotationType?: RotationType): ActionContext { this._queue.add(new RotateTo(this._entity, angleRadians, speed, rotationType)); @@ -215,7 +215,7 @@ export class ActionContext { * of the actor 'Action' fluent API allowing action chaining. * @param angleRadiansOffset The angle to rotate to in radians relative to the current rotation * @param speed The speed in radians/sec the actor should rotate at - * @param rotationType The [[RotationType]] to use for this rotation, default is shortest path + * @param rotationType The {@apilink RotationType} to use for this rotation, default is shortest path */ public rotateBy(angleRadiansOffset: number, speed: number, rotationType?: RotationType): ActionContext { this._queue.add(new RotateBy(this._entity, angleRadiansOffset, speed, rotationType)); diff --git a/src/engine/Actions/ActionQueue.ts b/src/engine/Actions/ActionQueue.ts index 3565ebe8d..32655947f 100644 --- a/src/engine/Actions/ActionQueue.ts +++ b/src/engine/Actions/ActionQueue.ts @@ -5,10 +5,10 @@ import { Action } from './Action'; /** * Action Queues represent an ordered sequence of actions * - * Action queues are part of the [[ActionContext|Action API]] and - * store the list of actions to be executed for an [[Actor]]. + * Action queues are part of the {@apilink ActionContext | `Action API`} and + * store the list of actions to be executed for an {@apilink Actor}. * - * Actors implement [[Actor.actions]] which can be manipulated by + * Actors implement {@apilink Actor.actions} which can be manipulated by * advanced users to adjust the actions currently being executed in the * queue. */ diff --git a/src/engine/Actions/ActionsComponent.ts b/src/engine/Actions/ActionsComponent.ts index c15d3b5cf..fa98cdfab 100644 --- a/src/engine/Actions/ActionsComponent.ts +++ b/src/engine/Actions/ActionsComponent.ts @@ -66,21 +66,21 @@ export class ActionsComponent extends Component implements ActionContextMethods /** * This method will move an actor to the specified `x` and `y` position over the - * specified duration using a given [[EasingFunctions]] and return back the actor. This + * specified duration using a given {@apilink EasingFunctions} and return back the actor. This * method is part of the actor 'Action' fluent API allowing action chaining. * @param pos The x,y vector location to move the actor to * @param duration The time it should take the actor to move to the new location in milliseconds - * @param easingFcn Use [[EasingFunctions]] or a custom function to use to calculate position, Default is [[EasingFunctions.Linear]] + * @param easingFcn Use {@apilink EasingFunctions} or a custom function to use to calculate position, Default is {@apilink EasingFunctions.Linear} */ public easeTo(pos: Vector, duration: number, easingFcn?: EasingFunction): ActionContext; /** * This method will move an actor to the specified `x` and `y` position over the - * specified duration using a given [[EasingFunctions]] and return back the actor. This + * specified duration using a given {@apilink EasingFunctions} and return back the actor. This * method is part of the actor 'Action' fluent API allowing action chaining. * @param x The x location to move the actor to * @param y The y location to move the actor to * @param duration The time it should take the actor to move to the new location in milliseconds - * @param easingFcn Use [[EasingFunctions]] or a custom function to use to calculate position, Default is [[EasingFunctions.Linear]] + * @param easingFcn Use {@apilink EasingFunctions} or a custom function to use to calculate position, Default is {@apilink EasingFunctions.Linear} */ public easeTo(x: number, y: number, duration: number, easingFcn?: EasingFunction): ActionContext; public easeTo(...args: any[]): ActionContext { @@ -139,7 +139,7 @@ export class ActionsComponent extends Component implements ActionContextMethods * method is part of the actor 'Action' fluent API allowing action chaining. * @param angleRadians The angle to rotate to in radians * @param speed The angular velocity of the rotation specified in radians per second - * @param rotationType The [[RotationType]] to use for this rotation + * @param rotationType The {@apilink RotationType} to use for this rotation */ public rotateTo(angleRadians: number, speed: number, rotationType?: RotationType): ActionContext { return this._getCtx().rotateTo(angleRadians, speed, rotationType); @@ -151,7 +151,7 @@ export class ActionsComponent extends Component implements ActionContextMethods * of the actor 'Action' fluent API allowing action chaining. * @param angleRadiansOffset The angle to rotate to in radians relative to the current rotation * @param speed The speed in radians/sec the actor should rotate at - * @param rotationType The [[RotationType]] to use for this rotation, default is shortest path + * @param rotationType The {@apilink RotationType} to use for this rotation, default is shortest path */ public rotateBy(angleRadiansOffset: number, speed: number, rotationType?: RotationType): ActionContext { return this._getCtx().rotateBy(angleRadiansOffset, speed, rotationType); diff --git a/src/engine/Actor.ts b/src/engine/Actor.ts index 99398db55..a6236f2ab 100644 --- a/src/engine/Actor.ts +++ b/src/engine/Actor.ts @@ -77,7 +77,7 @@ export type ActorArgs = ColliderArgs & { */ pos?: Vector; /** - * Optionally set the coordinate plane of the actor, default is [[CoordPlane.World]] meaning actor is subject to camera positioning + * Optionally set the coordinate plane of the actor, default is {@apilink CoordPlane.World} meaning actor is subject to camera positioning */ coordPlane?: CoordPlane; /** @@ -132,7 +132,7 @@ export type ActorArgs = ColliderArgs & { collisionType?: CollisionType; /** - * Optionally supply a [[CollisionGroup]] + * Optionally supply a {@apilink CollisionGroup} */ collisionGroup?: CollisionGroup; }; @@ -243,7 +243,7 @@ export const ActorEvents = { * The most important primitive in Excalibur is an `Actor`. Anything that * can move on the screen, collide with another `Actor`, respond to events, * or interact with the current scene, must be an actor. An `Actor` **must** - * be part of a [[Scene]] for it to be drawn to the screen. + * be part of a {@apilink Scene} for it to be drawn to the screen. */ export class Actor extends Entity implements Eventable, PointerEvents, CanInitialize, CanUpdate, CanBeKilled { public events = new EventEmitter(); @@ -263,35 +263,35 @@ export class Actor extends Entity implements Eventable, PointerEvents, CanInitia public body: BodyComponent; /** - * Access the Actor's built in [[TransformComponent]] + * Access the Actor's built in {@apilink TransformComponent} */ public transform: TransformComponent; /** - * Access the Actor's built in [[MotionComponent]] + * Access the Actor's built in {@apilink MotionComponent} */ public motion: MotionComponent; /** - * Access to the Actor's built in [[GraphicsComponent]] + * Access to the Actor's built in {@apilink GraphicsComponent} */ public graphics: GraphicsComponent; /** - * Access to the Actor's built in [[ColliderComponent]] + * Access to the Actor's built in {@apilink ColliderComponent} */ public collider: ColliderComponent; /** - * Access to the Actor's built in [[PointerComponent]] config + * Access to the Actor's built in {@apilink PointerComponent} config */ public pointer: PointerComponent; /** * Useful for quickly scripting actor behavior, like moving to a place, patrolling back and forth, blinking, etc. * - * Access to the Actor's built in [[ActionsComponent]] which forwards to the - * [[ActionContext|Action context]] of the actor. + * Access to the Actor's built in {@apilink ActionsComponent} which forwards to the + * {@apilink ActionContext | `Action context`} of the actor. */ public actions: ActionsComponent; @@ -374,14 +374,14 @@ export class Actor extends Entity implements Eventable, PointerEvents, CanInitia } /** - * Sets the acceleration of the actor from the last frame. This does not include the global acc [[Physics.acc]]. + * Sets the acceleration of the actor from the last frame. This does not include the global acc {@apilink Physics.acc}. */ public set oldAcc(theAcc: Vector) { this.body.oldAcc.setTo(theAcc.x, theAcc.y); } /** - * Gets the acceleration of the actor from the last frame. This does not include the global acc [[Physics.acc]]. + * Gets the acceleration of the actor from the last frame. This does not include the global acc {@apilink Physics.acc}. */ public get oldAcc(): Vector { return this.body.oldAcc; @@ -753,7 +753,7 @@ export class Actor extends Entity implements Eventable, PointerEvents, CanInitia /** * It is not recommended that internal excalibur methods be overridden, do so at your own risk. * - * Internal _prekill handler for [[onPreKill]] lifecycle event + * Internal _prekill handler for {@apilink onPreKill} lifecycle event * @internal */ public _prekill(scene: Scene) { @@ -764,7 +764,7 @@ export class Actor extends Entity implements Eventable, PointerEvents, CanInitia /** * Safe to override onPreKill lifecycle event handler. Synonymous with `.on('prekill', (evt) =>{...})` * - * `onPreKill` is called directly before an actor is killed and removed from its current [[Scene]]. + * `onPreKill` is called directly before an actor is killed and removed from its current {@apilink Scene}. */ public onPreKill(scene: Scene) { // Override me @@ -773,7 +773,7 @@ export class Actor extends Entity implements Eventable, PointerEvents, CanInitia /** * It is not recommended that internal excalibur methods be overridden, do so at your own risk. * - * Internal _prekill handler for [[onPostKill]] lifecycle event + * Internal _prekill handler for {@apilink onPostKill} lifecycle event * @internal */ public _postkill(scene: Scene) { @@ -784,7 +784,7 @@ export class Actor extends Entity implements Eventable, PointerEvents, CanInitia /** * Safe to override onPostKill lifecycle event handler. Synonymous with `.on('postkill', (evt) => {...})` * - * `onPostKill` is called directly after an actor is killed and remove from its current [[Scene]]. + * `onPostKill` is called directly after an actor is killed and remove from its current {@apilink Scene}. */ public onPostKill(scene: Scene) { // Override me @@ -866,7 +866,7 @@ export class Actor extends Entity implements Eventable, PointerEvents, CanInitia /** * Gets this actor's rotation taking into account any parent relationships * @returns Rotation angle in radians - * @deprecated Use [[globalRotation]] instead + * @deprecated Use {@apilink globalRotation} instead */ public getGlobalRotation(): number { return this.get(TransformComponent).globalRotation; @@ -882,7 +882,7 @@ export class Actor extends Entity implements Eventable, PointerEvents, CanInitia /** * Gets an actor's world position taking into account parent relationships, scaling, rotation, and translation * @returns Position in world coordinates - * @deprecated Use [[globalPos]] instead + * @deprecated Use {@apilink globalPos} instead */ public getGlobalPos(): Vector { return this.get(TransformComponent).globalPos; @@ -897,7 +897,7 @@ export class Actor extends Entity implements Eventable, PointerEvents, CanInitia /** * Gets the global scale of the Actor - * @deprecated Use [[globalScale]] instead + * @deprecated Use {@apilink globalScale} instead */ public getGlobalScale(): Vector { return this.get(TransformComponent).globalScale; @@ -1045,7 +1045,7 @@ export class Actor extends Entity implements Eventable, PointerEvents, CanInitia /** * It is not recommended that internal excalibur methods be overridden, do so at your own risk. * - * Internal _preupdate handler for [[onPreUpdate]] lifecycle event + * Internal _preupdate handler for {@apilink onPreUpdate} lifecycle event * @internal */ public _preupdate(engine: Engine, delta: number): void { @@ -1056,7 +1056,7 @@ export class Actor extends Entity implements Eventable, PointerEvents, CanInitia /** * It is not recommended that internal excalibur methods be overridden, do so at your own risk. * - * Internal _preupdate handler for [[onPostUpdate]] lifecycle event + * Internal _preupdate handler for {@apilink onPostUpdate} lifecycle event * @internal */ public _postupdate(engine: Engine, delta: number): void { diff --git a/src/engine/Camera.ts b/src/engine/Camera.ts index f1690f8bd..c954953ed 100644 --- a/src/engine/Camera.ts +++ b/src/engine/Camera.ts @@ -42,7 +42,7 @@ export class StrategyContainer { constructor(public camera: Camera) {} /** - * Creates and adds the [[LockCameraToActorStrategy]] on the current camera. + * Creates and adds the {@apilink LockCameraToActorStrategy} on the current camera. * @param actor The actor to lock the camera to */ public lockToActor(actor: Actor) { @@ -50,7 +50,7 @@ export class StrategyContainer { } /** - * Creates and adds the [[LockCameraToActorAxisStrategy]] on the current camera + * Creates and adds the {@apilink LockCameraToActorAxisStrategy} on the current camera * @param actor The actor to lock the camera to * @param axis The axis to follow the actor on */ @@ -59,7 +59,7 @@ export class StrategyContainer { } /** - * Creates and adds the [[ElasticToActorStrategy]] on the current camera + * Creates and adds the {@apilink ElasticToActorStrategy} on the current camera * If cameraElasticity < cameraFriction < 1.0, the behavior will be a dampened spring that will slowly end at the target without bouncing * If cameraFriction < cameraElasticity < 1.0, the behavior will be an oscillating spring that will over * correct and bounce around the target @@ -72,7 +72,7 @@ export class StrategyContainer { } /** - * Creates and adds the [[RadiusAroundActorStrategy]] on the current camera + * Creates and adds the {@apilink RadiusAroundActorStrategy} on the current camera * @param actor Target actor to follow when it is "radius" pixels away * @param radius Number of pixels away before the camera will follow */ @@ -81,7 +81,7 @@ export class StrategyContainer { } /** - * Creates and adds the [[LimitCameraBoundsStrategy]] on the current camera + * Creates and adds the {@apilink LimitCameraBoundsStrategy} on the current camera * @param box The bounding box to limit the camera to. */ public limitCameraBounds(box: BoundingBox) { @@ -197,7 +197,7 @@ export class RadiusAroundActorStrategy implements CameraStrategy { */ export class LimitCameraBoundsStrategy implements CameraStrategy { /** - * Useful for limiting the camera to a [[TileMap]]'s dimensions, or a specific area inside the map. + * Useful for limiting the camera to a {@apilink TileMap}'s dimensions, or a specific area inside the map. * * Note that this strategy does not perform any movement by itself. * It only sets the camera position to within the given bounds when the camera has gone beyond them. @@ -254,7 +254,7 @@ export const CameraEvents = { /** * Cameras * - * [[Camera]] is the base class for all Excalibur cameras. Cameras are used + * {@apilink Camera} is the base class for all Excalibur cameras. Cameras are used * to move around your game and set focus. They are used to determine * what is "off screen" and can be used to scale the game. * @@ -382,7 +382,7 @@ export class Camera implements CanUpdate, CanInitialize { } /** - * Set the camera's x position (cannot be set when following an [[Actor]] or when moving) + * Set the camera's x position (cannot be set when following an {@apilink Actor} or when moving) */ public set x(value: number) { if (!this._follow && !this._cameraMoving) { @@ -398,7 +398,7 @@ export class Camera implements CanUpdate, CanInitialize { } /** - * Set the camera's y position (cannot be set when following an [[Actor]] or when moving) + * Set the camera's y position (cannot be set when following an {@apilink Actor} or when moving) */ public set y(value: number) { if (!this._follow && !this._cameraMoving) { @@ -461,9 +461,9 @@ export class Camera implements CanUpdate, CanInitialize { * This moves the camera focal point to the specified position using specified easing function. Cannot move when following an Actor. * @param pos The target position to move to * @param duration The duration in milliseconds the move should last - * @param [easingFn] An optional easing function ([[ex.EasingFunctions.EaseInOutCubic]] by default) - * @returns A [[Promise]] that resolves when movement is finished, including if it's interrupted. - * The [[Promise]] value is the [[Vector]] of the target position. It will be rejected if a move cannot be made. + * @param [easingFn] An optional easing function ({@apilink EasingFunctions.EaseInOutCubic} by default) + * @returns A {@apilink Promise} that resolves when movement is finished, including if it's interrupted. + * The {@apilink Promise} value is the {@apilink Vector} of the target position. It will be rejected if a move cannot be made. */ public move(pos: Vector, duration: number, easingFn: EasingFunction = EasingFunctions.EaseInOutCubic): Promise { if (typeof easingFn !== 'function') { @@ -547,7 +547,7 @@ export class Camera implements CanUpdate, CanInitialize { /** * Adds a new camera strategy to this camera - * @param cameraStrategy Instance of an [[CameraStrategy]] + * @param cameraStrategy Instance of an {@apilink CameraStrategy} */ public addStrategy(cameraStrategy: CameraStrategy) { this._cameraStrategies.push(cameraStrategy); @@ -555,7 +555,7 @@ export class Camera implements CanUpdate, CanInitialize { /** * Removes a camera strategy by reference - * @param cameraStrategy Instance of an [[CameraStrategy]] + * @param cameraStrategy Instance of an {@apilink CameraStrategy} */ public removeStrategy(cameraStrategy: CameraStrategy) { removeItemFromArray(cameraStrategy, this._cameraStrategies); @@ -571,7 +571,7 @@ export class Camera implements CanUpdate, CanInitialize { /** * It is not recommended that internal excalibur methods be overridden, do so at your own risk. * - * Internal _preupdate handler for [[onPreUpdate]] lifecycle event + * Internal _preupdate handler for {@apilink onPreUpdate} lifecycle event * @internal */ public _preupdate(engine: Engine, delta: number): void { @@ -591,7 +591,7 @@ export class Camera implements CanUpdate, CanInitialize { /** * It is not recommended that internal excalibur methods be overridden, do so at your own risk. * - * Internal _preupdate handler for [[onPostUpdate]] lifecycle event + * Internal _preupdate handler for {@apilink onPostUpdate} lifecycle event * @internal */ public _postupdate(engine: Engine, delta: number): void { diff --git a/src/engine/Collision/BodyComponent.ts b/src/engine/Collision/BodyComponent.ts index 91b0b96c7..0a8e096d1 100644 --- a/src/engine/Collision/BodyComponent.ts +++ b/src/engine/Collision/BodyComponent.ts @@ -101,7 +101,7 @@ export class BodyComponent extends Component implements Clonable } /** - * Collision type for the rigidbody physics simulation, by default [[CollisionType.PreventCollision]] + * Collision type for the rigidbody physics simulation, by default {@apilink CollisionType.PreventCollision} */ public collisionType: CollisionType = CollisionType.PreventCollision; @@ -125,14 +125,14 @@ export class BodyComponent extends Component implements Clonable } /** - * The inverse mass (1/mass) of the body. If [[CollisionType.Fixed]] this is 0, meaning "infinite" mass + * The inverse mass (1/mass) of the body. If {@apilink CollisionType.Fixed} this is 0, meaning "infinite" mass */ public get inverseMass(): number { return this.collisionType === CollisionType.Fixed ? 0 : 1 / this.mass; } /** - * Amount of "motion" the body has before sleeping. If below [[Physics.sleepEpsilon]] it goes to "sleep" + * Amount of "motion" the body has before sleeping. If below {@apilink Physics.sleepEpsilon} it goes to "sleep" */ public sleepMotion: number; @@ -167,7 +167,7 @@ export class BodyComponent extends Component implements Clonable } /** - * Update body's [[BodyComponent.sleepMotion]] for the purpose of sleeping + * Update body's {@apilink BodyComponent.sleepMotion} for the purpose of sleeping */ public updateMotion() { if (this._sleeping) { @@ -184,7 +184,7 @@ export class BodyComponent extends Component implements Clonable private _cachedInertia: number; /** - * Get the moment of inertia from the [[ColliderComponent]] + * Get the moment of inertia from the {@apilink ColliderComponent} */ public get inertia() { if (this._cachedInertia) { @@ -210,7 +210,7 @@ export class BodyComponent extends Component implements Clonable private _cachedInverseInertia: number; /** - * Get the inverse moment of inertial from the [[ColliderComponent]]. If [[CollisionType.Fixed]] this is 0, meaning "infinite" mass + * Get the inverse moment of inertial from the {@apilink ColliderComponent}. If {@apilink CollisionType.Fixed} this is 0, meaning "infinite" mass */ public get inverseInertia() { if (this._cachedInverseInertia) { @@ -231,7 +231,7 @@ export class BodyComponent extends Component implements Clonable public friction: number = 0.99; /** - * Should use global gravity [[Physics.gravity]] in it's physics simulation, default is true + * Should use global gravity {@apilink Physics.gravity} in it's physics simulation, default is true */ public useGravity: boolean = true; @@ -274,7 +274,7 @@ export class BodyComponent extends Component implements Clonable /** * The (x, y) position of the actor this will be in the middle of the actor if the - * [[Actor.anchor]] is set to (0.5, 0.5) which is default. + * {@apilink Actor.anchor} is set to (0.5, 0.5) which is default. * If you want the (x, y) position to be the top left of the actor specify an anchor of (0, 0). */ public get globalPos(): Vector { @@ -330,7 +330,7 @@ export class BodyComponent extends Component implements Clonable } /** - * Gets/sets the acceleration of the actor from the last frame. This does not include the global acc [[Physics.acc]]. + * Gets/sets the acceleration of the actor from the last frame. This does not include the global acc {@apilink Physics.acc}. */ public oldAcc: Vector = Vector.Zero; diff --git a/src/engine/Collision/BoundingBox.ts b/src/engine/Collision/BoundingBox.ts index d29591956..7f99c7b68 100644 --- a/src/engine/Collision/BoundingBox.ts +++ b/src/engine/Collision/BoundingBox.ts @@ -45,7 +45,7 @@ export class BoundingBox { } /** - * Returns a new instance of [[BoundingBox]] that is a copy of the current instance + * Returns a new instance of {@apilink BoundingBox} that is a copy of the current instance */ public clone(dest?: BoundingBox): BoundingBox { const result = dest || new BoundingBox(0, 0, 0, 0); @@ -196,7 +196,7 @@ export class BoundingBox { } /** - * Transform the axis aligned bounding box by a [[Matrix]], producing a new axis aligned bounding box + * Transform the axis aligned bounding box by a {@apilink Matrix}, producing a new axis aligned bounding box * @param matrix */ public transform(matrix: AffineMatrix) { @@ -380,7 +380,7 @@ export class BoundingBox { * Test wether this bounding box intersects with another returning * the intersection vector that can be used to resolve the collision. If there * is no intersection null is returned. - * @param other Other [[BoundingBox]] to test intersection with + * @param other Other {@apilink BoundingBox} to test intersection with * @returns A Vector in the direction of the current BoundingBox, this <- other */ public intersect(other: BoundingBox): Vector { diff --git a/src/engine/Collision/ColliderComponent.ts b/src/engine/Collision/ColliderComponent.ts index 9a579eae7..a057ab667 100644 --- a/src/engine/Collision/ColliderComponent.ts +++ b/src/engine/Collision/ColliderComponent.ts @@ -219,7 +219,7 @@ export class ColliderComponent extends Component { } /** - * Sets up a [[PolygonCollider|polygon]] collision geometry based on a list of of points relative + * Sets up a {@apilink PolygonCollider | `polygon`} collision geometry based on a list of of points relative * to the anchor of the associated actor * of this physics body. * @@ -233,7 +233,7 @@ export class ColliderComponent extends Component { } /** - * Sets up a [[Circle|circle collision geometry]] as the only collider with a specified radius in pixels. + * Sets up a {@apilink Circle | `circle collision geometry`} as the only collider with a specified radius in pixels. * * By default, the box is center is at (0, 0) which means it is centered around the actors anchor. */ @@ -243,7 +243,7 @@ export class ColliderComponent extends Component { } /** - * Sets up an [[Edge|edge collision geometry]] with a start point and an end point relative to the anchor of the associated actor + * Sets up an {@apilink Edge | `edge collision geometry`} with a start point and an end point relative to the anchor of the associated actor * of this physics body. * * By default, the box is center is at (0, 0) which means it is centered around the actors anchor. @@ -254,7 +254,7 @@ export class ColliderComponent extends Component { } /** - * Setups up a [[CompositeCollider]] which can define any arbitrary set of excalibur colliders + * Setups up a {@apilink CompositeCollider} which can define any arbitrary set of excalibur colliders * @param colliders */ useCompositeCollider(colliders: Collider[]): CompositeCollider { diff --git a/src/engine/Collision/Colliders/Collider.ts b/src/engine/Collision/Colliders/Collider.ts index 9a2a411e0..5de0ac5c5 100644 --- a/src/engine/Collision/Colliders/Collider.ts +++ b/src/engine/Collision/Colliders/Collider.ts @@ -32,7 +32,7 @@ export abstract class Collider implements Clonable { /** * Returns a boolean indicating whether this body collided with * or was in stationary contact with - * the body of the other [[Collider]] + * the body of the other {@apilink Collider} */ public touching(other: Collider): boolean { const contact = this.collide(other); diff --git a/src/engine/Collision/Colliders/CompositeCollider.ts b/src/engine/Collision/Colliders/CompositeCollider.ts index aac5f703f..b73130936 100644 --- a/src/engine/Collision/Colliders/CompositeCollider.ts +++ b/src/engine/Collision/Colliders/CompositeCollider.ts @@ -31,7 +31,7 @@ export class CompositeCollider extends Collider { * Treat composite collider's member colliders as either separate colliders for the purposes of onCollisionStart/onCollision * or as a single collider together. * - * This property can be overridden on individual [[CompositeColliders]]. + * This property can be overridden on individual {@apilink CompositeColliders}. * * For composites without gaps or small groups of colliders, you probably want 'together' * diff --git a/src/engine/Collision/Colliders/PolygonCollider.ts b/src/engine/Collision/Colliders/PolygonCollider.ts index ba01b6e95..41429fb51 100644 --- a/src/engine/Collision/Colliders/PolygonCollider.ts +++ b/src/engine/Collision/Colliders/PolygonCollider.ts @@ -129,7 +129,7 @@ export class PolygonCollider extends Collider { /** * Returns if the polygon collider is convex, Excalibur does not handle non-convex collision shapes. - * Call [[Polygon.triangulate]] to generate a [[CompositeCollider]] from this non-convex shape + * Call {@apilink Polygon.triangulate} to generate a {@apilink CompositeCollider} from this non-convex shape */ public isConvex(): boolean { // From SO: https://stackoverflow.com/a/45372025 @@ -172,7 +172,7 @@ export class PolygonCollider extends Collider { } /** - * Tessellates the polygon into a triangle fan as a [[CompositeCollider]] of triangle polygons + * Tessellates the polygon into a triangle fan as a {@apilink CompositeCollider} of triangle polygons */ public tessellate(): CompositeCollider { const polygons: Vector[][] = []; @@ -186,7 +186,7 @@ export class PolygonCollider extends Collider { /** * Triangulate the polygon collider using the "Ear Clipping" algorithm. - * Returns a new [[CompositeCollider]] made up of smaller triangles. + * Returns a new {@apilink CompositeCollider} made up of smaller triangles. */ public triangulate(): CompositeCollider { // https://www.youtube.com/watch?v=hTJFcHutls8 diff --git a/src/engine/Collision/Colliders/Shape.ts b/src/engine/Collision/Colliders/Shape.ts index 3ddcb34e3..da92ad2ee 100644 --- a/src/engine/Collision/Colliders/Shape.ts +++ b/src/engine/Collision/Colliders/Shape.ts @@ -11,7 +11,7 @@ import { Logger } from '../..'; */ export class Shape { /** - * Creates a box collider, under the hood defines a [[PolygonCollider]] collider + * Creates a box collider, under the hood defines a {@apilink PolygonCollider} collider * @param width Width of the box * @param height Height of the box * @param anchor Anchor of the box (default (.5, .5)) which positions the box relative to the center of the collider's position @@ -25,7 +25,7 @@ export class Shape { } /** - * Creates a new [[PolygonCollider|arbitrary polygon]] collider + * Creates a new {@apilink PolygonCollider | `arbitrary polygon`} collider * * PolygonColliders are useful for creating convex polygon shapes * @param points Points specified in counter clockwise @@ -40,7 +40,7 @@ export class Shape { } /** - * Creates a new [[CircleCollider|circle]] collider + * Creates a new {@apilink CircleCollider | `circle`} collider * * Circle colliders are useful for balls, or to make collisions more forgiving on sharp edges * @param radius Radius of the circle collider @@ -54,7 +54,7 @@ export class Shape { } /** - * Creates a new [[EdgeCollider|edge]] collider + * Creates a new {@apilink EdgeCollider | `edge`} collider * * Edge colliders are useful for floors, walls, and other barriers * @param begin Beginning of the edge in local coordinates to the collider @@ -68,7 +68,7 @@ export class Shape { } /** - * Creates a new capsule shaped [[CompositeCollider]] using 2 circles and a box + * Creates a new capsule shaped {@apilink CompositeCollider} using 2 circles and a box * * Capsule colliders are useful for platformers with incline or jagged floors to have a smooth * player experience. diff --git a/src/engine/Collision/Detection/SpatialPartitionStrategy.ts b/src/engine/Collision/Detection/SpatialPartitionStrategy.ts index e48ff5359..0711da01b 100644 --- a/src/engine/Collision/Detection/SpatialPartitionStrategy.ts +++ b/src/engine/Collision/Detection/SpatialPartitionStrategy.ts @@ -1,10 +1,10 @@ /** * Possible collision resolution strategies * - * The default is [[SolverStrategy.Arcade]] which performs simple axis aligned arcade style physics. This is useful for things + * The default is {@apilink SolverStrategy.Arcade} which performs simple axis aligned arcade style physics. This is useful for things * like platformers or top down games. * - * More advanced rigid body physics are enabled by setting [[SolverStrategy.Realistic]] which allows for complicated + * More advanced rigid body physics are enabled by setting {@apilink SolverStrategy.Realistic} which allows for complicated * simulated physical interactions. */ export enum SpatialPartitionStrategy { diff --git a/src/engine/Collision/Group/CollisionGroup.ts b/src/engine/Collision/Group/CollisionGroup.ts index 31853ff3c..50b824bba 100644 --- a/src/engine/Collision/Group/CollisionGroup.ts +++ b/src/engine/Collision/Group/CollisionGroup.ts @@ -1,7 +1,7 @@ import { CollisionGroupManager } from './CollisionGroupManager'; /** - * CollisionGroups indicate like members that do not collide with each other. Use [[CollisionGroupManager]] to create [[CollisionGroup]]s + * CollisionGroups indicate like members that do not collide with each other. Use {@apilink CollisionGroupManager} to create {@apilink CollisionGroup}s * * For example: * @@ -45,7 +45,7 @@ import { CollisionGroupManager } from './CollisionGroupManager'; */ export class CollisionGroup { /** - * The `All` [[CollisionGroup]] is a special group that collides with all other groups including itself, + * The `All` {@apilink CollisionGroup} is a special group that collides with all other groups including itself, * it is the default collision group on colliders. */ public static All = new CollisionGroup('Collide with all groups', -1, -1); @@ -55,7 +55,7 @@ export class CollisionGroup { private _mask: number; /** - * STOP!!** It is preferred that [[CollisionGroupManager.create]] is used to create collision groups + * STOP!!** It is preferred that {@apilink CollisionGroupManager.create} is used to create collision groups * unless you know how to construct the proper bitmasks. See https://github.com/excaliburjs/Excalibur/issues/1091 for more info. * @param name Name of the collision group * @param category 32 bit category for the group, should be a unique power of 2. For example `0b001` or `0b010` diff --git a/src/engine/Collision/Physics.ts b/src/engine/Collision/Physics.ts index 6bd2bf9f0..51a01cec5 100644 --- a/src/engine/Collision/Physics.ts +++ b/src/engine/Collision/Physics.ts @@ -4,7 +4,7 @@ import { SolverStrategy } from './SolverStrategy'; /** * Possible broadphase collision pair identification strategies * - * The default strategy is [[BroadphaseStrategy.DynamicAABBTree]] which uses a binary tree of axis-aligned bounding boxes to identify + * The default strategy is {@apilink BroadphaseStrategy.DynamicAABBTree} which uses a binary tree of axis-aligned bounding boxes to identify * potential collision pairs which is O(nlog(n)) faster. * @deprecated Unused in Excalibur, will be removed in v0.30 */ @@ -21,14 +21,14 @@ export enum Integrator { } /** - * The [[Physics]] object is the global configuration object for all Excalibur physics. + * The {@apilink Physics} object is the global configuration object for all Excalibur physics. * @deprecated Use engine args to configure Physics `new ex.Engine({physics: {...}})`, will be removed in v0.30 */ /* istanbul ignore next */ export class Physics { /** - * Global acceleration that is applied to all vanilla actors that have a [[CollisionType.Active|active]] collision type. - * Global acceleration won't effect [[Label|labels]], [[ScreenElement|ui actors]], or [[Trigger|triggers]] in Excalibur. + * Global acceleration that is applied to all vanilla actors that have a {@apilink CollisionType.Active | `active`} collision type. + * Global acceleration won't effect {@apilink Label | `labels`}, {@apilink ScreenElement | `ui actors`}, or {@apilink Trigger | `triggers`} in Excalibur. * * This is a great way to globally simulate effects like gravity. * @deprecated Use engine args to configure Physics `new ex.Engine({physics: {...}})`, will be removed in v0.30 @@ -53,7 +53,7 @@ export class Physics { /** * Gets or sets the broadphase pair identification strategy. * - * The default strategy is [[BroadphaseStrategy.DynamicAABBTree]] which uses a binary tree of axis-aligned bounding boxes to identify + * The default strategy is {@apilink BroadphaseStrategy.DynamicAABBTree} which uses a binary tree of axis-aligned bounding boxes to identify * potential collision pairs which is O(nlog(n)) faster. * @deprecated Use engine args to configure Physics `new ex.Engine({physics: {...}})`, will be removed in v0.30 */ @@ -62,9 +62,9 @@ export class Physics { /** * Gets or sets the global collision resolution strategy (narrowphase). * - * The default is [[SolverStrategy.Arcade]] which performs simple axis aligned arcade style physics. + * The default is {@apilink SolverStrategy.Arcade} which performs simple axis aligned arcade style physics. * - * More advanced rigid body physics are enabled by setting [[SolverStrategy.Realistic]] which allows for complicated + * More advanced rigid body physics are enabled by setting {@apilink SolverStrategy.Realistic} which allows for complicated * simulated physical interactions. * @deprecated Use engine args to configure Physics `new ex.Engine({physics: {...}})`, will be removed in v0.30 */ diff --git a/src/engine/Collision/PhysicsConfig.ts b/src/engine/Collision/PhysicsConfig.ts index e29bb8e31..56d9e6bbf 100644 --- a/src/engine/Collision/PhysicsConfig.ts +++ b/src/engine/Collision/PhysicsConfig.ts @@ -36,20 +36,20 @@ export interface PhysicsConfig { */ enabled?: boolean; /** - * Configure gravity that applies to all [[CollisionType.Active]] bodies. + * Configure gravity that applies to all {@apilink CollisionType.Active} bodies. * * This is acceleration in pixels/sec^2 * * Default vec(0, 0) * - * [[BodyComponent.useGravity]] to opt out + * {@apilink BodyComponent.useGravity} to opt out */ gravity?: Vector; /** * Configure the type of physics simulation you would like * - * * [[SolverStrategy.Arcade]] is suitable for games where you might be doing platforming or top down movement. - * * [[SolverStrategy.Realistic]] is where you need objects to bounce off each other and respond like real world objects. + * * {@apilink SolverStrategy.Arcade} is suitable for games where you might be doing platforming or top down movement. + * * {@apilink SolverStrategy.Realistic} is where you need objects to bounce off each other and respond like real world objects. * * Default is Arcade */ @@ -70,7 +70,7 @@ export interface PhysicsConfig { * Treat composite collider's member colliders as either separate colliders for the purposes of onCollisionStart/onCollision * or as a single collider together. * - * This property can be overridden on individual [[CompositeColliders]]. + * This property can be overridden on individual {@apilink CompositeColliders}. * * For composites without gaps or small groups of colliders, you probably want 'together' * @@ -158,24 +158,24 @@ export interface PhysicsConfig { dynamicTree?: DynamicTreeConfig; /** - * Configure the [[ArcadeSolver]] + * Configure the {@apilink ArcadeSolver} */ arcade?: { /** - * Hints the [[ArcadeSolver]] to preferentially solve certain contact directions first. + * Hints the {@apilink ArcadeSolver} to preferentially solve certain contact directions first. * * Options: - * * Solve [[ContactSolveBias.VerticalFirst]] which will do vertical contact resolution first (useful for platformers + * * Solve {@apilink ContactSolveBias.VerticalFirst} which will do vertical contact resolution first (useful for platformers * with up/down gravity) - * * Solve [[ContactSolveBias.HorizontalFirst]] which will do horizontal contact resolution first (useful for games with + * * Solve {@apilink ContactSolveBias.HorizontalFirst} which will do horizontal contact resolution first (useful for games with * left/right forces) - * * By default [[ContactSolveBias.None]] which sorts by distance + * * By default {@apilink ContactSolveBias.None} which sorts by distance */ contactSolveBias?: ContactSolveBias; }; /** - * Configure the [[RealisticSolver]] + * Configure the {@apilink RealisticSolver} */ realistic?: { /** diff --git a/src/engine/Collision/Solver/ContactBias.ts b/src/engine/Collision/Solver/ContactBias.ts index 8dc8d314e..4d15e0760 100644 --- a/src/engine/Collision/Solver/ContactBias.ts +++ b/src/engine/Collision/Solver/ContactBias.ts @@ -16,7 +16,7 @@ export interface ContactBias { } /** - * Vertical First contact solve bias Used by the [[ArcadeSolver]] to sort contacts + * Vertical First contact solve bias Used by the {@apilink ArcadeSolver} to sort contacts */ export const VerticalFirst: ContactBias = { vertical: 1, @@ -24,7 +24,7 @@ export const VerticalFirst: ContactBias = { } as const; /** - * Horizontal First contact solve bias Used by the [[ArcadeSolver]] to sort contacts + * Horizontal First contact solve bias Used by the {@apilink ArcadeSolver} to sort contacts */ export const HorizontalFirst: ContactBias = { horizontal: 1, @@ -32,7 +32,7 @@ export const HorizontalFirst: ContactBias = { } as const; /** - * None value, [[ArcadeSolver]] sorts contacts using distance by default + * None value, {@apilink ArcadeSolver} sorts contacts using distance by default */ export const None: ContactBias = { horizontal: 0, diff --git a/src/engine/Collision/SolverStrategy.ts b/src/engine/Collision/SolverStrategy.ts index 09a22532e..b9f836b09 100644 --- a/src/engine/Collision/SolverStrategy.ts +++ b/src/engine/Collision/SolverStrategy.ts @@ -1,10 +1,10 @@ /** * Possible collision resolution strategies * - * The default is [[SolverStrategy.Arcade]] which performs simple axis aligned arcade style physics. This is useful for things + * The default is {@apilink SolverStrategy.Arcade} which performs simple axis aligned arcade style physics. This is useful for things * like platformers or top down games. * - * More advanced rigid body physics are enabled by setting [[SolverStrategy.Realistic]] which allows for complicated + * More advanced rigid body physics are enabled by setting {@apilink SolverStrategy.Realistic} which allows for complicated * simulated physical interactions. */ export enum SolverStrategy { diff --git a/src/engine/Color.ts b/src/engine/Color.ts index d20c41636..cd2bb9fe0 100644 --- a/src/engine/Color.ts +++ b/src/engine/Color.ts @@ -1,7 +1,7 @@ /** - * Provides standard colors (e.g. [[Color.Black]]) + * Provides standard colors (e.g. {@apilink Color.Black}) * but you can also create custom colors using RGB, HSL, or Hex. Also provides - * useful color operations like [[Color.lighten]], [[Color.darken]], and more. + * useful color operations like {@apilink Color.lighten}, {@apilink Color.darken}, and more. */ export class Color { /** diff --git a/src/engine/Debug/DebugConfig.ts b/src/engine/Debug/DebugConfig.ts index 3e65e019e..7c98fa68f 100644 --- a/src/engine/Debug/DebugConfig.ts +++ b/src/engine/Debug/DebugConfig.ts @@ -22,7 +22,7 @@ export interface FrameStatistics { id: number; /** - * Gets the frame's delta (time since last frame scaled by [[Engine.timescale]]) (in ms) + * Gets the frame's delta (time since last frame scaled by {@apilink Engine.timescale}) (in ms) */ delta: number; @@ -149,7 +149,7 @@ export interface GraphicsStatistics { /** * Debug statistics and flags for Excalibur. If polling these values, it would be - * best to do so on the `postupdate` event for [[Engine]], after all values have been + * best to do so on the `postupdate` event for {@apilink Engine}, after all values have been * updated during a frame. */ export class DebugConfig { @@ -162,7 +162,7 @@ export class DebugConfig { } /** - * Switch the current excalibur clock with the [[TestClock]] and return + * Switch the current excalibur clock with the {@apilink TestClock} and return * it in the same running state. * * This is useful when you need to debug frame by frame. @@ -181,7 +181,7 @@ export class DebugConfig { } /** - * Switch the current excalibur clock with the [[StandardClock]] and + * Switch the current excalibur clock with the {@apilink StandardClock} and * return it in the same running state. * * This is useful when you need to switch back to normal mode after @@ -205,20 +205,20 @@ export class DebugConfig { */ public stats: DebugStats = { /** - * Current frame statistics. Engine reuses this instance, use [[FrameStats.clone]] to copy frame stats. - * Best accessed on [[postframe]] event. See [[FrameStats]] + * Current frame statistics. Engine reuses this instance, use {@apilink FrameStats.clone} to copy frame stats. + * Best accessed on {@apilink postframe} event. See {@apilink FrameStats} */ currFrame: new FrameStats(), /** - * Previous frame statistics. Engine reuses this instance, use [[FrameStats.clone]] to copy frame stats. - * Best accessed on [[preframe]] event. Best inspected on engine event `preframe`. See [[FrameStats]] + * Previous frame statistics. Engine reuses this instance, use {@apilink FrameStats.clone} to copy frame stats. + * Best accessed on {@apilink preframe} event. Best inspected on engine event `preframe`. See {@apilink FrameStats} */ prevFrame: new FrameStats() }; /** - * Correct or simulate color blindness using [[ColorBlindnessPostProcessor]]. + * Correct or simulate color blindness using {@apilink ColorBlindnessPostProcessor}. * @warning Will reduce FPS. */ public colorBlindMode: ColorBlindFlags; @@ -375,7 +375,7 @@ export class DebugConfig { } /** - * Implementation of a frame's stats. Meant to have values copied via [[FrameStats.reset]], avoid + * Implementation of a frame's stats. Meant to have values copied via {@apilink FrameStats.reset}, avoid * creating instances of this every frame. */ export class FrameStats implements FrameStatistics { diff --git a/src/engine/Director/Director.ts b/src/engine/Director/Director.ts index 1b128667b..de443f407 100644 --- a/src/engine/Director/Director.ts +++ b/src/engine/Director/Director.ts @@ -131,7 +131,7 @@ export class Director { mainLoader: DefaultLoader; /** - * The default [[Scene]] of the game, use [[Engine.goToScene]] to transition to different scenes. + * The default {@apilink Scene} of the game, use {@apilink Engine.goToScene} to transition to different scenes. */ public readonly rootScene: Scene; diff --git a/src/engine/Director/Loader.ts b/src/engine/Director/Loader.ts index 8c03e0276..a34bfb052 100644 --- a/src/engine/Director/Loader.ts +++ b/src/engine/Director/Loader.ts @@ -31,7 +31,7 @@ export interface LoaderOptions extends DefaultLoaderOptions { * one time. The loader must be passed to the engine in order to * trigger the loading progress bar. * - * The [[Loader]] itself implements [[Loadable]] so you can load loaders. + * The {@apilink Loader} itself implements {@apilink Loadable} so you can load loaders. * * ## Example: Pre-loading resources for a game * @@ -124,7 +124,7 @@ export class Loader extends DefaultLoader { public loadingBarPosition: Vector | null; /** - * Gets or sets the color of the loading bar, default is [[Color.White]] + * Gets or sets the color of the loading bar, default is {@apilink Color.White} */ public loadingBarColor: Color = Color.White; diff --git a/src/engine/Engine.ts b/src/engine/Engine.ts index 78a285500..d8d331481 100644 --- a/src/engine/Engine.ts +++ b/src/engine/Engine.ts @@ -120,13 +120,13 @@ export interface EngineOptions { /** * Optionally configure the width & height of the viewport in css pixels. - * Use `viewport` instead of [[EngineOptions.width]] and [[EngineOptions.height]], or vice versa. + * Use `viewport` instead of {@apilink EngineOptions.width} and {@apilink EngineOptions.height}, or vice versa. */ viewport?: ViewportDimension; /** * Optionally specify the size the logical pixel resolution, if not specified it will be width x height. - * See [[Resolution]] for common presets. + * See {@apilink Resolution} for common presets. */ resolution?: Resolution; @@ -134,12 +134,12 @@ export interface EngineOptions { * Optionally specify antialiasing (smoothing), by default true (smooth pixels) * * * `true` - useful for high resolution art work you would like smoothed, this also hints excalibur to load images - * with default blending [[ImageFiltering.Blended]] + * with default blending {@apilink ImageFiltering.Blended} * * * `false` - useful for pixel art style art work you would like sharp, this also hints excalibur to load images - * with default blending [[ImageFiltering.Pixel]] + * with default blending {@apilink ImageFiltering.Pixel} * - * * [[AntialiasOptions]] Optionally deeply configure the different antialiasing settings, **WARNING** thar be dragons here. + * * {@apilink AntialiasOptions} Optionally deeply configure the different antialiasing settings, **WARNING** thar be dragons here. * It is recommended you stick to `true` or `false` unless you understand what you're doing and need to control rendering to * a high degree. */ @@ -152,7 +152,7 @@ export interface EngineOptions { * * * `false` - garbage collection is completely disabled (not recommended) * - * * [[GarbageCollectionOptions]] Optionally deeply configure garbage collection settings, **WARNING** thar be dragons here. + * * {@apilink GarbageCollectionOptions} Optionally deeply configure garbage collection settings, **WARNING** thar be dragons here. * It is recommended you stick to `true` or `false` unless you understand what you're doing, it is possible to get into a downward * spiral if collection timings are set too low where you are stuck in repeated collection. */ @@ -196,7 +196,7 @@ export interface EngineOptions { /** * Optionally upscale the number of pixels in the canvas. Normally only useful if you need a smoother look to your assets, especially - * [[Text]] or Pixel Art assets. + * {@apilink Text} or Pixel Art assets. * * **WARNING** It is recommended you try using `antialiasing: true` before adjusting pixel ratio. Pixel ratio will consume more memory * and on mobile may break if the internal size of the canvas exceeds 4k pixels in width or height. @@ -226,8 +226,8 @@ export interface EngineOptions { snapToPixel?: boolean; /** - * The [[DisplayMode]] of the game, by default [[DisplayMode.FitScreen]] with aspect ratio 4:3 (800x600). - * Depending on this value, [[width]] and [[height]] may be ignored. + * The {@apilink DisplayMode} of the game, by default {@apilink DisplayMode.FitScreen} with aspect ratio 4:3 (800x600). + * Depending on this value, {@apilink width} and {@apilink height} may be ignored. */ displayMode?: DisplayMode; @@ -348,12 +348,12 @@ export interface EngineOptions { * * If false, Excalibur will not produce a physics simulation. * - * Default is configured to use [[SolverStrategy.Arcade]] physics simulation + * Default is configured to use {@apilink SolverStrategy.Arcade} physics simulation */ physics?: boolean | PhysicsConfig; /** - * Optionally specify scenes with their transitions and loaders to excalibur's scene [[Director]] + * Optionally specify scenes with their transitions and loaders to excalibur's scene {@apilink Director} * * Scene transitions can can overridden dynamically by the `Scene` or by the call to `.goToScene` */ @@ -363,7 +363,7 @@ export interface EngineOptions { /** * The Excalibur Engine * - * The [[Engine]] is the main driver for a game. It is responsible for + * The {@apilink Engine} is the main driver for a game. It is responsible for * starting/stopping the game, maintaining state, transmitting events, * loading resources, and managing the scene. */ @@ -554,28 +554,28 @@ export class Engine implements CanInitialize, public debug: DebugConfig; /** - * Access [[stats]] that holds frame statistics. + * Access {@apilink stats} that holds frame statistics. */ public get stats(): DebugStats { return this.debug.stats; } /** - * The current [[Scene]] being drawn and updated on screen + * The current {@apilink Scene} being drawn and updated on screen */ public get currentScene(): Scene { return this.director.currentScene; } /** - * The current [[Scene]] being drawn and updated on screen + * The current {@apilink Scene} being drawn and updated on screen */ public get currentSceneName(): string { return this.director.currentSceneName; } /** - * The default [[Scene]] of the game, use [[Engine.goToScene]] to transition to different scenes. + * The default {@apilink Scene} of the game, use {@apilink Engine.goToScene} to transition to different scenes. */ public get rootScene(): Scene { return this.director.rootScene; @@ -596,7 +596,7 @@ export class Engine implements CanInitialize, } /** - * Indicates the current [[DisplayMode]] of the engine. + * Indicates the current {@apilink DisplayMode} of the engine. */ public get displayMode(): DisplayMode { return this.screen.displayMode; @@ -696,7 +696,7 @@ export class Engine implements CanInitialize, } /** - * Default [[EngineOptions]] + * Default {@apilink EngineOptions} */ private static _DEFAULT_ENGINE_OPTIONS: EngineOptions = { width: 0, @@ -729,9 +729,9 @@ export class Engine implements CanInitialize, public readonly _originalDisplayMode: DisplayMode; /** - * Creates a new game using the given [[EngineOptions]]. By default, if no options are provided, + * Creates a new game using the given {@apilink EngineOptions}. By default, if no options are provided, * the game will be rendered full screen (taking up all available browser window space). - * You can customize the game rendering through [[EngineOptions]]. + * You can customize the game rendering through {@apilink EngineOptions}. * * Example: * @@ -1207,23 +1207,23 @@ O|===|* >________________>\n\ } /** - * Adds a [[Timer]] to the [[currentScene]]. - * @param timer The timer to add to the [[currentScene]]. + * Adds a {@apilink Timer} to the {@apilink currentScene}. + * @param timer The timer to add to the {@apilink currentScene}. */ public addTimer(timer: Timer): Timer { return this.currentScene.addTimer(timer); } /** - * Removes a [[Timer]] from the [[currentScene]]. - * @param timer The timer to remove to the [[currentScene]]. + * Removes a {@apilink Timer} from the {@apilink currentScene}. + * @param timer The timer to remove to the {@apilink currentScene}. */ public removeTimer(timer: Timer): Timer { return this.currentScene.removeTimer(timer); } /** - * Adds a [[Scene]] to the engine, think of scenes in Excalibur as you + * Adds a {@apilink Scene} to the engine, think of scenes in Excalibur as you * would levels or menus. * @param key The name of the scene, must be unique * @param scene The scene to add to the engine @@ -1234,7 +1234,7 @@ O|===|* >________________>\n\ } /** - * Removes a [[Scene]] instance from the engine + * Removes a {@apilink Scene} instance from the engine * @param scene The scene to remove */ public removeScene(scene: Scene | SceneConstructor): void; @@ -1251,39 +1251,39 @@ O|===|* >________________>\n\ } /** - * Adds a [[Scene]] to the engine, think of scenes in Excalibur as you + * Adds a {@apilink Scene} to the engine, think of scenes in Excalibur as you * would levels or menus. * @param sceneKey The key of the scene, must be unique * @param scene The scene to add to the engine */ public add(sceneKey: string, scene: Scene | SceneConstructor | SceneWithOptions): void; /** - * Adds a [[Timer]] to the [[currentScene]]. - * @param timer The timer to add to the [[currentScene]]. + * Adds a {@apilink Timer} to the {@apilink currentScene}. + * @param timer The timer to add to the {@apilink currentScene}. */ public add(timer: Timer): void; /** - * Adds a [[TileMap]] to the [[currentScene]], once this is done the TileMap + * Adds a {@apilink TileMap} to the {@apilink currentScene}, once this is done the TileMap * will be drawn and updated. */ public add(tileMap: TileMap): void; /** - * Adds an actor to the [[currentScene]] of the game. This is synonymous + * Adds an actor to the {@apilink currentScene} of the game. This is synonymous * to calling `engine.currentScene.add(actor)`. * * Actors can only be drawn if they are a member of a scene, and only - * the [[currentScene]] may be drawn or updated. - * @param actor The actor to add to the [[currentScene]] + * the {@apilink currentScene} may be drawn or updated. + * @param actor The actor to add to the {@apilink currentScene} */ public add(actor: Actor): void; public add(entity: Entity): void; /** - * Adds a [[ScreenElement]] to the [[currentScene]] of the game, + * Adds a {@apilink ScreenElement} to the {@apilink currentScene} of the game, * ScreenElements do not participate in collisions, instead the * remain in the same place on the screen. - * @param screenElement The ScreenElement to add to the [[currentScene]] + * @param screenElement The ScreenElement to add to the {@apilink currentScene} */ public add(screenElement: ScreenElement): void; public add(entity: any): void { @@ -1310,24 +1310,24 @@ O|===|* >________________>\n\ */ public remove(sceneKey: string): void; /** - * Removes a [[Timer]] from the [[currentScene]]. - * @param timer The timer to remove to the [[currentScene]]. + * Removes a {@apilink Timer} from the {@apilink currentScene}. + * @param timer The timer to remove to the {@apilink currentScene}. */ public remove(timer: Timer): void; /** - * Removes a [[TileMap]] from the [[currentScene]], it will no longer be drawn or updated. + * Removes a {@apilink TileMap} from the {@apilink currentScene}, it will no longer be drawn or updated. */ public remove(tileMap: TileMap): void; /** - * Removes an actor from the [[currentScene]] of the game. This is synonymous + * Removes an actor from the {@apilink currentScene} of the game. This is synonymous * to calling `engine.currentScene.removeChild(actor)`. * Actors that are removed from a scene will no longer be drawn or updated. - * @param actor The actor to remove from the [[currentScene]]. + * @param actor The actor to remove from the {@apilink currentScene}. */ public remove(actor: Actor): void; /** - * Removes a [[ScreenElement]] to the scene, it will no longer be drawn or updated - * @param screenElement The ScreenElement to remove from the [[currentScene]] + * Removes a {@apilink ScreenElement} to the scene, it will no longer be drawn or updated + * @param screenElement The ScreenElement to remove from the {@apilink currentScene} */ public remove(screenElement: ScreenElement): void; public remove(entity: any): void { @@ -1662,7 +1662,7 @@ O|===|* >________________>\n\ /** * Starts the internal game loop for Excalibur after loading * any provided assets. - * @param loader Optional [[Loader]] to use to load resources. The default loader is [[Loader]], + * @param loader Optional {@apilink Loader} to use to load resources. The default loader is {@apilink Loader}, * override to provide your own custom loader. * * Note: start() only resolves AFTER the user has clicked the play button @@ -1670,7 +1670,7 @@ O|===|* >________________>\n\ public async start(loader?: DefaultLoader): Promise; /** * Starts the internal game loop for Excalibur after configuring any routes, loaders, or transitions - * @param startOptions Optional [[StartOptions]] to configure the routes for scenes in Excalibur + * @param startOptions Optional {@apilink StartOptions} to configure the routes for scenes in Excalibur * * Note: start() only resolves AFTER the user has clicked the play button */ @@ -1828,7 +1828,7 @@ O|===|* >________________>\n\ * Another option available to you to load resources into the game. * Immediately after calling this the game will pause and the loading screen * will appear. - * @param loader Some [[Loadable]] such as a [[Loader]] collection, [[Sound]], or [[Texture]]. + * @param loader Some {@apilink Loadable} such as a {@apilink Loader} collection, {@apilink Sound}, or {@apilink Texture}. */ public async load(loader: DefaultLoader, hideLoader = false): Promise { await this.scope(async () => { diff --git a/src/engine/EntityComponentSystem/Component.ts b/src/engine/EntityComponentSystem/Component.ts index 906ffeb3a..142dffcf7 100644 --- a/src/engine/EntityComponentSystem/Component.ts +++ b/src/engine/EntityComponentSystem/Component.ts @@ -44,7 +44,7 @@ export abstract class Component { readonly dependencies?: ComponentCtor[]; /** - * Current owning [[Entity]], if any, of this component. Null if not added to any [[Entity]] + * Current owning {@apilink Entity}, if any, of this component. Null if not added to any {@apilink Entity} */ owner?: Entity = undefined; diff --git a/src/engine/EntityComponentSystem/Components/TransformComponent.ts b/src/engine/EntityComponentSystem/Components/TransformComponent.ts index 314b8b173..6ea865946 100644 --- a/src/engine/EntityComponentSystem/Components/TransformComponent.ts +++ b/src/engine/EntityComponentSystem/Components/TransformComponent.ts @@ -70,7 +70,7 @@ export class TransformComponent extends Component { private _coordPlane = CoordPlane.World; /** - * The [[CoordPlane|coordinate plane|]] for this transform for the entity. + * The {@apilink CoordPlane | `coordinate plane`} for this transform for the entity. */ public get coordPlane() { if (this._parentComponent) { diff --git a/src/engine/EntityComponentSystem/Entity.ts b/src/engine/EntityComponentSystem/Entity.ts index f20229d12..34df2636b 100644 --- a/src/engine/EntityComponentSystem/Entity.ts +++ b/src/engine/EntityComponentSystem/Entity.ts @@ -177,7 +177,7 @@ export class Entity implements OnIniti } /** - * Specifically get the tags on the entity from [[TagsComponent]] + * Specifically get the tags on the entity from {@apilink TagsComponent} */ public get tags(): Set { return this._tags; @@ -538,7 +538,7 @@ export class Entity implements OnIniti /** * It is not recommended that internal excalibur methods be overridden, do so at your own risk. * - * Internal _preupdate handler for [[onPreUpdate]] lifecycle event + * Internal _preupdate handler for {@apilink onPreUpdate} lifecycle event * @internal */ public _preupdate(engine: Engine, delta: number): void { @@ -549,7 +549,7 @@ export class Entity implements OnIniti /** * It is not recommended that internal excalibur methods be overridden, do so at your own risk. * - * Internal _preupdate handler for [[onPostUpdate]] lifecycle event + * Internal _preupdate handler for {@apilink onPostUpdate} lifecycle event * @internal */ public _postupdate(engine: Engine, delta: number): void { diff --git a/src/engine/EntityComponentSystem/System.ts b/src/engine/EntityComponentSystem/System.ts index ad0cebf9f..10277a129 100644 --- a/src/engine/EntityComponentSystem/System.ts +++ b/src/engine/EntityComponentSystem/System.ts @@ -11,7 +11,7 @@ export enum SystemType { } /** - * An Excalibur [[System]] that updates entities of certain types. + * An Excalibur {@apilink System} that updates entities of certain types. * Systems are scene specific * * @@ -33,7 +33,7 @@ export enum SystemType { */ export abstract class System { /** - * Determine whether the system is called in the [[SystemType.Update]] or the [[SystemType.Draw]] phase. Update is first, then Draw. + * Determine whether the system is called in the {@apilink SystemType.Update} or the {@apilink SystemType.Draw} phase. Update is first, then Draw. */ abstract readonly systemType: SystemType; diff --git a/src/engine/EntityComponentSystem/SystemManager.ts b/src/engine/EntityComponentSystem/SystemManager.ts index facbe846e..5725246bf 100644 --- a/src/engine/EntityComponentSystem/SystemManager.ts +++ b/src/engine/EntityComponentSystem/SystemManager.ts @@ -20,7 +20,7 @@ export function isSystemConstructor(x: any): x is SystemCtor { */ export class SystemManager { /** - * List of systems, to add a new system call [[SystemManager.addSystem]] + * List of systems, to add a new system call {@apilink SystemManager.addSystem} */ public systems: System[] = []; public initialized = false; diff --git a/src/engine/EventDispatcher.ts b/src/engine/EventDispatcher.ts index 118b3f8dc..f78462a46 100644 --- a/src/engine/EventDispatcher.ts +++ b/src/engine/EventDispatcher.ts @@ -2,7 +2,7 @@ import { GameEvent } from './Events'; import { Eventable } from './Interfaces/Evented'; /** - * @deprecated Use [[EventEmitter]] will be removed in v0.29.0 + * @deprecated Use {@apilink EventEmitter} will be removed in v0.29.0 */ export class EventDispatcher implements Eventable { private _handlers: { [key: string]: { (event: GameEvent): void }[] } = {}; diff --git a/src/engine/Events.ts b/src/engine/Events.ts index 97bf1ad5f..b945b2d58 100644 --- a/src/engine/Events.ts +++ b/src/engine/Events.ts @@ -379,7 +379,7 @@ export class PostFrameEvent extends GameEvent { } /** - * Event received when a gamepad is connected to Excalibur. [[Gamepads]] receives this event. + * Event received when a gamepad is connected to Excalibur. {@apilink Gamepads} receives this event. */ export class GamepadConnectEvent extends GameEvent { constructor( @@ -392,7 +392,7 @@ export class GamepadConnectEvent extends GameEvent { } /** - * Event received when a gamepad is disconnected from Excalibur. [[Gamepads]] receives this event. + * Event received when a gamepad is disconnected from Excalibur. {@apilink Gamepads} receives this event. */ export class GamepadDisconnectEvent extends GameEvent { constructor( @@ -405,7 +405,7 @@ export class GamepadDisconnectEvent extends GameEvent { } /** - * Gamepad button event. See [[Gamepads]] for information on responding to controller input. [[Gamepad]] instances receive this event; + * Gamepad button event. See {@apilink Gamepads} for information on responding to controller input. {@apilink Gamepad} instances receive this event; */ export class GamepadButtonEvent extends GameEvent { /** @@ -422,7 +422,7 @@ export class GamepadButtonEvent extends GameEvent { } /** - * Gamepad axis event. See [[Gamepads]] for information on responding to controller input. [[Gamepad]] instances receive this event; + * Gamepad axis event. See {@apilink Gamepads} for information on responding to controller input. {@apilink Gamepad} instances receive this event; */ export class GamepadAxisEvent extends GameEvent { /** @@ -439,7 +439,7 @@ export class GamepadAxisEvent extends GameEvent { } /** - * Event received by the [[Engine]] when the browser window is visible on a screen. + * Event received by the {@apilink Engine} when the browser window is visible on a screen. */ export class VisibleEvent extends GameEvent { constructor(public target: Engine) { @@ -448,7 +448,7 @@ export class VisibleEvent extends GameEvent { } /** - * Event received by the [[Engine]] when the browser window is hidden from all screens. + * Event received by the {@apilink Engine} when the browser window is hidden from all screens. */ export class HiddenEvent extends GameEvent { constructor(public target: Engine) { @@ -457,7 +457,7 @@ export class HiddenEvent extends GameEvent { } /** - * Event thrown on an [[Actor|actor]] when a collision will occur this frame if it resolves + * Event thrown on an {@apilink Actor | `actor`} when a collision will occur this frame if it resolves */ export class PreCollisionEvent extends GameEvent { /** @@ -479,7 +479,7 @@ export class PreCollisionEvent extends GameEvent { /** @@ -547,7 +547,7 @@ export class CollisionPostSolveEvent { } /** - * Event thrown the first time an [[Actor|actor]] collides with another, after an actor is in contact normal collision events are fired. + * Event thrown the first time an {@apilink Actor | `actor`} collides with another, after an actor is in contact normal collision events are fired. */ export class CollisionStartEvent extends GameEvent { /** @@ -577,7 +577,7 @@ export class CollisionStartEvent extends GameEvent { /** @@ -603,7 +603,7 @@ export class CollisionEndEvent extends GameEvent { /** @@ -618,7 +618,7 @@ export class InitializeEvent extends GameEvent< } /** - * Event thrown on a [[Scene]] on activation + * Event thrown on a {@apilink Scene} on activation */ export class ActivateEvent extends GameEvent { /** @@ -633,7 +633,7 @@ export class ActivateEvent extends GameEvent { } /** - * Event thrown on a [[Scene]] on deactivation + * Event thrown on a {@apilink Scene} on deactivation */ export class DeactivateEvent extends GameEvent { /** @@ -648,7 +648,7 @@ export class DeactivateEvent extends GameEvent { } /** - * Event thrown on an [[Actor]] when the graphics bounds completely leaves the screen. + * Event thrown on an {@apilink Actor} when the graphics bounds completely leaves the screen. */ export class ExitViewPortEvent extends GameEvent { constructor(public target: Entity) { @@ -657,7 +657,7 @@ export class ExitViewPortEvent extends GameEvent { } /** - * Event thrown on an [[Actor]] when any part of the graphics bounds are on screen. + * Event thrown on an {@apilink Actor} when any part of the graphics bounds are on screen. */ export class EnterViewPortEvent extends GameEvent { constructor(public target: Entity) { @@ -684,7 +684,7 @@ export class ExitTriggerEvent extends GameEvent { } /** - * Event thrown on an [[Actor]] when an action starts. + * Event thrown on an {@apilink Actor} when an action starts. */ export class ActionStartEvent extends GameEvent { constructor( @@ -696,7 +696,7 @@ export class ActionStartEvent extends GameEvent { } /** - * Event thrown on an [[Actor]] when an action completes. + * Event thrown on an {@apilink Actor} when an action completes. */ export class ActionCompleteEvent extends GameEvent { constructor( diff --git a/src/engine/Flags.ts b/src/engine/Flags.ts index 2b3a7d465..0d18e57a4 100644 --- a/src/engine/Flags.ts +++ b/src/engine/Flags.ts @@ -1,5 +1,5 @@ /** - * Flags is a feature flag implementation for Excalibur. They can only be operated **before [[Engine]] construction** + * Flags is a feature flag implementation for Excalibur. They can only be operated **before {@apilink Engine} construction** * after which they are frozen and are read-only. * * Flags are used to enable experimental or preview features in Excalibur. @@ -34,7 +34,7 @@ export class Flags { Flags._FLAGS = {}; } /** - * Enable a specific feature flag by name. **Note: can only be set before [[Engine]] constructor time** + * Enable a specific feature flag by name. **Note: can only be set before {@apilink Engine} constructor time** * @param flagName */ public static enable(flagName: string): void { @@ -45,7 +45,7 @@ export class Flags { } /** - * Disable a specific feature flag by name. **Note: can only be set before [[Engine]] constructor time** + * Disable a specific feature flag by name. **Note: can only be set before {@apilink Engine} constructor time** * @param flagName */ public static disable(flagName: string): void { diff --git a/src/engine/Graphics/Animation.ts b/src/engine/Graphics/Animation.ts index c77b720f9..b8b2e52d7 100644 --- a/src/engine/Graphics/Animation.ts +++ b/src/engine/Graphics/Animation.ts @@ -89,7 +89,7 @@ export interface AnimationOptions { */ totalDuration?: number; /** - * Optionally specify the [[AnimationStrategy]] for the Animation + * Optionally specify the {@apilink AnimationStrategy} for the Animation */ strategy?: AnimationStrategy; } @@ -108,11 +108,11 @@ export const AnimationEvents = { export interface FromSpriteSheetOptions { /** - * [[SpriteSheet]] to source the animation frames from + * {@apilink SpriteSheet} to source the animation frames from */ spriteSheet: SpriteSheet; /** - * The list of (x, y) positions of sprites in the [[SpriteSheet]] of each frame, for example (0, 0) + * The list of (x, y) positions of sprites in the {@apilink SpriteSheet} of each frame, for example (0, 0) * is the the top left sprite, (0, 1) is the sprite directly below that, and so on. * * You may optionally specify a duration for the frame in milliseconds as well, this will override @@ -130,7 +130,7 @@ export interface FromSpriteSheetOptions { */ speed?: number; /** - * Optionally specify the animation strategy for this animation, by default animations loop [[AnimationStrategy.Loop]] + * Optionally specify the animation strategy for this animation, by default animations loop {@apilink AnimationStrategy.Loop} */ strategy?: AnimationStrategy; /** @@ -140,9 +140,9 @@ export interface FromSpriteSheetOptions { } /** - * Create an Animation given a list of [[Frame|frames]] in [[AnimationOptions]] + * Create an Animation given a list of {@apilink Frame | `frames`} in {@apilink AnimationOptions} * - * To create an Animation from a [[SpriteSheet]], use [[Animation.fromSpriteSheet]] + * To create an Animation from a {@apilink SpriteSheet}, use {@apilink Animation.fromSpriteSheet} */ export class Animation extends Graphic implements HasTick { private static _LOGGER = Logger.getInstance(); @@ -201,8 +201,8 @@ export class Animation extends Graphic implements HasTick { } /** - * Create an Animation from a [[SpriteSheet]], a list of indices into the sprite sheet, a duration per frame - * and optional [[AnimationStrategy]] + * Create an Animation from a {@apilink SpriteSheet}, a list of indices into the sprite sheet, a duration per frame + * and optional {@apilink AnimationStrategy} * * Example: * ```typescript @@ -240,7 +240,7 @@ export class Animation extends Graphic implements HasTick { } /** - * Create an [[Animation]] from a [[SpriteSheet]] given a list of coordinates + * Create an {@apilink Animation} from a {@apilink SpriteSheet} given a list of coordinates * * Example: * ```typescript @@ -310,8 +310,8 @@ export class Animation extends Graphic implements HasTick { /** * Returns the current Frame of the animation * - * Use [[Animation.currentFrameIndex]] to get the frame number and - * [[Animation.goToFrame]] to set the current frame index + * Use {@apilink Animation.currentFrameIndex} to get the frame number and + * {@apilink Animation.goToFrame} to set the current frame index */ public get currentFrame(): Frame | null { if (this._currentFrame >= 0 && this._currentFrame < this.frames.length) { @@ -323,7 +323,7 @@ export class Animation extends Graphic implements HasTick { /** * Returns the current frame index of the animation * - * Use [[Animation.currentFrame]] to grab the current [[Frame]] object + * Use {@apilink Animation.currentFrame} to grab the current {@apilink Frame} object */ public get currentFrameIndex(): number { return this._currentFrame; diff --git a/src/engine/Graphics/Canvas.ts b/src/engine/Graphics/Canvas.ts index 126a5ad9c..d326fb2a1 100644 --- a/src/engine/Graphics/Canvas.ts +++ b/src/engine/Graphics/Canvas.ts @@ -7,10 +7,10 @@ export interface CanvasOptions { } /** - * A canvas [[Graphic]] to provide an adapter between the 2D Canvas API and the [[ExcaliburGraphicsContext]]. + * A canvas {@apilink Graphic} to provide an adapter between the 2D Canvas API and the {@apilink ExcaliburGraphicsContext}. * - * The [[Canvas]] works by re-rastering a draw handler to a HTMLCanvasElement for every draw which is then passed - * to the [[ExcaliburGraphicsContext]] implementation as a rendered image. + * The {@apilink Canvas} works by re-rastering a draw handler to a HTMLCanvasElement for every draw which is then passed + * to the {@apilink ExcaliburGraphicsContext} implementation as a rendered image. * * **Low performance API** */ diff --git a/src/engine/Graphics/Circle.ts b/src/engine/Graphics/Circle.ts index 314fe9919..076399233 100644 --- a/src/engine/Graphics/Circle.ts +++ b/src/engine/Graphics/Circle.ts @@ -6,9 +6,9 @@ export interface CircleOptions { } /** - * A circle [[Graphic]] for drawing circles to the [[ExcaliburGraphicsContext]] + * A circle {@apilink Graphic} for drawing circles to the {@apilink ExcaliburGraphicsContext} * - * Circles default to [[ImageFiltering.Blended]] + * Circles default to {@apilink ImageFiltering.Blended} */ export class Circle extends Raster { private _radius: number = 0; diff --git a/src/engine/Graphics/Context/ExcaliburGraphicsContext.ts b/src/engine/Graphics/Context/ExcaliburGraphicsContext.ts index 2d0cf99fd..6edf09a8e 100644 --- a/src/engine/Graphics/Context/ExcaliburGraphicsContext.ts +++ b/src/engine/Graphics/Context/ExcaliburGraphicsContext.ts @@ -43,7 +43,7 @@ export interface AntialiasOptions { /** * Sets the default image filtering for excalibur * - * Default [[ImageFiltering.Blended]] + * Default {@apilink ImageFiltering.Blended} */ filtering?: ImageFiltering; /** @@ -186,7 +186,7 @@ export interface ExcaliburGraphicsContext { * Excalibur will automatically sort draw calls by z and priority for maximal draw performance, * this can disrupt a specific desired painter order. * - * To force a specific draw call order, use [[ExcaliburGraphicsContext.z]] + * To force a specific draw call order, use {@apilink ExcaliburGraphicsContext.z} * * By default `useDrawSorting` is `true`, to opt out set this to `false` */ @@ -196,7 +196,7 @@ export interface ExcaliburGraphicsContext { * Set the current z context for the graphics context. Draw calls issued to the context will use this z * to inform their sort order. * - * Note it is important to all [[ExcaliburGraphicsContext.save]] and [[ExcaliburGraphicsContext.restore]] when modifying state. + * Note it is important to all {@apilink ExcaliburGraphicsContext.save} and {@apilink ExcaliburGraphicsContext.restore} when modifying state. */ z: number; @@ -211,12 +211,12 @@ export interface ExcaliburGraphicsContext { smoothing: boolean; /** - * Set the background color of the graphics context, default is [[Color.ExcaliburBlue]] + * Set the background color of the graphics context, default is {@apilink Color.ExcaliburBlue} */ backgroundColor: Color; /** - * Sets the opacity of the current [[Graphic]] being drawn, default is 1 + * Sets the opacity of the current {@apilink Graphic} being drawn, default is 1 */ opacity: number; diff --git a/src/engine/Graphics/Context/renderer.ts b/src/engine/Graphics/Context/renderer.ts index deb0276a3..2ea7dffb1 100644 --- a/src/engine/Graphics/Context/renderer.ts +++ b/src/engine/Graphics/Context/renderer.ts @@ -1,7 +1,7 @@ import { ExcaliburGraphicsContextWebGL } from './ExcaliburGraphicsContextWebGL'; /** - * Interface that defines an Excalibur Renderer that can be called with .draw() in the [[ExcaliburGraphicsContext]] + * Interface that defines an Excalibur Renderer that can be called with .draw() in the {@apilink ExcaliburGraphicsContext} */ export interface RendererPlugin { /** diff --git a/src/engine/Graphics/Context/shader.ts b/src/engine/Graphics/Context/shader.ts index ea1a9d227..c63df66e5 100644 --- a/src/engine/Graphics/Context/shader.ts +++ b/src/engine/Graphics/Context/shader.ts @@ -309,7 +309,7 @@ export class Shader { } /** - * Set a [[Vector]] uniform for the current shader + * Set a {@apilink Vector} uniform for the current shader * * **Important** Must call ex.Shader.use() before setting a uniform! * @param name @@ -320,7 +320,7 @@ export class Shader { } /** - * Set a [[Vector]] uniform for the current shader, WILL NOT THROW on error. + * Set a {@apilink Vector} uniform for the current shader, WILL NOT THROW on error. * * **Important** Must call ex.Shader.use() before setting a uniform! * @param name @@ -331,7 +331,7 @@ export class Shader { } /** - * Set a [[Color]] uniform for the current shader + * Set a {@apilink Color} uniform for the current shader * * **Important** Must call ex.Shader.use() before setting a uniform! * @param name @@ -342,7 +342,7 @@ export class Shader { } /** - * Set a [[Color]] uniform for the current shader, WILL NOT THROW on error. + * Set a {@apilink Color} uniform for the current shader, WILL NOT THROW on error. * * **Important** Must call ex.Shader.use() before setting a uniform! * @param name @@ -353,7 +353,7 @@ export class Shader { } /** - * Set an [[Matrix]] uniform for the current shader + * Set an {@apilink Matrix} uniform for the current shader * * **Important** Must call ex.Shader.use() before setting a uniform! * @param name @@ -364,7 +364,7 @@ export class Shader { } /** - * Set an [[Matrix]] uniform for the current shader, WILL NOT THROW on error. + * Set an {@apilink Matrix} uniform for the current shader, WILL NOT THROW on error. * * **Important** Must call ex.Shader.use() before setting a uniform! * @param name diff --git a/src/engine/Graphics/Context/texture-loader.ts b/src/engine/Graphics/Context/texture-loader.ts index 422776eb2..61c04cbc9 100644 --- a/src/engine/Graphics/Context/texture-loader.ts +++ b/src/engine/Graphics/Context/texture-loader.ts @@ -35,7 +35,7 @@ export class TextureLoader { } /** - * Sets the default filtering for the Excalibur texture loader, default [[ImageFiltering.Blended]] + * Sets the default filtering for the Excalibur texture loader, default {@apilink ImageFiltering.Blended} */ public static filtering: ImageFiltering = ImageFiltering.Blended; public static wrapping: ImageWrapConfiguration = { x: ImageWrapping.Clamp, y: ImageWrapping.Clamp }; diff --git a/src/engine/Graphics/Context/vertex-layout.ts b/src/engine/Graphics/Context/vertex-layout.ts index df1a4c883..153bc55eb 100644 --- a/src/engine/Graphics/Context/vertex-layout.ts +++ b/src/engine/Graphics/Context/vertex-layout.ts @@ -31,10 +31,10 @@ export interface VertexLayoutOptions { } /** - * Helper around creating vertex attributes in a given [[VertexBuffer]], this is useful for describing + * Helper around creating vertex attributes in a given {@apilink VertexBuffer}, this is useful for describing * the memory layout for your vertices inside a particular buffer * - * Note: This helper assumes interleaved attributes in one [[VertexBuffer]], not many. + * Note: This helper assumes interleaved attributes in one {@apilink VertexBuffer}, not many. * * Working with `gl.vertexAttribPointer` can be tricky, and this attempts to double check you */ diff --git a/src/engine/Graphics/DebugGraphicsComponent.ts b/src/engine/Graphics/DebugGraphicsComponent.ts index 601f9256b..537072421 100644 --- a/src/engine/Graphics/DebugGraphicsComponent.ts +++ b/src/engine/Graphics/DebugGraphicsComponent.ts @@ -5,7 +5,7 @@ import { Component } from '../EntityComponentSystem/Component'; /** * Provide arbitrary drawing for the purposes of debugging your game * - * Will only show when the Engine is set to debug mode [[Engine.showDebug]] or [[Engine.toggleDebug]] + * Will only show when the Engine is set to debug mode {@apilink Engine.showDebug} or {@apilink Engine.toggleDebug} * */ export class DebugGraphicsComponent extends Component { diff --git a/src/engine/Graphics/Font.ts b/src/engine/Graphics/Font.ts index 22163b56e..695b12181 100644 --- a/src/engine/Graphics/Font.ts +++ b/src/engine/Graphics/Font.ts @@ -17,9 +17,9 @@ import { FontCache } from './FontCache'; */ export class Font extends Graphic implements FontRenderer { /** - * Set the font filtering mode, by default set to [[ImageFiltering.Blended]] regardless of the engine default smoothing + * Set the font filtering mode, by default set to {@apilink ImageFiltering.Blended} regardless of the engine default smoothing * - * If you have a pixel style font that may be a reason to switch this to [[ImageFiltering.Pixel]] + * If you have a pixel style font that may be a reason to switch this to {@apilink ImageFiltering.Pixel} */ public filtering: ImageFiltering = ImageFiltering.Blended; constructor(options: FontOptions & GraphicOptions & RasterOptions = {}) { diff --git a/src/engine/Graphics/FontCommon.ts b/src/engine/Graphics/FontCommon.ts index b4d698c3d..ebf19e0ac 100644 --- a/src/engine/Graphics/FontCommon.ts +++ b/src/engine/Graphics/FontCommon.ts @@ -116,7 +116,7 @@ export enum Direction { */ export interface FontOptions { /** - * Optionally the size of the font in the specified [[FontUnit]] by default 10. + * Optionally the size of the font in the specified {@apilink FontUnit} by default 10. */ size?: number; /** diff --git a/src/engine/Graphics/Graphic.ts b/src/engine/Graphics/Graphic.ts index d37cde2dd..a66f392db 100644 --- a/src/engine/Graphics/Graphic.ts +++ b/src/engine/Graphics/Graphic.ts @@ -45,12 +45,12 @@ export interface GraphicOptions { } /** - * A Graphic is the base Excalibur primitive for something that can be drawn to the [[ExcaliburGraphicsContext]]. - * [[Sprite]], [[Animation]], [[GraphicsGroup]], [[Canvas]], [[Rectangle]], [[Circle]], and [[Polygon]] all derive from the - * [[Graphic]] abstract class. + * A Graphic is the base Excalibur primitive for something that can be drawn to the {@apilink ExcaliburGraphicsContext}. + * {@apilink Sprite}, {@apilink Animation}, {@apilink GraphicsGroup}, {@apilink Canvas}, {@apilink Rectangle}, {@apilink Circle}, and {@apilink Polygon} all derive from the + * {@apilink Graphic} abstract class. * - * Implementors of a Graphic must override the abstract [[Graphic._drawImage]] method to render an image to the graphics context. Graphic - * handles all the position, rotation, and scale transformations in [[Graphic._preDraw]] and [[Graphic._postDraw]] + * Implementors of a Graphic must override the abstract {@apilink Graphic._drawImage} method to render an image to the graphics context. Graphic + * handles all the position, rotation, and scale transformations in {@apilink Graphic._preDraw} and {@apilink Graphic._postDraw} */ export abstract class Graphic { private static _ID: number = 0; @@ -220,8 +220,8 @@ export abstract class Graphic { /** * Meant to be overridden by the graphic implementation to draw the underlying image (HTMLCanvasElement or HTMLImageElement) - * to the graphics context without transform. Transformations like position, rotation, and scale are handled by [[Graphic._preDraw]] - * and [[Graphic._postDraw]] + * to the graphics context without transform. Transformations like position, rotation, and scale are handled by {@apilink Graphic._preDraw} + * and {@apilink Graphic._postDraw} * @param ex The excalibur graphics context * @param x * @param y @@ -229,7 +229,7 @@ export abstract class Graphic { protected abstract _drawImage(ex: ExcaliburGraphicsContext, x: number, y: number): void; /** - * Apply affine transformations to the graphics context to manipulate the graphic before [[Graphic._drawImage]] + * Apply affine transformations to the graphics context to manipulate the graphic before {@apilink Graphic._drawImage} * @param ex * @param x * @param y @@ -276,7 +276,7 @@ export abstract class Graphic { } /** - * Apply any additional work after [[Graphic._drawImage]] and restore the context state. + * Apply any additional work after {@apilink Graphic._drawImage} and restore the context state. * @param ex */ protected _postDraw(ex: ExcaliburGraphicsContext): void { diff --git a/src/engine/Graphics/GraphicsComponent.ts b/src/engine/Graphics/GraphicsComponent.ts index 2dc3c8d82..822afdcc2 100644 --- a/src/engine/Graphics/GraphicsComponent.ts +++ b/src/engine/Graphics/GraphicsComponent.ts @@ -298,7 +298,7 @@ export class GraphicsComponent extends Component { } /** - * Use a graphic only, will set the default graphic. Returns the new [[Graphic]] + * Use a graphic only, will set the default graphic. Returns the new {@apilink Graphic} * * Optionally override the stored options * @param nameOrGraphic diff --git a/src/engine/Graphics/ImageSource.ts b/src/engine/Graphics/ImageSource.ts index 78fc2f424..b0f803057 100644 --- a/src/engine/Graphics/ImageSource.ts +++ b/src/engine/Graphics/ImageSource.ts @@ -83,7 +83,7 @@ export class ImageSource implements Loadable { * The path to the image, can also be a data url like 'data:image/' * @param path {string} Path to the image resource relative from the HTML document hosting the game, or absolute * @param bustCache {boolean} Should excalibur add a cache busting querystring? - * @param filtering {ImageFiltering} Optionally override the image filtering set by [[EngineOptions.antialiasing]] + * @param filtering {ImageFiltering} Optionally override the image filtering set by {@apilink EngineOptions.antialiasing} */ constructor(path: string, bustCache: boolean, filtering?: ImageFiltering); constructor(path: string, bustCacheOrOptions: boolean | ImageSourceOptions | undefined, filtering?: ImageFiltering) { diff --git a/src/engine/Graphics/Polygon.ts b/src/engine/Graphics/Polygon.ts index f1eec277e..6c7ebcbeb 100644 --- a/src/engine/Graphics/Polygon.ts +++ b/src/engine/Graphics/Polygon.ts @@ -7,9 +7,9 @@ export interface PolygonOptions { } /** - * A polygon [[Graphic]] for drawing arbitrary polygons to the [[ExcaliburGraphicsContext]] + * A polygon {@apilink Graphic} for drawing arbitrary polygons to the {@apilink ExcaliburGraphicsContext} * - * Polygons default to [[ImageFiltering.Blended]] + * Polygons default to {@apilink ImageFiltering.Blended} */ export class Polygon extends Raster { private _points: Vector[] = []; diff --git a/src/engine/Graphics/PostProcessor/PostProcessor.ts b/src/engine/Graphics/PostProcessor/PostProcessor.ts index b56c24f8c..0b2a644ef 100644 --- a/src/engine/Graphics/PostProcessor/PostProcessor.ts +++ b/src/engine/Graphics/PostProcessor/PostProcessor.ts @@ -3,7 +3,7 @@ import { Shader } from '../Context/shader'; /** * PostProcessors can be used to apply a shader to the entire screen. It is recommended - * you use the [[ScreenShader]] to build your post processor shader. + * you use the {@apilink ScreenShader} to build your post processor shader. * * The screen texture comes through as this uniform * @@ -15,7 +15,7 @@ import { Shader } from '../Context/shader'; * `uniform float u_elapsed_ms` - the elapsed time from the last frame in milliseconds * `uniform vec2 u_resolution` - the resolution of the canvas (in pixels) * - * Custom uniforms can be updated in the [[PostProcessor.onUpdate]] + * Custom uniforms can be updated in the {@apilink PostProcessor.onUpdate} */ export interface PostProcessor { initialize(gl: WebGL2RenderingContext): void; diff --git a/src/engine/Graphics/Raster.ts b/src/engine/Graphics/Raster.ts index 8846a4812..7ee1d3c25 100644 --- a/src/engine/Graphics/Raster.ts +++ b/src/engine/Graphics/Raster.ts @@ -22,7 +22,7 @@ export interface RasterOptions { smoothing?: boolean; /** - * Optionally specify the color of the raster's bitmap context, by default [[Color.Black]] + * Optionally specify the color of the raster's bitmap context, by default {@apilink Color.Black} */ color?: Color; @@ -52,8 +52,8 @@ export interface RasterOptions { padding?: number; /** - * Optionally specify what image filtering mode should be used, [[ImageFiltering.Pixel]] for pixel art, - * [[ImageFiltering.Blended]] for hi-res art + * Optionally specify what image filtering mode should be used, {@apilink ImageFiltering.Pixel} for pixel art, + * {@apilink ImageFiltering.Blended} for hi-res art * * By default unset, rasters defer to the engine antialiasing setting */ @@ -62,9 +62,9 @@ export interface RasterOptions { /** * A Raster is a Graphic that needs to be first painted to a HTMLCanvasElement before it can be drawn to the - * [[ExcaliburGraphicsContext]]. This is useful for generating custom images using the 2D canvas api. + * {@apilink ExcaliburGraphicsContext}. This is useful for generating custom images using the 2D canvas api. * - * Implementors must implement the [[Raster.execute]] method to rasterize their drawing. + * Implementors must implement the {@apilink Raster.execute} method to rasterize their drawing. */ export abstract class Raster extends Graphic { public filtering?: ImageFiltering; @@ -257,7 +257,7 @@ export abstract class Raster extends Graphic { /** * Rasterize the graphic to a bitmap making it usable as in excalibur. Rasterize is called automatically if - * the graphic is [[Raster.dirty]] on the next [[Graphic.draw]] call + * the graphic is {@apilink Raster.dirty} on the next {@apilink Graphic.draw} call */ public rasterize(): void { this._dirty = false; @@ -294,7 +294,7 @@ export abstract class Raster extends Graphic { /** * Executes drawing implementation of the graphic, this is where the specific drawing code for the graphic - * should be implemented. Once `rasterize()` the graphic can be drawn to the [[ExcaliburGraphicsContext]] via `draw(...)` + * should be implemented. Once `rasterize()` the graphic can be drawn to the {@apilink ExcaliburGraphicsContext} via `draw(...)` * @param ctx Canvas to draw the graphic to */ abstract execute(ctx: CanvasRenderingContext2D): void; diff --git a/src/engine/Graphics/Rectangle.ts b/src/engine/Graphics/Rectangle.ts index 9edc3a1b4..affb7528d 100644 --- a/src/engine/Graphics/Rectangle.ts +++ b/src/engine/Graphics/Rectangle.ts @@ -6,7 +6,7 @@ export interface RectangleOptions { } /** - * A Rectangle [[Graphic]] for drawing rectangles to the [[ExcaliburGraphicsContext]] + * A Rectangle {@apilink Graphic} for drawing rectangles to the {@apilink ExcaliburGraphicsContext} */ export class Rectangle extends Raster { constructor(options: RasterOptions & RectangleOptions) { diff --git a/src/engine/Graphics/Sprite.ts b/src/engine/Graphics/Sprite.ts index ff325b468..7a0c512c7 100644 --- a/src/engine/Graphics/Sprite.ts +++ b/src/engine/Graphics/Sprite.ts @@ -12,11 +12,11 @@ export interface SpriteOptions { */ image: ImageSource; /** - * By default the source is the entire dimension of the [[ImageSource]] + * By default the source is the entire dimension of the {@apilink ImageSource} */ sourceView?: { x: number; y: number; width: number; height: number }; /** - * By default the size of the final sprite is the size of the [[ImageSource]] + * By default the size of the final sprite is the size of the {@apilink ImageSource} */ destSize?: { width: number; height: number }; } diff --git a/src/engine/Graphics/SpriteFont.ts b/src/engine/Graphics/SpriteFont.ts index 9f5a649b5..068530482 100644 --- a/src/engine/Graphics/SpriteFont.ts +++ b/src/engine/Graphics/SpriteFont.ts @@ -14,7 +14,7 @@ export interface SpriteFontOptions { */ alphabet: string; /** - * [[SpriteSheet]] to source character sprites from + * {@apilink SpriteSheet} to source character sprites from */ spriteSheet: SpriteSheet; /** diff --git a/src/engine/Graphics/SpriteSheet.ts b/src/engine/Graphics/SpriteSheet.ts index a6840646a..a28410e0f 100644 --- a/src/engine/Graphics/SpriteSheet.ts +++ b/src/engine/Graphics/SpriteSheet.ts @@ -94,7 +94,7 @@ export class SpriteSheet { /** * Build a new sprite sheet from a list of sprites * - * Use [[SpriteSheet.fromImageSource]] to create a SpriteSheet from an [[ImageSource]] organized in a grid + * Use {@apilink SpriteSheet.fromImageSource} to create a SpriteSheet from an {@apilink ImageSource} organized in a grid * @param options */ constructor(options: SpriteSheetOptions) { @@ -105,7 +105,7 @@ export class SpriteSheet { } /** - * Find a sprite by their x/y integer coordinates in the SpriteSheet, for example `getSprite(0, 0)` is the [[Sprite]] in the top-left + * Find a sprite by their x/y integer coordinates in the SpriteSheet, for example `getSprite(0, 0)` is the {@apilink Sprite} in the top-left * and `getSprite(1, 0)` is the sprite one to the right. * @param x * @param y @@ -139,7 +139,7 @@ export class SpriteSheet { } /** - * Create a sprite sheet from a sparse set of [[SourceView]] rectangles + * Create a sprite sheet from a sparse set of {@apilink SourceView} rectangles * @param options */ public static fromImageSourceWithSourceViews(options: SpriteSheetSparseOptions): SpriteSheet { @@ -153,7 +153,7 @@ export class SpriteSheet { } /** - * Create a SpriteSheet from an [[ImageSource]] organized in a grid + * Create a SpriteSheet from an {@apilink ImageSource} organized in a grid * * Example: * ``` diff --git a/src/engine/Input/CapturePointerConfig.ts b/src/engine/Input/CapturePointerConfig.ts index 7660310fe..ba80123cc 100644 --- a/src/engine/Input/CapturePointerConfig.ts +++ b/src/engine/Input/CapturePointerConfig.ts @@ -1,5 +1,5 @@ /** - * Turn on move and drag events for an [[Actor]] + * Turn on move and drag events for an {@apilink Actor} */ export interface CapturePointerConfig { diff --git a/src/engine/Input/Gamepad.ts b/src/engine/Input/Gamepad.ts index 9a6850f6a..04b8111b2 100644 --- a/src/engine/Input/Gamepad.ts +++ b/src/engine/Input/Gamepad.ts @@ -282,7 +282,7 @@ export class Gamepads { } /** - * Gamepad holds state information for a connected controller. See [[Gamepads]] + * Gamepad holds state information for a connected controller. See {@apilink Gamepads} * for more information on handling controller input. */ export class Gamepad { @@ -354,7 +354,7 @@ export class Gamepad { /** * Gets the given axis value between -1 and 1. Values below - * [[MinAxisMoveThreshold]] are considered 0. + * {@apilink MinAxisMoveThreshold} are considered 0. */ public getAxes(axes: Axes) { const value = this._axes[axes]; diff --git a/src/engine/Input/PointerSystem.ts b/src/engine/Input/PointerSystem.ts index d6599a928..774658c58 100644 --- a/src/engine/Input/PointerSystem.ts +++ b/src/engine/Input/PointerSystem.ts @@ -12,8 +12,8 @@ import { SparseHashGrid } from '../Collision/Detection/SparseHashGrid'; * The PointerSystem is responsible for dispatching pointer events to entities * that need them. * - * The PointerSystem can be optionally configured by the [[PointerComponent]], by default Entities use - * the [[Collider]]'s shape for pointer events. + * The PointerSystem can be optionally configured by the {@apilink PointerComponent}, by default Entities use + * the {@apilink Collider}'s shape for pointer events. */ export class PointerSystem extends System { public readonly systemType = SystemType.Update; diff --git a/src/engine/Input/PointerType.ts b/src/engine/Input/PointerType.ts index f9f23e83d..b4ded4a10 100644 --- a/src/engine/Input/PointerType.ts +++ b/src/engine/Input/PointerType.ts @@ -1,5 +1,5 @@ /** - * The type of pointer for a [[PointerEvent]]. + * The type of pointer for a {@apilink PointerEvent}. */ export enum PointerType { Touch = 'Touch', diff --git a/src/engine/Interfaces/AudioImplementation.ts b/src/engine/Interfaces/AudioImplementation.ts index 955a037ae..288e93fb9 100644 --- a/src/engine/Interfaces/AudioImplementation.ts +++ b/src/engine/Interfaces/AudioImplementation.ts @@ -18,7 +18,7 @@ export class ExResponse { } /** - * Represents an audio implementation like [[WebAudioInstance]] + * Represents an audio implementation like {@apilink WebAudioInstance} */ export interface AudioImplementation { /** diff --git a/src/engine/Interfaces/Loadable.ts b/src/engine/Interfaces/Loadable.ts index fa5a4ae49..c29ca9fea 100644 --- a/src/engine/Interfaces/Loadable.ts +++ b/src/engine/Interfaces/Loadable.ts @@ -1,6 +1,6 @@ /** * An interface describing loadable resources in Excalibur. Built-in loadable - * resources include [[Texture]], [[Sound]], and a generic [[Resource]]. + * resources include {@apilink Texture}, {@apilink Sound}, and a generic {@apilink Resource}. */ export interface Loadable { /** diff --git a/src/engine/Label.ts b/src/engine/Label.ts index de12cc542..c5c36573e 100644 --- a/src/engine/Label.ts +++ b/src/engine/Label.ts @@ -23,7 +23,7 @@ export interface LabelOptions { y?: number; pos?: Vector; /** - * Optionally specify a sprite font, will take precedence over any other [[Font]] + * Optionally specify a sprite font, will take precedence over any other {@apilink Font} */ spriteFont?: SpriteFont; /** @@ -80,7 +80,7 @@ export class Label extends Actor { private _spriteFont: SpriteFont; /** - * The [[SpriteFont]] to use, if any. Overrides [[Font|font]] if present. + * The {@apilink SpriteFont} to use, if any. Overrides {@apilink Font | `font`} if present. */ public get spriteFont(): SpriteFont { return this._spriteFont; diff --git a/src/engine/Math/affine-matrix.ts b/src/engine/Math/affine-matrix.ts index 4c9d61eab..03b82000d 100644 --- a/src/engine/Math/affine-matrix.ts +++ b/src/engine/Math/affine-matrix.ts @@ -411,7 +411,7 @@ export class AffineMatrix { } /** - * Creates a new Matrix with the same data as the current [[AffineMatrix]] + * Creates a new Matrix with the same data as the current {@apilink AffineMatrix} */ public clone(dest?: AffineMatrix): AffineMatrix { const mat = dest || new AffineMatrix(); diff --git a/src/engine/Math/coord-plane.ts b/src/engine/Math/coord-plane.ts index c2dfe25ce..a03e105a4 100644 --- a/src/engine/Math/coord-plane.ts +++ b/src/engine/Math/coord-plane.ts @@ -1,5 +1,5 @@ /** - * Enum representing the coordinate plane for the position 2D vector in the [[TransformComponent]] + * Enum representing the coordinate plane for the position 2D vector in the {@apilink TransformComponent} */ export enum CoordPlane { /** diff --git a/src/engine/Math/vector.ts b/src/engine/Math/vector.ts index 957e534f4..e102e4e25 100644 --- a/src/engine/Math/vector.ts +++ b/src/engine/Math/vector.ts @@ -161,7 +161,7 @@ export class Vector implements Clonable { } /** - * The distance to another vector. If no other Vector is specified, this will return the [[magnitude]]. + * The distance to another vector. If no other Vector is specified, this will return the {@apilink magnitude}. * @param v The other vector. Leave blank to use origin vector. */ public distance(v?: Vector): number { diff --git a/src/engine/Particles/ParticleEmitter.ts b/src/engine/Particles/ParticleEmitter.ts index c4aafd162..9eb4bb092 100644 --- a/src/engine/Particles/ParticleEmitter.ts +++ b/src/engine/Particles/ParticleEmitter.ts @@ -11,7 +11,7 @@ import { RentalPool } from '../Util/RentalPool'; /** * Using a particle emitter is a great way to create interesting effects * in your game, like smoke, fire, water, explosions, etc. `ParticleEmitter` - * extend [[Actor]] allowing you to use all of the features that come with. + * extend {@apilink Actor} allowing you to use all of the features that come with. */ export class ParticleEmitter extends Actor { private _particlesToEmit: number = 0; @@ -50,7 +50,7 @@ export class ParticleEmitter extends Actor { public emitterType: EmitterType = EmitterType.Rectangle; /** - * Gets or sets the emitter radius, only takes effect when the [[emitterType]] is [[EmitterType.Circle]] + * Gets or sets the emitter radius, only takes effect when the {@apilink emitterType} is {@apilink EmitterType.Circle} */ public radius: number = 0; diff --git a/src/engine/Particles/Particles.ts b/src/engine/Particles/Particles.ts index 5c9bacf37..32a699353 100644 --- a/src/engine/Particles/Particles.ts +++ b/src/engine/Particles/Particles.ts @@ -15,7 +15,7 @@ import type { ParticleEmitter } from './ParticleEmitter'; /** /** - * Particle is used in a [[ParticleEmitter]] + * Particle is used in a {@apilink ParticleEmitter} */ export class Particle extends Entity { public static DefaultConfig: ParticleConfig = { @@ -165,10 +165,10 @@ export class Particle extends Entity { export interface ParticleConfig { /** - * Optionally set the emitted particle transform style, [[ParticleTransform.Global]] is the default and emits particles as if + * Optionally set the emitted particle transform style, {@apilink ParticleTransform.Global} is the default and emits particles as if * they were world space objects, useful for most effects. * - * If set to [[ParticleTransform.Local]] particles are children of the emitter and move relative to the emitter + * If set to {@apilink ParticleTransform.Local} particles are children of the emitter and move relative to the emitter * as they would in a parent/child actor relationship. */ transform?: ParticleTransform; @@ -273,12 +273,12 @@ export interface ParticleConfig { export enum ParticleTransform { /** - * [[ParticleTransform.Global]] is the default and emits particles as if + * {@apilink ParticleTransform.Global} is the default and emits particles as if * they were world space objects, useful for most effects. */ Global = 'global', /** - * [[ParticleTransform.Local]] particles are children of the emitter and move relative to the emitter + * {@apilink ParticleTransform.Local} particles are children of the emitter and move relative to the emitter * as they would in a parent/child actor relationship. */ Local = 'local' diff --git a/src/engine/Resources/Gif.ts b/src/engine/Resources/Gif.ts index 50cbb6459..775dece38 100644 --- a/src/engine/Resources/Gif.ts +++ b/src/engine/Resources/Gif.ts @@ -7,8 +7,8 @@ import { Loadable } from '../Interfaces/Index'; import { ImageSource } from '../Graphics/ImageSource'; import { range } from '../Math/util'; /** - * The [[Texture]] object allows games built in Excalibur to load image resources. - * [[Texture]] is an [[Loadable]] which means it can be passed to a [[Loader]] + * The {@apilink Texture} object allows games built in Excalibur to load image resources. + * {@apilink Texture} is an {@apilink Loadable} which means it can be passed to a {@apilink Loader} * to pre-load before starting a level or game. */ export class Gif implements Loadable { @@ -34,7 +34,7 @@ export class Gif implements Loadable { /** * @param path Path to the image resource - * @param color Optionally set the color to treat as transparent the gif, by default [[Color.Magenta]] + * @param color Optionally set the color to treat as transparent the gif, by default {@apilink Color.Magenta} * @param bustCache Optionally load texture with cache busting */ constructor( diff --git a/src/engine/Resources/Resource.ts b/src/engine/Resources/Resource.ts index 12dda892e..09d7b8a03 100644 --- a/src/engine/Resources/Resource.ts +++ b/src/engine/Resources/Resource.ts @@ -19,8 +19,8 @@ export const ResourceEvents = { }; /** - * The [[Resource]] type allows games built in Excalibur to load generic resources. - * For any type of remote resource it is recommended to use [[Resource]] for preloading. + * The {@apilink Resource} type allows games built in Excalibur to load generic resources. + * For any type of remote resource it is recommended to use {@apilink Resource} for preloading. */ export class Resource implements Loadable { public data: T = null; diff --git a/src/engine/Resources/Sound/Sound.ts b/src/engine/Resources/Sound/Sound.ts index 55d5aba91..4fcebb0b3 100644 --- a/src/engine/Resources/Sound/Sound.ts +++ b/src/engine/Resources/Sound/Sound.ts @@ -31,9 +31,9 @@ export const SoundEvents = { }; /** - * The [[Sound]] object allows games built in Excalibur to load audio - * components, from soundtracks to sound effects. [[Sound]] is an [[Loadable]] - * which means it can be passed to a [[Loader]] to pre-load before a game or level. + * The {@apilink Sound} object allows games built in Excalibur to load audio + * components, from soundtracks to sound effects. {@apilink Sound} is an {@apilink Loadable} + * which means it can be passed to a {@apilink Loader} to pre-load before a game or level. */ export class Sound implements Audio, Loadable { public events = new EventEmitter(); @@ -333,7 +333,7 @@ export class Sound implements Audio, Loadable { /** * Get Id of provided AudioInstance in current trackList - * @param track [[Audio]] which Id is to be given + * @param track {@apilink Audio} which Id is to be given */ public getTrackId(track: Audio): number { return this._tracks.indexOf(track); diff --git a/src/engine/Scene.ts b/src/engine/Scene.ts index e6b2cecf2..f0ab1ed0d 100644 --- a/src/engine/Scene.ts +++ b/src/engine/Scene.ts @@ -79,7 +79,7 @@ export function isSceneConstructor(x: any): x is SceneConstructor { } /** - * [[Actor|Actors]] are composed together into groupings called Scenes in + * {@apilink Actor | `Actors`} are composed together into groupings called Scenes in * Excalibur. The metaphor models the same idea behind real world * actors in a scene. Only actors in scenes will be updated and drawn. * @@ -138,7 +138,7 @@ export class Scene implements CanInitialize, CanActiv } /** - * The [[TileMap]]s in the scene, if any + * The {@apilink TileMap}s in the scene, if any */ public get tileMaps(): readonly TileMap[] { return this.world.entityManager.entities.filter((e: Entity) => { @@ -231,7 +231,7 @@ export class Scene implements CanInitialize, CanActiv } /** - * This is called before the first update of the [[Scene]]. Initializes scene members like the camera. This method is meant to be + * This is called before the first update of the {@apilink Scene}. Initializes scene members like the camera. This method is meant to be * overridden. This is where initialization of child actors should take place. */ public onInitialize(engine: Engine): void { @@ -302,7 +302,7 @@ export class Scene implements CanInitialize, CanActiv } /** - * Gets whether or not the [[Scene]] has been initialized + * Gets whether or not the {@apilink Scene} has been initialized */ public get isInitialized(): boolean { return this._isInitialized; @@ -378,7 +378,7 @@ export class Scene implements CanInitialize, CanActiv /** * It is not recommended that internal excalibur methods be overridden, do so at your own risk. * - * Internal _preupdate handler for [[onPreUpdate]] lifecycle event + * Internal _preupdate handler for {@apilink onPreUpdate} lifecycle event * @internal */ public _preupdate(engine: Engine, delta: number): void { @@ -389,7 +389,7 @@ export class Scene implements CanInitialize, CanActiv /** * It is not recommended that internal excalibur methods be overridden, do so at your own risk. * - * Internal _preupdate handler for [[onPostUpdate]] lifecycle event + * Internal _preupdate handler for {@apilink onPostUpdate} lifecycle event * @internal */ public _postupdate(engine: Engine, delta: number): void { @@ -400,7 +400,7 @@ export class Scene implements CanInitialize, CanActiv /** * It is not recommended that internal excalibur methods be overridden, do so at your own risk. * - * Internal _predraw handler for [[onPreDraw]] lifecycle event + * Internal _predraw handler for {@apilink onPreDraw} lifecycle event * @internal */ public _predraw(ctx: ExcaliburGraphicsContext, delta: number): void { @@ -411,7 +411,7 @@ export class Scene implements CanInitialize, CanActiv /** * It is not recommended that internal excalibur methods be overridden, do so at your own risk. * - * Internal _postdraw handler for [[onPostDraw]] lifecycle event + * Internal _postdraw handler for {@apilink onPostDraw} lifecycle event * @internal */ public _postdraw(ctx: ExcaliburGraphicsContext, delta: number): void { @@ -420,7 +420,7 @@ export class Scene implements CanInitialize, CanActiv } /** - * Updates all the actors and timers in the scene. Called by the [[Engine]]. + * Updates all the actors and timers in the scene. Called by the {@apilink Engine}. * @param engine Reference to the current Engine * @param delta The number of milliseconds since the last update */ @@ -459,7 +459,7 @@ export class Scene implements CanInitialize, CanActiv } /** - * Draws all the actors in the Scene. Called by the [[Engine]]. + * Draws all the actors in the Scene. Called by the {@apilink Engine}. * @param ctx The current rendering context * @param delta The number of milliseconds since the last draw */ @@ -479,7 +479,7 @@ export class Scene implements CanInitialize, CanActiv } /** - * Draws all the actors' debug information in the Scene. Called by the [[Engine]]. + * Draws all the actors' debug information in the Scene. Called by the {@apilink Engine}. * @param ctx The current rendering context */ /* istanbul ignore next */ @@ -497,36 +497,36 @@ export class Scene implements CanInitialize, CanActiv } /** - * Adds a [[Timer]] to the current [[Scene]]. - * @param timer The timer to add to the current [[Scene]]. + * Adds a {@apilink Timer} to the current {@apilink Scene}. + * @param timer The timer to add to the current {@apilink Scene}. */ public add(timer: Timer): void; /** - * Adds a [[TileMap]] to the [[Scene]], once this is done the [[TileMap]] will be drawn and updated. + * Adds a {@apilink TileMap} to the {@apilink Scene}, once this is done the {@apilink TileMap} will be drawn and updated. */ public add(tileMap: TileMap): void; /** - * Adds a [[Trigger]] to the [[Scene]], once this is done the [[Trigger]] will listen for interactions with other actors. + * Adds a {@apilink Trigger} to the {@apilink Scene}, once this is done the {@apilink Trigger} will listen for interactions with other actors. * @param trigger */ public add(trigger: Trigger): void; /** - * Adds an actor to the scene, once this is done the [[Actor]] will be drawn and updated. + * Adds an actor to the scene, once this is done the {@apilink Actor} will be drawn and updated. * @param actor The actor to add to the current scene */ public add(actor: Actor): void; /** - * Adds an [[Entity]] to the scene, once this is done the [[Actor]] will be drawn and updated. + * Adds an {@apilink Entity} to the scene, once this is done the {@apilink Actor} will be drawn and updated. * @param entity The entity to add to the current scene */ public add(entity: Entity): void; /** - * Adds a [[ScreenElement]] to the scene. + * Adds a {@apilink ScreenElement} to the scene. * @param screenElement The ScreenElement to add to the current scene */ public add(screenElement: ScreenElement): void; @@ -543,7 +543,7 @@ export class Scene implements CanInitialize, CanActiv } /** - * Removes a [[Timer]] from it's current scene + * Removes a {@apilink Timer} from it's current scene * and adds it to this scene. * * Useful if you want to have an object be present in only 1 scene at a time. @@ -552,7 +552,7 @@ export class Scene implements CanInitialize, CanActiv public transfer(timer: Timer): void; /** - * Removes a [[TileMap]] from it's current scene + * Removes a {@apilink TileMap} from it's current scene * and adds it to this scene. * * Useful if you want to have an object be present in only 1 scene at a time. @@ -561,7 +561,7 @@ export class Scene implements CanInitialize, CanActiv public transfer(tileMap: TileMap): void; /** - * Removes a [[Trigger]] from it's current scene + * Removes a {@apilink Trigger} from it's current scene * and adds it to this scene. * * Useful if you want to have an object be present in only 1 scene at a time. @@ -570,7 +570,7 @@ export class Scene implements CanInitialize, CanActiv public transfer(trigger: Trigger): void; /** - * Removes an [[Actor]] from it's current scene + * Removes an {@apilink Actor} from it's current scene * and adds it to this scene. * * Useful if you want to have an object be present in only 1 scene at a time. @@ -579,7 +579,7 @@ export class Scene implements CanInitialize, CanActiv public transfer(actor: Actor): void; /** - * Removes an [[Entity]] from it's current scene + * Removes an {@apilink Entity} from it's current scene * and adds it to this scene. * * Useful if you want to have an object be present in only 1 scene at a time. @@ -588,7 +588,7 @@ export class Scene implements CanInitialize, CanActiv public transfer(entity: Entity): void; /** - * Removes a [[ScreenElement]] from it's current scene + * Removes a {@apilink ScreenElement} from it's current scene * and adds it to this scene. * * Useful if you want to have an object be present in only 1 scene at a time. @@ -597,7 +597,7 @@ export class Scene implements CanInitialize, CanActiv public transfer(screenElement: ScreenElement): void; /** - * Removes an [[Entity]] (Actor, TileMap, Trigger, etc) or [[Timer]] from it's current scene + * Removes an {@apilink Entity} (Actor, TileMap, Trigger, etc) or {@apilink Timer} from it's current scene * and adds it to this scene. * * Useful if you want to have an object be present in only 1 scene at a time. @@ -618,13 +618,13 @@ export class Scene implements CanInitialize, CanActiv } /** - * Removes a [[Timer]] from the current scene, it will no longer be updated. + * Removes a {@apilink Timer} from the current scene, it will no longer be updated. * @param timer The timer to remove to the current scene. */ public remove(timer: Timer): void; /** - * Removes a [[TileMap]] from the scene, it will no longer be drawn or updated. + * Removes a {@apilink TileMap} from the scene, it will no longer be drawn or updated. * @param tileMap {TileMap} */ public remove(tileMap: TileMap): void; @@ -638,7 +638,7 @@ export class Scene implements CanInitialize, CanActiv public remove(entity: Entity): void; /** - * Removes a [[ScreenElement]] to the scene, it will no longer be drawn or updated + * Removes a {@apilink ScreenElement} to the scene, it will no longer be drawn or updated * @param screenElement The ScreenElement to remove from the current scene */ public remove(screenElement: ScreenElement): void; @@ -671,7 +671,7 @@ export class Scene implements CanInitialize, CanActiv } /** - * Adds a [[Timer]] to the scene + * Adds a {@apilink Timer} to the scene * @param timer The timer to add */ public addTimer(timer: Timer): Timer { @@ -681,8 +681,8 @@ export class Scene implements CanInitialize, CanActiv } /** - * Removes a [[Timer]] from the scene. - * @warning Can be dangerous, use [[cancelTimer]] instead + * Removes a {@apilink Timer} from the scene. + * @warning Can be dangerous, use {@apilink cancelTimer} instead * @param timer The timer to remove */ public removeTimer(timer: Timer): Timer { @@ -694,7 +694,7 @@ export class Scene implements CanInitialize, CanActiv } /** - * Cancels a [[Timer]], removing it from the scene nicely + * Cancels a {@apilink Timer}, removing it from the scene nicely * @param timer The timer to cancel */ public cancelTimer(timer: Timer): Timer { @@ -703,7 +703,7 @@ export class Scene implements CanInitialize, CanActiv } /** - * Tests whether a [[Timer]] is active in the scene + * Tests whether a {@apilink Timer} is active in the scene */ public isTimerActive(timer: Timer): boolean { return this._timers.indexOf(timer) > -1 && !timer.complete; diff --git a/src/engine/Screen.ts b/src/engine/Screen.ts index 256316485..21ccc478f 100644 --- a/src/engine/Screen.ts +++ b/src/engine/Screen.ts @@ -20,39 +20,39 @@ export enum DisplayMode { /** * Fit the aspect ratio given by the game resolution within the container at all times will fill any gaps with canvas. - * The displayed area outside the aspect ratio is not guaranteed to be on the screen, only the [[Screen.contentArea]] + * The displayed area outside the aspect ratio is not guaranteed to be on the screen, only the {@apilink Screen.contentArea} * is guaranteed to be on screen. */ FitContainerAndFill = 'FitContainerAndFill', /** * Fit the aspect ratio given by the game resolution the screen at all times will fill the screen. - * This displayed area outside the aspect ratio is not guaranteed to be on the screen, only the [[Screen.contentArea]] + * This displayed area outside the aspect ratio is not guaranteed to be on the screen, only the {@apilink Screen.contentArea} * is guaranteed to be on screen. */ FitScreenAndFill = 'FitScreenAndFill', /** * Fit the viewport to the parent element maintaining aspect ratio given by the game resolution, but zooms in to avoid the black bars - * (letterbox) that would otherwise be present in [[FitContainer]]. + * (letterbox) that would otherwise be present in {@apilink FitContainer}. * * **warning** This will clip some drawable area from the user because of the zoom, - * use [[Screen.contentArea]] to know the safe to draw area. + * use {@apilink Screen.contentArea} to know the safe to draw area. */ FitContainerAndZoom = 'FitContainerAndZoom', /** * Fit the viewport to the device screen maintaining aspect ratio given by the game resolution, but zooms in to avoid the black bars - * (letterbox) that would otherwise be present in [[FitScreen]]. + * (letterbox) that would otherwise be present in {@apilink FitScreen}. * * **warning** This will clip some drawable area from the user because of the zoom, - * use [[Screen.contentArea]] to know the safe to draw area. + * use {@apilink Screen.contentArea} to know the safe to draw area. */ FitScreenAndZoom = 'FitScreenAndZoom', /** * Fit to screen using as much space as possible while maintaining aspect ratio and resolution. - * This is not the same as [[Screen.goFullScreen]] but behaves in a similar way maintaining aspect ratio. + * This is not the same as {@apilink Screen.goFullScreen} but behaves in a similar way maintaining aspect ratio. * * You may want to center your game here is an example * ```html @@ -79,7 +79,7 @@ export enum DisplayMode { /** * Fill the entire screen's css width/height for the game resolution dynamically. This means the resolution of the game will - * change dynamically as the window is resized. This is not the same as [[Screen.goFullScreen]] + * change dynamically as the window is resized. This is not the same as {@apilink Screen.goFullScreen} */ FillScreen = 'FillScreen', @@ -184,8 +184,8 @@ export interface ScreenOptions { pixelRatio?: number; /** * Optionally specify the actual pixel resolution in width/height pixels (also known as logical resolution), by default the - * resolution will be the same as the viewport. Resolution will be overridden by [[DisplayMode.FillContainer]] and - * [[DisplayMode.FillScreen]]. + * resolution will be the same as the viewport. Resolution will be overridden by {@apilink DisplayMode.FillContainer} and + * {@apilink DisplayMode.FillScreen}. */ resolution?: Resolution; /** @@ -262,7 +262,7 @@ export const ScreenEvents = { export class Screen { public graphicsContext: ExcaliburGraphicsContext; /** - * Listen to screen events [[ScreenEvents]] + * Listen to screen events {@apilink ScreenEvents} */ public events = new EventEmitter(); private _canvas: HTMLCanvasElement; @@ -707,8 +707,8 @@ export class Screen { /** * Takes a coordinate in Excalibur screen space, and translates it to Excalibur world space. * - * World space is where [[Entity|entities]] in Excalibur live by default [[CoordPlane.World]] - * and extends infinitely out relative from the [[Camera]]. + * World space is where {@apilink Entity | `entities`} in Excalibur live by default {@apilink CoordPlane.World} + * and extends infinitely out relative from the {@apilink Camera}. * @param point Screen coordinate to convert */ public screenToWorldCoordinates(point: Vector): Vector { @@ -725,7 +725,7 @@ export class Screen { /** * Takes a coordinate in Excalibur world space, and translates it to Excalibur screen space. * - * Screen space is where [[ScreenElement|screen elements]] and [[Entity|entities]] with [[CoordPlane.Screen]] live. + * Screen space is where {@apilink ScreenElement | `screen elements`} and {@apilink Entity | `entities`} with {@apilink CoordPlane.Screen} live. * @param point World coordinate to convert */ public worldToScreenCoordinates(point: Vector): Vector { diff --git a/src/engine/ScreenElement.ts b/src/engine/ScreenElement.ts index 174c210e5..85b800d25 100644 --- a/src/engine/ScreenElement.ts +++ b/src/engine/ScreenElement.ts @@ -13,7 +13,7 @@ export function isScreenElement(actor: Actor) { } /** - * Helper [[Actor]] primitive for drawing UI's, optimized for UI drawing. Does + * Helper {@apilink Actor} primitive for drawing UI's, optimized for UI drawing. Does * not participate in collisions. Drawn on top of all other actors. */ export class ScreenElement extends Actor { diff --git a/src/engine/TileMap/IsometricMap.ts b/src/engine/TileMap/IsometricMap.ts index d0c88dae0..faa9fc2ce 100644 --- a/src/engine/TileMap/IsometricMap.ts +++ b/src/engine/TileMap/IsometricMap.ts @@ -86,7 +86,7 @@ export class IsometricTile extends Entity { /** * Adds a collider to the IsometricTile * - * **Note!** the [[Tile.solid]] must be set to true for it to act as a "fixed" collider + * **Note!** the {@apilink Tile.solid} must be set to true for it to act as a "fixed" collider * @param collider */ public addCollider(collider: Collider) { @@ -123,7 +123,7 @@ export class IsometricTile extends Entity { */ public readonly y: number; /** - * Reference to the [[IsometricMap]] this tile is part of + * Reference to the {@apilink IsometricMap} this tile is part of */ public readonly map: IsometricMap; @@ -131,14 +131,14 @@ export class IsometricTile extends Entity { private _isometricEntityComponent: IsometricEntityComponent; /** - * Returns the top left corner of the [[IsometricTile]] in world space + * Returns the top left corner of the {@apilink IsometricTile} in world space */ public get pos(): Vector { return this.map.tileToWorld(vec(this.x, this.y)); } /** - * Returns the center of the [[IsometricTile]] + * Returns the center of the {@apilink IsometricTile} */ public get center(): Vector { return this.pos.add(vec(0, this.map.tileHeight / 2)); @@ -301,12 +301,12 @@ export class IsometricMap extends Entity { public graphicsOffset: Vector = vec(0, 0); /** - * Isometric map [[TransformComponent]] + * Isometric map {@apilink TransformComponent} */ public transform: TransformComponent; /** - * Isometric map [[ColliderComponent]] + * Isometric map {@apilink ColliderComponent} */ public collider: ColliderComponent; @@ -457,7 +457,7 @@ export class IsometricMap extends Entity { } /** - * Returns the [[IsometricTile]] by its x and y coordinates + * Returns the {@apilink IsometricTile} by its x and y coordinates */ public getTile(x: number, y: number): IsometricTile | null { if (x < 0 || y < 0 || x >= this.columns || y >= this.rows) { @@ -467,7 +467,7 @@ export class IsometricMap extends Entity { } /** - * Returns the [[IsometricTile]] by testing a point in world coordinates, + * Returns the {@apilink IsometricTile} by testing a point in world coordinates, * returns `null` if no Tile was found. */ public getTileByPoint(point: Vector): IsometricTile | null { diff --git a/src/engine/TileMap/TileMap.ts b/src/engine/TileMap/TileMap.ts index 592ecbb65..667ce4355 100644 --- a/src/engine/TileMap/TileMap.ts +++ b/src/engine/TileMap/TileMap.ts @@ -457,13 +457,13 @@ export class TileMap extends Entity { } /** - * Returns the [[Tile]] by index (row major order) + * Returns the {@apilink Tile} by index (row major order) */ public getTileByIndex(index: number): Tile { return this.tiles[index]; } /** - * Returns the [[Tile]] by its x and y integer coordinates + * Returns the {@apilink Tile} by its x and y integer coordinates * * For example, if I want the tile in fifth column (x), and second row (y): * `getTile(4, 1)` 0 based, so 0 is the first in row/column @@ -475,7 +475,7 @@ export class TileMap extends Entity { return this.tiles[x + y * this.columns]; } /** - * Returns the [[Tile]] by testing a point in world coordinates, + * Returns the {@apilink Tile} by testing a point in world coordinates, * returns `null` if no Tile was found. */ public getTileByPoint(point: Vector): Tile | null { @@ -565,7 +565,7 @@ export class TileMap extends Entity { } /** - * Draws the tile map to the screen. Called by the [[Scene]]. + * Draws the tile map to the screen. Called by the {@apilink Scene}. * @param ctx ExcaliburGraphicsContext * @param delta The number of milliseconds since the last draw */ @@ -677,7 +677,7 @@ export interface TileOptions { * TileMap Tile * * A light-weight object that occupies a space in a collision map. Generally - * created by a [[TileMap]]. + * created by a {@apilink TileMap}. * * Tiles can draw multiple sprites. Note that the order of drawing is the order * of the sprites in the array so the last one will be drawn on top. You can @@ -766,7 +766,7 @@ export class Tile { } /** - * Add another [[Graphic]] to this TileMap tile + * Add another {@apilink Graphic} to this TileMap tile * @param graphic */ public addGraphic(graphic: Graphic, options?: { offset?: Vector }) { @@ -779,7 +779,7 @@ export class Tile { } /** - * Remove an instance of a [[Graphic]] from this tile + * Remove an instance of a {@apilink Graphic} from this tile */ public removeGraphic(graphic: Graphic) { const index = this._graphics.indexOf(graphic); @@ -810,11 +810,11 @@ export class Tile { } /** - * Adds a custom collider to the [[Tile]] to use instead of it's bounds + * Adds a custom collider to the {@apilink Tile} to use instead of it's bounds * - * If no collider is set but [[Tile.solid]] is set, the tile bounds are used as a collider. + * If no collider is set but {@apilink Tile.solid} is set, the tile bounds are used as a collider. * - * **Note!** the [[Tile.solid]] must be set to true for it to act as a "fixed" collider + * **Note!** the {@apilink Tile.solid} must be set to true for it to act as a "fixed" collider * @param collider */ public addCollider(collider: Collider) { @@ -823,7 +823,7 @@ export class Tile { } /** - * Removes a collider from the [[Tile]] + * Removes a collider from the {@apilink Tile} * @param collider */ public removeCollider(collider: Collider) { @@ -835,7 +835,7 @@ export class Tile { } /** - * Clears all colliders from the [[Tile]] + * Clears all colliders from the {@apilink Tile} */ public clearColliders() { this._colliders.length = 0; diff --git a/src/engine/Trigger.ts b/src/engine/Trigger.ts index 07892aa14..04fbd93d6 100644 --- a/src/engine/Trigger.ts +++ b/src/engine/Trigger.ts @@ -53,7 +53,7 @@ const triggerDefaults: Partial = { /** * Triggers are a method of firing arbitrary code on collision. These are useful * as 'buttons', 'switches', or to trigger effects in a game. By default triggers - * are invisible, and can only be seen when [[Trigger.visible]] is set to `true`. + * are invisible, and can only be seen when {@apilink Trigger.visible} is set to `true`. */ export class Trigger extends Actor { public events = new EventEmitter(); diff --git a/src/engine/Util/Clock.ts b/src/engine/Util/Clock.ts index 20e5d7a70..c3bec936e 100644 --- a/src/engine/Util/Clock.ts +++ b/src/engine/Util/Clock.ts @@ -86,7 +86,7 @@ export abstract class Clock { } /** - * Schedule a callback to fire given a timeout in milliseconds using the excalibur [[Clock]] + * Schedule a callback to fire given a timeout in milliseconds using the excalibur {@apilink Clock} * * This is useful to use over the built in browser `setTimeout` because callbacks will be tied to the * excalibur update clock, instead of browser time, this means that callbacks wont fire if the game is @@ -179,7 +179,7 @@ export abstract class Clock { } /** - * The [[StandardClock]] implements the requestAnimationFrame browser api to run the tick() + * The {@apilink StandardClock} implements the requestAnimationFrame browser api to run the tick() */ export class StandardClock extends Clock { private _running = false; diff --git a/src/engine/Util/DrawUtil.ts b/src/engine/Util/DrawUtil.ts index 038c662fc..b4b7ad693 100644 --- a/src/engine/Util/DrawUtil.ts +++ b/src/engine/Util/DrawUtil.ts @@ -17,7 +17,7 @@ export type LineCapStyle = 'butt' | 'round' | 'square'; * @param x2 The ending x coordinate * @param y2 The ending y coordinate * @param thickness The line thickness - * @param cap The [[LineCapStyle]] (butt, round, or square) + * @param cap The {@apilink LineCapStyle} (butt, round, or square) */ export function line( ctx: CanvasRenderingContext2D, @@ -101,8 +101,8 @@ export interface BorderRadius { * @param width The width of the rectangle * @param height The height of the rectangle * @param radius The border radius of the rectangle - * @param stroke The [[Color]] to stroke rectangle with - * @param fill The [[Color]] to fill rectangle with + * @param stroke The {@apilink Color} to stroke rectangle with + * @param fill The {@apilink Color} to fill rectangle with */ export function roundRect( ctx: CanvasRenderingContext2D, diff --git a/src/engine/Util/EasingFunctions.ts b/src/engine/Util/EasingFunctions.ts index 1fae421ec..aa0341076 100644 --- a/src/engine/Util/EasingFunctions.ts +++ b/src/engine/Util/EasingFunctions.ts @@ -1,7 +1,7 @@ import { Vector } from '../Math/vector'; /** - * A definition of an EasingFunction. See [[EasingFunctions]]. + * A definition of an EasingFunction. See {@apilink EasingFunctions}. */ // tslint:disable-next-line export interface EasingFunction { diff --git a/src/engine/Util/Log.ts b/src/engine/Util/Log.ts index 5d6ea9860..e709e2281 100644 --- a/src/engine/Util/Log.ts +++ b/src/engine/Util/Log.ts @@ -17,8 +17,8 @@ export enum LogLevel { /** * Static singleton that represents the logging facility for Excalibur. - * Excalibur comes built-in with a [[ConsoleAppender]] and [[ScreenAppender]]. - * Derive from [[Appender]] to create your own logging appenders. + * Excalibur comes built-in with a {@apilink ConsoleAppender} and {@apilink ScreenAppender}. + * Derive from {@apilink Appender} to create your own logging appenders. */ export class Logger { private static _INSTANCE: Logger = null; @@ -36,7 +36,7 @@ export class Logger { /** * Gets or sets the default logging level. Excalibur will only log - * messages if equal to or above this level. Default: [[LogLevel.Info]] + * messages if equal to or above this level. Default: {@apilink LogLevel.Info} */ public defaultLevel: LogLevel = LogLevel.Info; @@ -51,7 +51,7 @@ export class Logger { } /** - * Adds a new [[Appender]] to the list of appenders to write to + * Adds a new {@apilink Appender} to the list of appenders to write to */ public addAppender(appender: Appender): void { this._appenders.push(appender); @@ -95,7 +95,7 @@ export class Logger { } /** - * Writes a log message at the [[LogLevel.Debug]] level + * Writes a log message at the {@apilink LogLevel.Debug} level * @param args Accepts any number of arguments */ public debug(...args: any[]): void { @@ -103,7 +103,7 @@ export class Logger { } /** - * Writes a log message once at the [[LogLevel.Fatal]] level, if it sees the same args again it wont log + * Writes a log message once at the {@apilink LogLevel.Fatal} level, if it sees the same args again it wont log * @param args Accepts any number of arguments */ public debugOnce(...args: any[]): void { @@ -111,7 +111,7 @@ export class Logger { } /** - * Writes a log message at the [[LogLevel.Info]] level + * Writes a log message at the {@apilink LogLevel.Info} level * @param args Accepts any number of arguments */ public info(...args: any[]): void { @@ -119,7 +119,7 @@ export class Logger { } /** - * Writes a log message once at the [[LogLevel.Info]] level, if it sees the same args again it wont log + * Writes a log message once at the {@apilink LogLevel.Info} level, if it sees the same args again it wont log * @param args Accepts any number of arguments */ public infoOnce(...args: any[]): void { @@ -127,7 +127,7 @@ export class Logger { } /** - * Writes a log message at the [[LogLevel.Warn]] level + * Writes a log message at the {@apilink LogLevel.Warn} level * @param args Accepts any number of arguments */ public warn(...args: any[]): void { @@ -135,7 +135,7 @@ export class Logger { } /** - * Writes a log message once at the [[LogLevel.Warn]] level, if it sees the same args again it won't log + * Writes a log message once at the {@apilink LogLevel.Warn} level, if it sees the same args again it won't log * @param args Accepts any number of arguments */ public warnOnce(...args: any[]): void { @@ -143,7 +143,7 @@ export class Logger { } /** - * Writes a log message at the [[LogLevel.Error]] level + * Writes a log message at the {@apilink LogLevel.Error} level * @param args Accepts any number of arguments */ public error(...args: any[]): void { @@ -151,7 +151,7 @@ export class Logger { } /** - * Writes a log message once at the [[LogLevel.Error]] level, if it sees the same args again it won't log + * Writes a log message once at the {@apilink LogLevel.Error} level, if it sees the same args again it won't log * @param args Accepts any number of arguments */ public errorOnce(...args: any[]): void { @@ -159,7 +159,7 @@ export class Logger { } /** - * Writes a log message at the [[LogLevel.Fatal]] level + * Writes a log message at the {@apilink LogLevel.Fatal} level * @param args Accepts any number of arguments */ public fatal(...args: any[]): void { @@ -167,7 +167,7 @@ export class Logger { } /** - * Writes a log message once at the [[LogLevel.Fatal]] level, if it sees the same args again it won't log + * Writes a log message once at the {@apilink LogLevel.Fatal} level, if it sees the same args again it won't log * @param args Accepts any number of arguments */ public fatalOnce(...args: any[]): void { @@ -180,7 +180,7 @@ export class Logger { */ export interface Appender { /** - * Logs a message at the given [[LogLevel]] + * Logs a message at the given {@apilink LogLevel} * @param level Level to log at * @param args Arguments to log */ @@ -192,7 +192,7 @@ export interface Appender { */ export class ConsoleAppender implements Appender { /** - * Logs a message at the given [[LogLevel]] + * Logs a message at the given {@apilink LogLevel} * @param level Level to log at * @param args Arguments to log */ @@ -294,7 +294,7 @@ export class ScreenAppender implements Appender { } /** - * Logs a message at the given [[LogLevel]] + * Logs a message at the given {@apilink LogLevel} * @param level Level to log at * @param args Arguments to log */