@napi-rs/canvas 0.1.78 → 0.1.80
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/geometry.js +18 -11
- package/package.json +12 -12
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.80",
|
|
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",
|
|
@@ -143,15 +143,15 @@
|
|
|
143
143
|
},
|
|
144
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.80",
|
|
147
|
+
"@napi-rs/canvas-darwin-x64": "0.1.80",
|
|
148
|
+
"@napi-rs/canvas-win32-x64-msvc": "0.1.80",
|
|
149
|
+
"@napi-rs/canvas-linux-arm-gnueabihf": "0.1.80",
|
|
150
|
+
"@napi-rs/canvas-linux-x64-musl": "0.1.80",
|
|
151
|
+
"@napi-rs/canvas-linux-arm64-gnu": "0.1.80",
|
|
152
|
+
"@napi-rs/canvas-linux-arm64-musl": "0.1.80",
|
|
153
|
+
"@napi-rs/canvas-darwin-arm64": "0.1.80",
|
|
154
|
+
"@napi-rs/canvas-android-arm64": "0.1.80",
|
|
155
|
+
"@napi-rs/canvas-linux-riscv64-gnu": "0.1.80"
|
|
156
156
|
}
|
|
157
157
|
}
|