@twin.org/image 0.0.1-next.4 → 0.0.1-next.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/changelog.md
CHANGED
|
@@ -12,19 +12,27 @@ Create a new instance of color.
|
|
|
12
12
|
|
|
13
13
|
#### Parameters
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
##### alpha
|
|
16
|
+
|
|
17
|
+
`number`
|
|
16
18
|
|
|
17
19
|
The alpha element of the color.
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
##### red
|
|
22
|
+
|
|
23
|
+
`number`
|
|
20
24
|
|
|
21
25
|
The red element of the color.
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
##### green
|
|
28
|
+
|
|
29
|
+
`number`
|
|
24
30
|
|
|
25
31
|
The green element of the color.
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
##### blue
|
|
34
|
+
|
|
35
|
+
`number`
|
|
28
36
|
|
|
29
37
|
The blue element of the color.
|
|
30
38
|
|
|
@@ -42,7 +50,9 @@ Construct a color from a hex string.
|
|
|
42
50
|
|
|
43
51
|
#### Parameters
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
##### hex
|
|
54
|
+
|
|
55
|
+
`string`
|
|
46
56
|
|
|
47
57
|
The hex string to parse.
|
|
48
58
|
|
|
@@ -66,7 +76,9 @@ Coerce an unknown type to a color.
|
|
|
66
76
|
|
|
67
77
|
#### Parameters
|
|
68
78
|
|
|
69
|
-
|
|
79
|
+
##### value
|
|
80
|
+
|
|
81
|
+
`unknown`
|
|
70
82
|
|
|
71
83
|
The value to try and convert.
|
|
72
84
|
|
|
@@ -25,19 +25,27 @@ Encode the image with the given quality.
|
|
|
25
25
|
|
|
26
26
|
#### Parameters
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
##### width
|
|
29
|
+
|
|
30
|
+
`number`
|
|
29
31
|
|
|
30
32
|
The width of the image to encode.
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
##### height
|
|
35
|
+
|
|
36
|
+
`number`
|
|
33
37
|
|
|
34
38
|
The height of the image to encode.
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
##### imageData
|
|
41
|
+
|
|
42
|
+
`Uint8Array`
|
|
37
43
|
|
|
38
44
|
The data for the image.
|
|
39
45
|
|
|
40
|
-
|
|
46
|
+
##### quality
|
|
47
|
+
|
|
48
|
+
`number`
|
|
41
49
|
|
|
42
50
|
The quality to encode the image at.
|
|
43
51
|
|
|
@@ -23,15 +23,21 @@ Encode the image frames to png.
|
|
|
23
23
|
|
|
24
24
|
#### Parameters
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
##### buffers
|
|
27
|
+
|
|
28
|
+
`ArrayBuffer`[]
|
|
27
29
|
|
|
28
30
|
The frame buffers to encode.
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
##### w
|
|
33
|
+
|
|
34
|
+
`number`
|
|
31
35
|
|
|
32
36
|
The image width.
|
|
33
37
|
|
|
34
|
-
|
|
38
|
+
##### h
|
|
39
|
+
|
|
40
|
+
`number`
|
|
35
41
|
|
|
36
42
|
The image height.
|
|
37
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/image",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.41",
|
|
4
4
|
"description": "Classes for image manipulation",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/core": "0.0.1-next.
|
|
17
|
+
"@twin.org/core": "0.0.1-next.41",
|
|
18
18
|
"@twin.org/nameof": "next"
|
|
19
19
|
},
|
|
20
20
|
"main": "./dist/cjs/index.cjs",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"types": "./dist/types/index.d.ts",
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
|
+
"types": "./dist/types/index.d.ts",
|
|
25
26
|
"require": "./dist/cjs/index.cjs",
|
|
26
|
-
"import": "./dist/esm/index.mjs"
|
|
27
|
-
"types": "./dist/types/index.d.ts"
|
|
27
|
+
"import": "./dist/esm/index.mjs"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"files": [
|