@thi.ng/porter-duff
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -6,1 +6,2 @@ import { ArrayLikeIterable, ILength } from "@thi.ng/api"; | ||
export declare type ReadonlyColor = ArrayLikeIterable<number>; | ||
//# sourceMappingURL=api.d.ts.map |
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.1.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/porter-duff@0.1.5...@thi.ng/porter-duff@0.1.6) (2020-01-24) | ||
**Note:** Version bump only for package @thi.ng/porter-duff | ||
## [0.1.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/porter-duff@0.1.4...@thi.ng/porter-duff@0.1.5) (2019-11-30) | ||
@@ -8,0 +16,0 @@ |
export * from "./api"; | ||
export * from "./porter-duff"; | ||
export * from "./premultiply"; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@thi.ng/porter-duff", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Porter-Duff operators for packed ints & float-array alpha compositing", | ||
@@ -26,17 +26,19 @@ "module": "./index.js", | ||
"doc": "node_modules/.bin/typedoc --mode modules --out doc src", | ||
"doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose", | ||
"pub": "yarn build:release && yarn publish --access public" | ||
}, | ||
"devDependencies": { | ||
"@istanbuljs/nyc-config-typescript": "^0.1.3", | ||
"@types/mocha": "^5.2.6", | ||
"@types/node": "^12.12.11", | ||
"mocha": "^6.2.2", | ||
"nyc": "^14.0.0", | ||
"ts-node": "^8.5.2", | ||
"typedoc": "^0.15.2", | ||
"typescript": "^3.7.2" | ||
"@istanbuljs/nyc-config-typescript": "^1.0.1", | ||
"@microsoft/api-extractor": "^7.7.7", | ||
"@types/mocha": "^5.2.7", | ||
"@types/node": "^13.5.0", | ||
"mocha": "^7.0.0", | ||
"nyc": "^15.0.0", | ||
"ts-node": "^8.6.2", | ||
"typedoc": "^0.16.8", | ||
"typescript": "^3.7.5" | ||
}, | ||
"dependencies": { | ||
"@thi.ng/api": "^6.6.0", | ||
"@thi.ng/math": "^1.5.1" | ||
"@thi.ng/api": "^6.7.0", | ||
"@thi.ng/math": "^1.6.0" | ||
}, | ||
@@ -64,3 +66,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "36c4d9e967bd80ccdbfa0f4a42f594080f95f105" | ||
"gitHead": "93d8af817724c1c5b06d80ffa2492fe5b4fb7bc4" | ||
} |
@@ -11,4 +11,4 @@ import { Fn2, Fn3 } from "@thi.ng/api"; | ||
* General Porter-Duff HOF operator for **pre-multiplied** RGBA. Use | ||
* `porderDiffP` for applying pre & post multiplication of input and | ||
* output colors. The returned function takes 3 arguments: | ||
* {@link porterDuffP} for applying pre & post multiplication of input | ||
* and output colors. The returned function takes 3 arguments: | ||
* | ||
@@ -23,6 +23,7 @@ * - `out` color (if `null` or `undefined` writes to `dest`) | ||
* | ||
* Reference: https://keithp.com/~keithp/porterduff/p253-porter.pdf | ||
* Reference: | ||
* {@link https://keithp.com/~keithp/porterduff/p253-porter.pdf} | ||
* | ||
* @param fa fn for src coeff | ||
* @param fb fn for dest coeff | ||
* @param fa - fn for src coeff | ||
* @param fb - fn for dest coeff | ||
*/ | ||
@@ -37,9 +38,9 @@ export declare const porterDuff: (fa: Fn2<number, number, number>, fb: Fn2<number, number, number>) => (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, dest: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
* | ||
* @param mode | ||
* @param mode - | ||
*/ | ||
export declare const porterDuffP: (mode: Fn3<Color | null, import("@thi.ng/api").ArrayLikeIterable<number>, import("@thi.ng/api").ArrayLikeIterable<number>, Color>) => (out: Color, src: import("@thi.ng/api").ArrayLikeIterable<number>, dest: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
/** | ||
* Like `porterDuffP`, but for packed integers. | ||
* Like {@link porterDuffP}, but for packed integers. | ||
* | ||
* @param mode | ||
* @param mode - | ||
*/ | ||
@@ -51,7 +52,7 @@ export declare const porterDuffPInt: (mode: Fn2<number, number, number>) => (src: number, dest: number) => number; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
* | ||
* @param out | ||
* @param src | ||
* @param dest | ||
* @param out - | ||
* @param src - | ||
* @param dest - | ||
*/ | ||
@@ -62,3 +63,3 @@ export declare const CLEAR_F: (out: Color, _: import("@thi.ng/api").ArrayLikeIterable<number>, dest: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -69,3 +70,3 @@ export declare const SRC_F: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, dest: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -77,3 +78,3 @@ export declare const DEST_F: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, dest: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -85,3 +86,3 @@ export declare const SRC_OVER_F: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, dest: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -93,3 +94,3 @@ export declare const DEST_OVER_F: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, dest: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -101,3 +102,3 @@ export declare const SRC_IN_F: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, dest: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -109,3 +110,3 @@ export declare const DEST_IN_F: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, dest: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -117,3 +118,3 @@ export declare const SRC_OUT_F: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, dest: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -125,3 +126,3 @@ export declare const DEST_OUT_F: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, dest: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -133,3 +134,3 @@ export declare const SRC_ATOP_F: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, dest: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -141,3 +142,3 @@ export declare const DEST_ATOP_F: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, dest: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -153,3 +154,3 @@ export declare const XOR_F: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, dest: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -160,3 +161,3 @@ export declare const SRC_I: (a: number, b: number) => number; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -168,3 +169,3 @@ export declare const DEST_I: (a: number, b: number) => number; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -176,3 +177,3 @@ export declare const SRC_OVER_I: (a: number, b: number) => number; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -184,3 +185,3 @@ export declare const DEST_OVER_I: (a: number, b: number) => number; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -192,3 +193,3 @@ export declare const SRC_IN_I: (a: number, b: number) => number; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -200,3 +201,3 @@ export declare const DEST_IN_I: (a: number, b: number) => number; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -208,3 +209,3 @@ export declare const SRC_OUT_I: (a: number, b: number) => number; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -216,3 +217,3 @@ export declare const DEST_OUT_I: (a: number, b: number) => number; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -224,3 +225,3 @@ export declare const SRC_ATOP_I: (a: number, b: number) => number; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -232,3 +233,3 @@ export declare const DEST_ATOP_I: (a: number, b: number) => number; | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -246,5 +247,5 @@ export declare const XOR_I: (a: number, b: number) => number; | ||
* | ||
* @param out | ||
* @param src | ||
* @param t | ||
* @param out - | ||
* @param src - | ||
* @param t - | ||
*/ | ||
@@ -257,5 +258,5 @@ export declare const darken: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, t: number) => Color; | ||
* | ||
* @param out | ||
* @param src | ||
* @param t | ||
* @param out - | ||
* @param src - | ||
* @param t - | ||
*/ | ||
@@ -268,5 +269,5 @@ export declare const dissolve: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, t: number) => Color; | ||
* | ||
* @param out | ||
* @param src | ||
* @param t | ||
* @param out - | ||
* @param src - | ||
* @param t - | ||
*/ | ||
@@ -278,4 +279,4 @@ export declare const opacity: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>, t: number) => Color; | ||
* | ||
* @param src | ||
* @param t | ||
* @param src - | ||
* @param t - | ||
*/ | ||
@@ -287,4 +288,4 @@ export declare const darkenInt: (src: number, t: number) => number; | ||
* | ||
* @param src | ||
* @param t | ||
* @param src - | ||
* @param t - | ||
*/ | ||
@@ -296,5 +297,6 @@ export declare const dissolveInt: (src: number, t: number) => number; | ||
* | ||
* @param src | ||
* @param t | ||
* @param src - | ||
* @param t - | ||
*/ | ||
export declare const opacityInt: (src: number, t: number) => number; | ||
//# sourceMappingURL=porter-duff.d.ts.map |
@@ -13,4 +13,4 @@ import { clamp, clamp01 } from "@thi.ng/math"; | ||
* General Porter-Duff HOF operator for **pre-multiplied** RGBA. Use | ||
* `porderDiffP` for applying pre & post multiplication of input and | ||
* output colors. The returned function takes 3 arguments: | ||
* {@link porterDuffP} for applying pre & post multiplication of input | ||
* and output colors. The returned function takes 3 arguments: | ||
* | ||
@@ -25,6 +25,7 @@ * - `out` color (if `null` or `undefined` writes to `dest`) | ||
* | ||
* Reference: https://keithp.com/~keithp/porterduff/p253-porter.pdf | ||
* Reference: | ||
* {@link https://keithp.com/~keithp/porterduff/p253-porter.pdf} | ||
* | ||
* @param fa fn for src coeff | ||
* @param fb fn for dest coeff | ||
* @param fa - fn for src coeff | ||
* @param fb - fn for dest coeff | ||
*/ | ||
@@ -57,9 +58,9 @@ export const porterDuff = (fa, fb) => (out, src, dest) => { | ||
* | ||
* @param mode | ||
* @param mode - | ||
*/ | ||
export const porterDuffP = (mode) => (out, src, dest) => postmultiply(null, mode(null, premultiply([], src), premultiply(out, dest))); | ||
/** | ||
* Like `porterDuffP`, but for packed integers. | ||
* Like {@link porterDuffP}, but for packed integers. | ||
* | ||
* @param mode | ||
* @param mode - | ||
*/ | ||
@@ -71,7 +72,7 @@ export const porterDuffPInt = (mode) => (src, dest) => postmultiplyInt(mode(premultiplyInt(src), premultiplyInt(dest))); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
* | ||
* @param out | ||
* @param src | ||
* @param dest | ||
* @param out - | ||
* @param src - | ||
* @param dest - | ||
*/ | ||
@@ -82,3 +83,3 @@ export const CLEAR_F = (out, _, dest) => setN4(out || dest, 0); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -89,3 +90,3 @@ export const SRC_F = porterDuff(ONE, ZERO); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -97,3 +98,3 @@ export const DEST_F = porterDuff(ZERO, ONE); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -105,3 +106,3 @@ export const SRC_OVER_F = porterDuff(ONE, ONE_MINUS_A); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -113,3 +114,3 @@ export const DEST_OVER_F = porterDuff(ONE_MINUS_B, ONE); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -121,3 +122,3 @@ export const SRC_IN_F = porterDuff(B, ZERO); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -129,3 +130,3 @@ export const DEST_IN_F = porterDuff(ZERO, A); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -137,3 +138,3 @@ export const SRC_OUT_F = porterDuff(ONE_MINUS_B, ZERO); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -145,3 +146,3 @@ export const DEST_OUT_F = porterDuff(ZERO, ONE_MINUS_A); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -153,3 +154,3 @@ export const SRC_ATOP_F = porterDuff(B, ONE_MINUS_A); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -161,3 +162,3 @@ export const DEST_ATOP_F = porterDuff(ONE_MINUS_B, A); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -174,3 +175,3 @@ export const XOR_F = porterDuff(ONE_MINUS_B, ONE_MINUS_A); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -181,3 +182,3 @@ export const SRC_I = porterDuffInt(ONE, ZERO); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -189,3 +190,3 @@ export const DEST_I = porterDuffInt(ZERO, ONE); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -197,3 +198,3 @@ export const SRC_OVER_I = porterDuffInt(ONE, ONE_MINUS_A); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -205,3 +206,3 @@ export const DEST_OVER_I = porterDuffInt(ONE_MINUS_B, ONE); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -213,3 +214,3 @@ export const SRC_IN_I = porterDuffInt(B, ZERO); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -221,3 +222,3 @@ export const DEST_IN_I = porterDuffInt(ZERO, A); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -229,3 +230,3 @@ export const SRC_OUT_I = porterDuffInt(ONE_MINUS_B, ZERO); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -237,3 +238,3 @@ export const DEST_OUT_I = porterDuffInt(ZERO, ONE_MINUS_A); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -245,3 +246,3 @@ export const SRC_ATOP_I = porterDuffInt(B, ONE_MINUS_A); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -253,3 +254,3 @@ export const DEST_ATOP_I = porterDuffInt(ONE_MINUS_B, A); | ||
* | ||
* @see porterDuff | ||
* {@link porterDuff} | ||
*/ | ||
@@ -267,5 +268,5 @@ export const XOR_I = porterDuffInt(ONE_MINUS_B, ONE_MINUS_A); | ||
* | ||
* @param out | ||
* @param src | ||
* @param t | ||
* @param out - | ||
* @param src - | ||
* @param t - | ||
*/ | ||
@@ -278,5 +279,5 @@ export const darken = (out, src, t) => setC4(out || src, src[0] * t, src[1] * t, src[2] * t, src[3]); | ||
* | ||
* @param out | ||
* @param src | ||
* @param t | ||
* @param out - | ||
* @param src - | ||
* @param t - | ||
*/ | ||
@@ -289,5 +290,5 @@ export const dissolve = (out, src, t) => setC4(out || src, src[0] * t, src[1] * t, src[2] * t, min(1, src[3] * t)); | ||
* | ||
* @param out | ||
* @param src | ||
* @param t | ||
* @param out - | ||
* @param src - | ||
* @param t - | ||
*/ | ||
@@ -299,4 +300,4 @@ export const opacity = (out, src, t) => setC4(out || src, src[0], src[1], src[2], min(1, src[3] * t)); | ||
* | ||
* @param src | ||
* @param t | ||
* @param src - | ||
* @param t - | ||
*/ | ||
@@ -311,4 +312,4 @@ export const darkenInt = (src, t) => (src & 0xff000000) | | ||
* | ||
* @param src | ||
* @param t | ||
* @param src - | ||
* @param t - | ||
*/ | ||
@@ -323,5 +324,5 @@ export const dissolveInt = (src, t) => (min(0xff, ((src >>> 24) & 0xff) * t) << 24) | | ||
* | ||
* @param src | ||
* @param t | ||
* @param src - | ||
* @param t - | ||
*/ | ||
export const opacityInt = (src, t) => (min(0xff, ((src >>> 24) & 0xff) * t) << 24) | (src & 0xffffff); |
@@ -6,4 +6,4 @@ import { Color } from "./api"; | ||
* | ||
* @param out | ||
* @param src | ||
* @param out - | ||
* @param src - | ||
*/ | ||
@@ -15,19 +15,19 @@ export declare const premultiply: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
* | ||
* @param src | ||
* @param src - | ||
*/ | ||
export declare const premultiplyInt: (src: number) => number; | ||
/** | ||
* Reverse operation of `premultiply`. Divides RGB channels | ||
* Reverse operation of {@link premultiply}. Divides RGB channels | ||
* by alpha, unless alpha is zero. Does NOT clamp result. | ||
* | ||
* @param out | ||
* @param src | ||
* @param out - | ||
* @param src - | ||
*/ | ||
export declare const postmultiply: (out: Color | null, src: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
/** | ||
* Reverse op of `premultiplyInt`. Assumes 8bits/channel and alpha in | ||
* Reverse op of {@link premultiplyInt}. Assumes 8bits/channel and alpha in | ||
* MSB lane. Divides RGB channels by alpha (unless zero) and DOES clamp | ||
* result to avoid overflows. | ||
* | ||
* @param src | ||
* @param src - | ||
*/ | ||
@@ -38,3 +38,3 @@ export declare const postmultiplyInt: (src: number) => number; | ||
* | ||
* @param src | ||
* @param src - | ||
*/ | ||
@@ -45,4 +45,5 @@ export declare const isPremultiplied: (src: import("@thi.ng/api").ArrayLikeIterable<number>) => boolean; | ||
* | ||
* @param src | ||
* @param src - | ||
*/ | ||
export declare const isPremultipliedInt: (src: number) => boolean; | ||
//# sourceMappingURL=premultiply.d.ts.map |
@@ -6,4 +6,4 @@ import { setC4, setV4 } from "./utils"; | ||
* | ||
* @param out | ||
* @param src | ||
* @param out - | ||
* @param src - | ||
*/ | ||
@@ -18,3 +18,3 @@ export const premultiply = (out, src) => { | ||
* | ||
* @param src | ||
* @param src - | ||
*/ | ||
@@ -29,7 +29,7 @@ export const premultiplyInt = (src) => { | ||
/** | ||
* Reverse operation of `premultiply`. Divides RGB channels | ||
* Reverse operation of {@link premultiply}. Divides RGB channels | ||
* by alpha, unless alpha is zero. Does NOT clamp result. | ||
* | ||
* @param out | ||
* @param src | ||
* @param out - | ||
* @param src - | ||
*/ | ||
@@ -45,7 +45,7 @@ export const postmultiply = (out, src) => { | ||
/** | ||
* Reverse op of `premultiplyInt`. Assumes 8bits/channel and alpha in | ||
* Reverse op of {@link premultiplyInt}. Assumes 8bits/channel and alpha in | ||
* MSB lane. Divides RGB channels by alpha (unless zero) and DOES clamp | ||
* result to avoid overflows. | ||
* | ||
* @param src | ||
* @param src - | ||
*/ | ||
@@ -65,3 +65,3 @@ export const postmultiplyInt = (src) => { | ||
* | ||
* @param src | ||
* @param src - | ||
*/ | ||
@@ -75,3 +75,3 @@ export const isPremultiplied = (src) => { | ||
* | ||
* @param src | ||
* @param src - | ||
*/ | ||
@@ -78,0 +78,0 @@ export const isPremultipliedInt = (src) => { |
@@ -23,4 +23,4 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
- [Custom operators](#custom-operators) | ||
- [Additional operators / modifiers](#additional-operators---modifiers) | ||
- [Pre/post-multiplied colors](#pre-post-multiplied-colors) | ||
- [Additional operators / modifiers](#additional-operators--modifiers) | ||
- [Pre/post-multiplied colors](#prepost-multiplied-colors) | ||
- [Authors](#authors) | ||
@@ -53,4 +53,4 @@ - [License](#license) | ||
- [@thi.ng/pixel](https://github.com/thi-ng/umbrella/tree/master/packages/pixel) - Typed array backed, packed pixel buffer w/ customizable formats, blitting, conversions | ||
- [@thi.ng/shader-ast-stdlib](https://github.com/thi-ng/umbrella/tree/master/packages/shader-ast-stdlib) - Function collection for modular GPGPU / shader programming with [@thi.ng/shader-ast](https://github.com/thi-ng/umbrella/tree/master/packages/shader-ast) | ||
- [@thi.ng/pixel](https://github.com/thi-ng/umbrella/tree/develop/packages/pixel) - Typed array backed, packed pixel buffer w/ customizable formats, blitting, conversions | ||
- [@thi.ng/shader-ast-stdlib](https://github.com/thi-ng/umbrella/tree/develop/packages/shader-ast-stdlib) - Function collection for modular GPGPU / shader programming with [@thi.ng/shader-ast](https://github.com/thi-ng/umbrella/tree/develop/packages/shader-ast) | ||
@@ -63,6 +63,8 @@ ## Installation | ||
Package sizes (gzipped): ESM: 1.0KB / CJS: 1.2KB / UMD: 1.1KB | ||
## Dependencies | ||
- [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/master/packages/api) | ||
- [@thi.ng/math](https://github.com/thi-ng/umbrella/tree/master/packages/math) | ||
- [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/develop/packages/api) | ||
- [@thi.ng/math](https://github.com/thi-ng/umbrella/tree/develop/packages/math) | ||
@@ -72,3 +74,3 @@ ## Usage examples | ||
Several demos in this repo's | ||
[/examples](https://github.com/thi-ng/umbrella/tree/master/examples) | ||
[/examples](https://github.com/thi-ng/umbrella/tree/develop/examples) | ||
directory are using this package. | ||
@@ -80,11 +82,11 @@ | ||
 | ||
 | ||
[Live demo](https://demo.thi.ng/umbrella/pixel-basics/) | [Source](https://github.com/thi-ng/umbrella/tree/master/examples/pixel-basics) | ||
[Live demo](https://demo.thi.ng/umbrella/pixel-basics/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/pixel-basics) | ||
### porter-duff <!-- NOTOC --> | ||
 | ||
 | ||
[Live demo](https://demo.thi.ng/umbrella/porter-duff/) | [Source](https://github.com/thi-ng/umbrella/tree/master/examples/porter-duff) | ||
[Live demo](https://demo.thi.ng/umbrella/porter-duff/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/porter-duff) | ||
@@ -192,2 +194,2 @@ ## API | ||
© 2018 - 2019 Karsten Schmidt // Apache Software License 2.0 | ||
© 2018 - 2020 Karsten Schmidt // Apache Software License 2.0 |
@@ -44,2 +44,4 @@ # ${pkg.name} | ||
${pkg.size} | ||
## Dependencies | ||
@@ -46,0 +48,0 @@ |
import { Color } from "./api"; | ||
/** @internal */ | ||
export declare const setC4: (out: Color, a: number, b: number, c: number, d: number) => Color; | ||
/** @internal */ | ||
export declare const setN4: (out: Color, n: number) => Color; | ||
/** @internal */ | ||
export declare const setV4: (out: Color, a: import("@thi.ng/api").ArrayLikeIterable<number>) => Color; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -0,3 +1,6 @@ | ||
/** @internal */ | ||
export const setC4 = (out, a, b, c, d) => ((out[0] = a), (out[1] = b), (out[2] = c), (out[3] = d), out); | ||
/** @internal */ | ||
export const setN4 = (out, n) => setC4(out, n, n, n, n); | ||
/** @internal */ | ||
export const setV4 = (out, a) => setC4(out, a[0], a[1], a[2], a[3]); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
870
190
75032
9
19
Updated@thi.ng/api@^6.7.0
Updated@thi.ng/math@^1.6.0