Skip to content

Commit

Permalink
Chore: update documentation (pixijs#9161)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyie authored Feb 15, 2023
1 parent f009769 commit 7c6eb60
Show file tree
Hide file tree
Showing 41 changed files with 780 additions and 277 deletions.
3 changes: 3 additions & 0 deletions packages/assets/src/loader/parsers/LoaderParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import type { LoadAsset } from '../types';
* The extension priority for loader parsers.
* Helpful when managing multiple parsers that share the same extension
* test. The higher priority parsers will be checked first.
* @static
* @memberof PIXI
* @enum {number}
*/
export enum LoaderParserPriority
// eslint-disable-next-line @typescript-eslint/indent
Expand Down
4 changes: 4 additions & 0 deletions packages/assets/src/loader/parsers/loadWebFont.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ const validFontMIMEs = [
'font/woff2',
];

/**
* Loader plugin for handling web fonts
* @memberof PIXI
*/
export type LoadFontData = {
family: string;
display: string;
Expand Down
5 changes: 1 addition & 4 deletions packages/basis/src/Basis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,7 @@ export type BasisTextureExtensions = {
};
/* eslint-enable camelcase */

/**
* API provided by basis_universal WebGL library.
* @ignore
*/
/** API provided by basis_universal WebGL library. */
export type BasisBinding = {
BasisFile: typeof BasisFile,
initializeBasis(): void
Expand Down
1 change: 0 additions & 1 deletion packages/canvas-renderer/src/CanvasContextSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const tempMatrix = new Matrix();
/**
* Rendering context for all browsers. This includes platform-specific
* properties that are not included in the spec for CanvasRenderingContext2D
* @private
*/
export interface CrossPlatformCanvasRenderingContext2D extends ICanvasRenderingContext2D
{
Expand Down
1 change: 0 additions & 1 deletion packages/canvas-renderer/src/CanvasRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export interface CanvasRenderer extends GlobalMixins.CanvasRenderer {}
* | ------------------------------------ | ----------------------------------------------------------------------------- |
* | {@link PIXI.CanvasContextSystem} | This manages the canvas `2d` contexts and their state |
* | {@link PIXI.CanvasMaskSystem} | This manages masking operations. |
* | {@link PIXI.CanvasRenderSystem} | This adds the ability to render a PIXI.DisplayObject |
* | {@link PIXI.CanvasExtract} | This extracts image data from a PIXI.DisplayObject |
* | {@link PIXI.CanvasPrepare} | This prepares a PIXI.DisplayObject async for rendering |
*
Expand Down
108 changes: 81 additions & 27 deletions packages/compressed-textures/src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,77 +4,131 @@
* @static
* @name INTERNAL_FORMATS
* @enum {number}
* @property {number} [COMPRESSED_RGB_S3TC_DXT1_EXT=0x83F0] -
* @property {number} [COMPRESSED_RGBA_S3TC_DXT1_EXT=0x83F1] -
* @property {number} [COMPRESSED_RGBA_S3TC_DXT3_EXT=0x83F2] -
* @property {number} [COMPRESSED_RGBA_S3TC_DXT5_EXT=0x83F3] -
* @property {number} [COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917] -
* @property {number} [COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918] -
* @property {number} [COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919] -
* @property {number} [COMPRESSED_SRGB_S3TC_DXT1_EXT=35916] -
* @property {number} [COMPRESSED_R11_EAC=0x9270] -
* @property {number} [COMPRESSED_SIGNED_R11_EAC=0x9271] -
* @property {number} [COMPRESSED_RG11_EAC=0x9272] -
* @property {number} [COMPRESSED_SIGNED_RG11_EAC=0x9273] -
* @property {number} [COMPRESSED_RGB8_ETC2=0x9274] -
* @property {number} [COMPRESSED_RGBA8_ETC2_EAC=0x9278] -
* @property {number} [COMPRESSED_SRGB8_ETC2=0x9275] -
* @property {number} [COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=0x9279] -
* @property {number} [COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=0x9276] -
* @property {number} [COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=0x9277] -
* @property {number} [COMPRESSED_RGB_PVRTC_4BPPV1_IMG=0x8C00] -
* @property {number} [COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=0x8C02] -
* @property {number} [COMPRESSED_RGB_PVRTC_2BPPV1_IMG=0x8C01] -
* @property {number} [COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=0x8C03] -
* @property {number} [COMPRESSED_RGB_ETC1_WEBGL=0x8D64] -
* @property {number} [COMPRESSED_RGB_ATC_WEBGL=0x8C92] -
* @property {number} [COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=0x8C92] -
* @property {number} [COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=0x87EE] -
* @property {number} [COMPRESSED_RGBA_ASTC_4x4_KHR=0x93B0] -
*/
export enum INTERNAL_FORMATS
// eslint-disable-next-line @typescript-eslint/indent
{
// WEBGL_compressed_texture_s3tc
/**
* @default 0x83F0
*/
COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0,
/**
* @default 0x83F1
*/
COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1,
/**
* @default 0x83F2
*/
COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2,
/**
* @default 0x83F3
*/
COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3,

// WEBGL_compressed_texture_s3tc_srgb
/**
* @default 35917
*/
COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 35917,
/**
* @default 35918
*/
COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 35918,
/**
* @default 35919
*/
COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 35919,
/**
* @default 35916
*/
COMPRESSED_SRGB_S3TC_DXT1_EXT = 35916,

// WEBGL_compressed_texture_etc
/**
* @default 0x9270
*/
COMPRESSED_R11_EAC = 0x9270,
/**
* @default 0x9271
*/
COMPRESSED_SIGNED_R11_EAC = 0x9271,
/**
* @default 0x9272
*/
COMPRESSED_RG11_EAC = 0x9272,
/**
* @default 0x9273
*/
COMPRESSED_SIGNED_RG11_EAC = 0x9273,
/**
* @default 0x9274
*/
COMPRESSED_RGB8_ETC2 = 0x9274,
/**
* @default 0x9278
*/
COMPRESSED_RGBA8_ETC2_EAC = 0x9278,
/**
* @default 0x9275
*/
COMPRESSED_SRGB8_ETC2 = 0x9275,
/**
* @default 0x9279
*/
COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279,
/**
* @default 0x9276
*/
COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276,
/**
* @default 0x9277
*/
COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277,

// WEBGL_compressed_texture_pvrtc
/**
* @default 0x8C00
*/
COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00,
/**
* @default 0x8C02
*/
COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02,
/**
* @default 0x8C01
*/
COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8C01,
/**
* @default 0x8C03
*/
COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03,

// WEBGL_compressed_texture_etc1
/**
* @default 0x8D64
*/
COMPRESSED_RGB_ETC1_WEBGL = 0x8D64,

// WEBGL_compressed_texture_atc
/**
* @default 0x8C92
*/
COMPRESSED_RGB_ATC_WEBGL = 0x8C92,
/**
* @default 0x8C92
*/
COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL = 0x8C92, // TODO: Probably a bug on the MDN site
/**
* @default 0x87EE
*/
COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL = 0x87EE,

// WEBGL_compressed_texture_astc
/* eslint-disable-next-line camelcase */
/**
* @default 0x93B0
*/
COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0,
}

Expand Down
2 changes: 1 addition & 1 deletion packages/compressed-textures/src/resources/BlobResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export abstract class BlobResource extends BufferResource
* @param {string} source - the URL of the texture file
* @param {PIXI.IBlobOptions} options
* @param {boolean}[options.autoLoad] - whether to fetch the data immediately;
* you can fetch it later via {@link BlobResource#load}
* you can fetch it later via {@link PIXI.BlobResource#load}
* @param {boolean}[options.width] - the width in pixels.
* @param {boolean}[options.height] - the height in pixels.
*/
Expand Down
Loading

0 comments on commit 7c6eb60

Please sign in to comment.