UNPKG
pixel-utils
Version:
latest (0.9.0)
0.9.0
0.8.0
0.7.0
0.6.0
0.5.0
0.4.0
0.3.0
0.2.1
0.2.0
0.1.0
0.0.3
0.0.2
Utility Functions for Pixels
github.com/DanielJDufour/pixel-utils
DanielJDufour/pixel-utils
pixel-utils
/
src
/
set-visible
/
index.ts
10 lines
(8 loc)
•
242 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
import
type
{
AnyRGBA
,
CleanRGBA
}
from
"../types"
;
// make a given rgba value visible
export
default
function
setVisible<R, G, B, A>(
pixel
: [R, G, B, A]): [R, G, B,
255
] {
// @ts-ignore
pixel[
3
] =
255
;
// @ts-ignore
return
pixel; }