@napi-rs/canvas 0.1.77 → 0.1.79
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/README.md +1 -1
- package/geometry.js +18 -11
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# `skr canvas`
|
|
2
2
|
|
|
3
3
|
[](https://github.com/Brooooooklyn/canvas/actions/workflows/CI.yaml)
|
|
4
|
-

|
|
5
5
|
[](https://packagephobia.com/result?p=@napi-rs/canvas)
|
|
6
6
|
[](https://npmcharts.com/compare/@napi-rs/canvas?minimal=true)
|
|
7
7
|
|
package/geometry.js
CHANGED
|
@@ -729,7 +729,7 @@ class DOMMatrix {
|
|
|
729
729
|
}
|
|
730
730
|
|
|
731
731
|
inverse() {
|
|
732
|
-
return newInstance(this[VALUES]).invertSelf()
|
|
732
|
+
return newInstance(this[VALUES].slice()).invertSelf()
|
|
733
733
|
}
|
|
734
734
|
|
|
735
735
|
invertSelf() {
|
|
@@ -738,16 +738,21 @@ class DOMMatrix {
|
|
|
738
738
|
|
|
739
739
|
// Invertable
|
|
740
740
|
if (det !== 0) {
|
|
741
|
-
const
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
741
|
+
const newA = this[VALUES][D] / det
|
|
742
|
+
const newB = -this[VALUES][B] / det
|
|
743
|
+
const newC = -this[VALUES][C] / det
|
|
744
|
+
const newD = this[VALUES][A] / det
|
|
745
|
+
const newE = (this[VALUES][C] * this[VALUES][F] - this[VALUES][D] * this[VALUES][E]) / det
|
|
746
|
+
const newF = (this[VALUES][B] * this[VALUES][E] - this[VALUES][A] * this[VALUES][F]) / det
|
|
747
|
+
|
|
748
|
+
this.a = newA
|
|
749
|
+
this.b = newB
|
|
750
|
+
this.c = newC
|
|
751
|
+
this.d = newD
|
|
752
|
+
this.e = newE
|
|
753
|
+
this.f = newF
|
|
754
|
+
|
|
755
|
+
return this
|
|
751
756
|
}
|
|
752
757
|
|
|
753
758
|
// Not invertable
|
|
@@ -755,6 +760,8 @@ class DOMMatrix {
|
|
|
755
760
|
this[IS_2D] = false
|
|
756
761
|
|
|
757
762
|
this[VALUES] = [NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN]
|
|
763
|
+
|
|
764
|
+
return this
|
|
758
765
|
}
|
|
759
766
|
} else {
|
|
760
767
|
throw new Error('3D matrix inversion is not implemented.')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@napi-rs/canvas",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.79",
|
|
4
4
|
"description": "Canvas for Node.js with skia backend",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"conventional-changelog-cli": "^5.0.0",
|
|
91
91
|
"core-js": "^3.42.0",
|
|
92
92
|
"echarts": "^6.0.0",
|
|
93
|
-
"electron": "^
|
|
93
|
+
"electron": "^38.0.0",
|
|
94
94
|
"husky": "^9.1.7",
|
|
95
95
|
"lint-staged": "^16.1.0",
|
|
96
96
|
"lodash": "^4.17.21",
|
|
@@ -101,9 +101,9 @@
|
|
|
101
101
|
"prettier": "^3.5.3",
|
|
102
102
|
"pretty-bytes": "^7.0.0",
|
|
103
103
|
"semver": "^7.7.2",
|
|
104
|
-
"skia-canvas": "^
|
|
104
|
+
"skia-canvas": "^3.0.0",
|
|
105
105
|
"table": "^6.9.0",
|
|
106
|
-
"tinybench": "^
|
|
106
|
+
"tinybench": "^5.0.0",
|
|
107
107
|
"typescript": "^5.8.3"
|
|
108
108
|
},
|
|
109
109
|
"lint-staged": {
|
|
@@ -141,17 +141,17 @@
|
|
|
141
141
|
"singleQuote": true,
|
|
142
142
|
"arrowParens": "always"
|
|
143
143
|
},
|
|
144
|
-
"packageManager": "yarn@4.9.
|
|
144
|
+
"packageManager": "yarn@4.9.4",
|
|
145
145
|
"optionalDependencies": {
|
|
146
|
-
"@napi-rs/canvas-linux-x64-gnu": "0.1.
|
|
147
|
-
"@napi-rs/canvas-darwin-x64": "0.1.
|
|
148
|
-
"@napi-rs/canvas-win32-x64-msvc": "0.1.
|
|
149
|
-
"@napi-rs/canvas-linux-arm-gnueabihf": "0.1.
|
|
150
|
-
"@napi-rs/canvas-linux-x64-musl": "0.1.
|
|
151
|
-
"@napi-rs/canvas-linux-arm64-gnu": "0.1.
|
|
152
|
-
"@napi-rs/canvas-linux-arm64-musl": "0.1.
|
|
153
|
-
"@napi-rs/canvas-darwin-arm64": "0.1.
|
|
154
|
-
"@napi-rs/canvas-android-arm64": "0.1.
|
|
155
|
-
"@napi-rs/canvas-linux-riscv64-gnu": "0.1.
|
|
146
|
+
"@napi-rs/canvas-linux-x64-gnu": "0.1.79",
|
|
147
|
+
"@napi-rs/canvas-darwin-x64": "0.1.79",
|
|
148
|
+
"@napi-rs/canvas-win32-x64-msvc": "0.1.79",
|
|
149
|
+
"@napi-rs/canvas-linux-arm-gnueabihf": "0.1.79",
|
|
150
|
+
"@napi-rs/canvas-linux-x64-musl": "0.1.79",
|
|
151
|
+
"@napi-rs/canvas-linux-arm64-gnu": "0.1.79",
|
|
152
|
+
"@napi-rs/canvas-linux-arm64-musl": "0.1.79",
|
|
153
|
+
"@napi-rs/canvas-darwin-arm64": "0.1.79",
|
|
154
|
+
"@napi-rs/canvas-android-arm64": "0.1.79",
|
|
155
|
+
"@napi-rs/canvas-linux-riscv64-gnu": "0.1.79"
|
|
156
156
|
}
|
|
157
157
|
}
|