@next2d/core 2.2.2 → 2.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next2d/core",
3
- "version": "2.2.2",
3
+ "version": "2.3.1",
4
4
  "description": "Next2D Core Package",
5
5
  "author": "Toshiyuki Ienaga<ienaga@next2d.app> (https://github.com/ienaga/)",
6
6
  "license": "MIT",
@@ -24,15 +24,15 @@
24
24
  "url": "git+https://github.com/Next2D/Player.git"
25
25
  },
26
26
  "dependencies": {
27
- "@next2d/core": "2.2.2",
28
- "@next2d/display": "2.2.2",
29
- "@next2d/events": "2.2.2",
30
- "@next2d/filters": "2.2.2",
31
- "@next2d/geom": "2.2.2",
32
- "@next2d/media": "2.2.2",
33
- "@next2d/net": "2.2.2",
34
- "@next2d/text": "2.2.2",
35
- "@next2d/ui": "2.2.2",
36
- "@next2d/render-queue": "2.2.2"
27
+ "@next2d/core": "2.3.1",
28
+ "@next2d/display": "2.3.1",
29
+ "@next2d/events": "2.3.1",
30
+ "@next2d/filters": "2.3.1",
31
+ "@next2d/geom": "2.3.1",
32
+ "@next2d/media": "2.3.1",
33
+ "@next2d/net": "2.3.1",
34
+ "@next2d/text": "2.3.1",
35
+ "@next2d/ui": "2.3.1",
36
+ "@next2d/render-queue": "2.3.1"
37
37
  }
38
38
  }
@@ -32,9 +32,8 @@ export const execute = async (display_object, opstions = null) => {
32
32
  const tColorTransform = opstions && opstions.colorTransform
33
33
  ? opstions.colorTransform.rawData
34
34
  : $COLOR_ARRAY_IDENTITY;
35
- const rectangle = display_object.getBounds();
36
35
  const translateMatrix = new Float32Array([
37
- 1, 0, 0, 1, -rectangle.x, -rectangle.y
36
+ 1, 0, 0, 1, -display_object.width / 2, -display_object.height / 2
38
37
  ]);
39
38
  const tMatrix = opstions && opstions.matrix
40
39
  ? Matrix.multiply(opstions.matrix.rawData, translateMatrix)
@@ -49,6 +48,8 @@ export const execute = async (display_object, opstions = null) => {
49
48
  if (width <= 0 || height <= 0) {
50
49
  return transferredCanvas;
51
50
  }
51
+ tMatrix[4] += width / 2;
52
+ tMatrix[5] += height / 2;
52
53
  // resize canvas
53
54
  transferredCanvas.width = width;
54
55
  transferredCanvas.height = height;
package/src/Next2D.js CHANGED
@@ -204,6 +204,6 @@ export class Next2D {
204
204
  * @public
205
205
  */
206
206
  async captureToCanvas(display_object, opstions = null) {
207
- return captureToCanvasUseCase(display_object, opstions);
207
+ return await captureToCanvasUseCase(display_object, opstions);
208
208
  }
209
209
  }