@next2d/geom 1.18.4 → 1.18.6
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/dist/Matrix.js +16 -1
- package/package.json +7 -7
package/dist/Matrix.js
CHANGED
|
@@ -292,7 +292,22 @@ export class Matrix {
|
|
|
292
292
|
* @public
|
|
293
293
|
*/
|
|
294
294
|
createGradientBox(width, height, rotation = 0, tx = 0, ty = 0) {
|
|
295
|
-
this.
|
|
295
|
+
this.a = width / 1638.4;
|
|
296
|
+
this.d = height / 1638.4;
|
|
297
|
+
if (rotation) {
|
|
298
|
+
const cos = $Math.cos(rotation);
|
|
299
|
+
const sin = $Math.sin(rotation);
|
|
300
|
+
this.b = sin * this.d;
|
|
301
|
+
this.c = -sin * this.a;
|
|
302
|
+
this.a *= cos;
|
|
303
|
+
this.d *= cos;
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
this.b = 0;
|
|
307
|
+
this.c = 0;
|
|
308
|
+
}
|
|
309
|
+
this.tx = tx + width / 2;
|
|
310
|
+
this.ty = ty + height / 2;
|
|
296
311
|
}
|
|
297
312
|
/**
|
|
298
313
|
* @description 変換前の座標空間内のポイントが指定されると、そのポイントの変換後の座標を返します。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next2d/geom",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.6",
|
|
4
4
|
"description": "Next2D Geom Packages",
|
|
5
5
|
"author": "Toshiyuki Ienaga<ienaga@tvon.jp> (https://github.com/ienaga/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"url": "git+https://github.com/Next2D/Player.git"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@next2d/interface": "1.18.
|
|
36
|
-
"@next2d/display": "1.18.
|
|
37
|
-
"@next2d/core": "1.18.
|
|
38
|
-
"@next2d/util": "1.18.
|
|
39
|
-
"@next2d/filters": "1.18.
|
|
40
|
-
"@next2d/share": "1.18.
|
|
35
|
+
"@next2d/interface": "1.18.6",
|
|
36
|
+
"@next2d/display": "1.18.6",
|
|
37
|
+
"@next2d/core": "1.18.6",
|
|
38
|
+
"@next2d/util": "1.18.6",
|
|
39
|
+
"@next2d/filters": "1.18.6",
|
|
40
|
+
"@next2d/share": "1.18.6"
|
|
41
41
|
}
|
|
42
42
|
}
|