@thi.ng/porter-duff
Advanced tools
Comparing version 0.1.25 to 0.1.26
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.1.26](https://github.com/thi-ng/umbrella/compare/@thi.ng/porter-duff@0.1.25...@thi.ng/porter-duff@0.1.26) (2020-07-28) | ||
**Note:** Version bump only for package @thi.ng/porter-duff | ||
## [0.1.25](https://github.com/thi-ng/umbrella/compare/@thi.ng/porter-duff@0.1.24...@thi.ng/porter-duff@0.1.25) (2020-07-17) | ||
@@ -8,0 +16,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@thi.ng/math")):"function"==typeof define&&define.amd?define(["exports","@thi.ng/math"],n):n(((t=t||self).thi=t.thi||{},t.thi.ng=t.thi.ng||{},t.thi.ng.porterDuff={}),t.thi.ng.math)}(this,(function(t,n){"use strict";const e=(t,n,e,_,r)=>(t[0]=n,t[1]=e,t[2]=_,t[3]=r,t),_=(t,n)=>{const _=n[3];return e(t||n,n[0]*_,n[1]*_,n[2]*_,_)},r=t=>{const n=(t>>>24)/255;return 4278190080&t|(t>>>16&255)*n<<16|(t>>>8&255)*n<<8|(255&t)*n},i=(t,n)=>{const _=n[3];return _>0?e(t||n,n[0]/_,n[1]/_,n[2]/_,_):t&&t!=n?((t,n)=>e(t,n[0],n[1],n[2],n[3]))(t,n):n},o=t=>{const n=(t>>>24)/255;return n>0?(4278190080&t|Math.min(255,(t>>>16&255)/n)<<16|Math.min(255,(t>>>8&255)/n)<<8|Math.min(255,(255&t)/n))>>>0:t},u=Math.min,p=()=>0,l=()=>1,I=t=>t,s=(t,n)=>n,S=t=>1-t,c=(t,n)=>1-n,f=(t,_)=>(r,i,o)=>{const u=i[3],p=o[3],l=t(u,p),I=_(u,p);return e(r||o,i[0]*l+o[0]*I,i[1]*l+o[1]*I,i[2]*l+o[2]*I,n.clamp01(i[3]*l+o[3]*I))},m=(t,e)=>(_,r)=>{const i=(_>>>24)/255,o=(r>>>24)/255,u=t(i,o),p=e(i,o);return n.clamp((_>>>24&255)*u+(r>>>24&255)*p,0,255)<<24|n.clamp((_>>>16&255)*u+(r>>>16&255)*p,0,255)<<16|n.clamp((_>>>8&255)*u+(r>>>8&255)*p,0,255)<<8|n.clamp((255&_)*u+(255&r)*p,0,255)},E=f(l,p),O=f(p,l),R=f(l,S),a=f(c,l),T=f(s,p),h=f(p,I),d=f(c,p),D=f(p,S),F=f(s,S),C=f(c,I),P=f(c,S),y=f(l,l),N=p,A=m(l,p),U=m(p,l),M=m(l,S),g=m(c,l),L=m(s,p),V=m(p,I),v=m(c,p),x=m(p,S),b=m(s,S),j=m(c,I),k=m(c,S),B=m(l,l);t.A=I,t.B=s,t.CLEAR_F=(t,n,_)=>((t,n)=>e(t,n,n,n,n))(t||_,0),t.CLEAR_I=N,t.DEST_ATOP_F=C,t.DEST_ATOP_I=j,t.DEST_F=O,t.DEST_I=U,t.DEST_IN_F=h,t.DEST_IN_I=V,t.DEST_OUT_F=D,t.DEST_OUT_I=x,t.DEST_OVER_F=a,t.DEST_OVER_I=g,t.ONE=l,t.ONE_MINUS_A=S,t.ONE_MINUS_B=c,t.PLUS_F=y,t.PLUS_I=B,t.SRC_ATOP_F=F,t.SRC_ATOP_I=b,t.SRC_F=E,t.SRC_I=A,t.SRC_IN_F=T,t.SRC_IN_I=L,t.SRC_OUT_F=d,t.SRC_OUT_I=v,t.SRC_OVER_F=R,t.SRC_OVER_I=M,t.XOR_F=P,t.XOR_I=k,t.ZERO=p,t.darken=(t,n,_)=>e(t||n,n[0]*_,n[1]*_,n[2]*_,n[3]),t.darkenInt=(t,n)=>4278190080&t|u(255,(t>>>16&255)*n)<<16|u(255,(t>>>8&255)*n)<<8|u(255,(255&t)*n),t.dissolve=(t,n,_)=>e(t||n,n[0]*_,n[1]*_,n[2]*_,u(1,n[3]*_)),t.dissolveInt=(t,n)=>u(255,(t>>>24&255)*n)<<24|u(255,(t>>>16&255)*n)<<16|u(255,(t>>>8&255)*n)<<8|u(255,(255&t)*n),t.isPremultiplied=t=>{const n=t[3];return t[0]<=n&&t[1]<=n||t[2]<=n},t.isPremultipliedInt=t=>{const n=t>>>24;return(t>>>16&255)<=n&&(t>>>8&255)<=n&&(255&t)<=n},t.opacity=(t,n,_)=>e(t||n,n[0],n[1],n[2],u(1,n[3]*_)),t.opacityInt=(t,n)=>u(255,(t>>>24&255)*n)<<24|16777215&t,t.porterDuff=f,t.porterDuffInt=m,t.porterDuffP=t=>(n,e,r)=>i(null,t(null,_([],e),_(n,r))),t.porterDuffPInt=t=>(n,e)=>o(t(r(n),r(e))),t.postmultiply=i,t.postmultiplyInt=o,t.premultiply=_,t.premultiplyInt=r,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@thi.ng/math")):"function"==typeof define&&define.amd?define(["exports","@thi.ng/math"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).thi=t.thi||{},t.thi.ng=t.thi.ng||{},t.thi.ng.porterDuff={}),t.thi.ng.math)}(this,(function(t,e){"use strict";const n=(t,e,n,_,i)=>(t[0]=e,t[1]=n,t[2]=_,t[3]=i,t),_=(t,e)=>{const _=e[3];return n(t||e,e[0]*_,e[1]*_,e[2]*_,_)},i=t=>{const e=(t>>>24)/255;return 4278190080&t|(t>>>16&255)*e<<16|(t>>>8&255)*e<<8|(255&t)*e},r=(t,e)=>{const _=e[3];return _>0?n(t||e,e[0]/_,e[1]/_,e[2]/_,_):t&&t!=e?((t,e)=>n(t,e[0],e[1],e[2],e[3]))(t,e):e},o=t=>{const e=(t>>>24)/255;return e>0?(4278190080&t|Math.min(255,(t>>>16&255)/e)<<16|Math.min(255,(t>>>8&255)/e)<<8|Math.min(255,(255&t)/e))>>>0:t},l=Math.min,u=()=>0,p=()=>1,s=t=>t,I=(t,e)=>e,f=t=>1-t,S=(t,e)=>1-e,c=(t,_)=>(i,r,o)=>{const l=r[3],u=o[3],p=t(l,u),s=_(l,u);return n(i||o,r[0]*p+o[0]*s,r[1]*p+o[1]*s,r[2]*p+o[2]*s,e.clamp01(r[3]*p+o[3]*s))},a=(t,n)=>(_,i)=>{const r=(_>>>24)/255,o=(i>>>24)/255,l=t(r,o),u=n(r,o);return e.clamp((_>>>24&255)*l+(i>>>24&255)*u,0,255)<<24|e.clamp((_>>>16&255)*l+(i>>>16&255)*u,0,255)<<16|e.clamp((_>>>8&255)*l+(i>>>8&255)*u,0,255)<<8|e.clamp((255&_)*l+(255&i)*u,0,255)},m=c(p,u),E=c(u,p),T=c(p,f),O=c(S,p),R=c(I,u),h=c(u,s),d=c(S,u),D=c(u,f),F=c(I,f),C=c(S,s),y=c(S,f),P=c(p,p),N=u,g=a(p,u),A=a(u,p),U=a(p,f),M=a(S,p),b=a(I,u),L=a(u,s),V=a(S,u),v=a(u,f),x=a(I,f),j=a(S,s),k=a(S,f),B=a(p,p);t.A=s,t.B=I,t.CLEAR_F=(t,e,_)=>((t,e)=>n(t,e,e,e,e))(t||_,0),t.CLEAR_I=N,t.DEST_ATOP_F=C,t.DEST_ATOP_I=j,t.DEST_F=E,t.DEST_I=A,t.DEST_IN_F=h,t.DEST_IN_I=L,t.DEST_OUT_F=D,t.DEST_OUT_I=v,t.DEST_OVER_F=O,t.DEST_OVER_I=M,t.ONE=p,t.ONE_MINUS_A=f,t.ONE_MINUS_B=S,t.PLUS_F=P,t.PLUS_I=B,t.SRC_ATOP_F=F,t.SRC_ATOP_I=x,t.SRC_F=m,t.SRC_I=g,t.SRC_IN_F=R,t.SRC_IN_I=b,t.SRC_OUT_F=d,t.SRC_OUT_I=V,t.SRC_OVER_F=T,t.SRC_OVER_I=U,t.XOR_F=y,t.XOR_I=k,t.ZERO=u,t.darken=(t,e,_)=>n(t||e,e[0]*_,e[1]*_,e[2]*_,e[3]),t.darkenInt=(t,e)=>4278190080&t|l(255,(t>>>16&255)*e)<<16|l(255,(t>>>8&255)*e)<<8|l(255,(255&t)*e),t.dissolve=(t,e,_)=>n(t||e,e[0]*_,e[1]*_,e[2]*_,l(1,e[3]*_)),t.dissolveInt=(t,e)=>l(255,(t>>>24&255)*e)<<24|l(255,(t>>>16&255)*e)<<16|l(255,(t>>>8&255)*e)<<8|l(255,(255&t)*e),t.isPremultiplied=t=>{const e=t[3];return t[0]<=e&&t[1]<=e||t[2]<=e},t.isPremultipliedInt=t=>{const e=t>>>24;return(t>>>16&255)<=e&&(t>>>8&255)<=e&&(255&t)<=e},t.opacity=(t,e,_)=>n(t||e,e[0],e[1],e[2],l(1,e[3]*_)),t.opacityInt=(t,e)=>l(255,(t>>>24&255)*e)<<24|16777215&t,t.porterDuff=c,t.porterDuffInt=a,t.porterDuffP=t=>(e,n,i)=>r(null,t(null,_([],n),_(e,i))),t.porterDuffPInt=t=>(e,n)=>o(t(i(e),i(n))),t.postmultiply=r,t.postmultiplyInt=o,t.premultiply=_,t.premultiplyInt=i,Object.defineProperty(t,"__esModule",{value:!0})})); |
{ | ||
"name": "@thi.ng/porter-duff", | ||
"version": "0.1.25", | ||
"version": "0.1.26", | ||
"description": "Porter-Duff operators for packed ints & float-array alpha compositing", | ||
@@ -42,5 +42,5 @@ "module": "./index.js", | ||
"@istanbuljs/nyc-config-typescript": "^1.0.1", | ||
"@microsoft/api-extractor": "^7.8.0", | ||
"@types/mocha": "^7.0.2", | ||
"@types/node": "^14.0.1", | ||
"@microsoft/api-extractor": "^7.9.2", | ||
"@types/mocha": "^8.0.0", | ||
"@types/node": "^14.0.26", | ||
"mocha": "^8.0.1", | ||
@@ -50,7 +50,7 @@ "nyc": "^15.1.0", | ||
"typedoc": "^0.17.6", | ||
"typescript": "^3.9.5" | ||
"typescript": "^3.9.7" | ||
}, | ||
"dependencies": { | ||
"@thi.ng/api": "^6.11.3", | ||
"@thi.ng/math": "^2.0.0" | ||
"@thi.ng/api": "^6.12.0", | ||
"@thi.ng/math": "^2.0.1" | ||
}, | ||
@@ -83,3 +83,3 @@ "files": [ | ||
}, | ||
"gitHead": "ca21a57b0c9b12244dc501a160b7f70f2002d973" | ||
"gitHead": "6a1b929361ede67d425a0dbd12cf4bce56c1f8f8" | ||
} |
@@ -69,3 +69,3 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
Package sizes (gzipped, pre-treeshake): ESM: 998 bytes / CJS: 1.16 KB / UMD: 1.13 KB | ||
Package sizes (gzipped, pre-treeshake): ESM: 998 bytes / CJS: 1.16 KB / UMD: 1.14 KB | ||
@@ -72,0 +72,0 @@ ## Dependencies |
70833
Updated@thi.ng/api@^6.12.0
Updated@thi.ng/math@^2.0.1