Skip to content

Commit

Permalink
Merge pull request #151 from Next2D/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ienaga authored Sep 30, 2023
2 parents adff1ea + 0914930 commit 23b74bb
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 13 deletions.
2 changes: 1 addition & 1 deletion drawing_flow_chart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion next2d.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next2d/player",
"version": "1.18.5",
"version": "1.18.6",
"description": "Experience the fast and beautiful anti-aliased rendering of WebGL. You can create rich, interactive graphics, cross-platform applications and games without worrying about browser or device compatibility.",
"author": "Toshiyuki Ienaga<ienaga@tvon.jp> (https://github.com/ienaga/)",
"license": "MIT",
Expand Down
7 changes: 4 additions & 3 deletions packages/display/src/Graphics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2888,7 +2888,8 @@ export class Graphics
color_transform: Float32Array | null = null,
is_clip: boolean = false,
options: PlayerHitObjectImpl | null = null
) {
): boolean {

// fixed logic
if (this._$doLine) {
this.endLine();
Expand All @@ -2904,8 +2905,8 @@ export class Graphics
}

const recode: any[] = this._$recode;
const length = recode.length;
for (let idx = 0; idx < length; ) {
const length: number = recode.length;
for (let idx: number = 0; idx < length; ) {
switch (recode[idx++]) {

case Graphics.BEGIN_PATH:
Expand Down
20 changes: 19 additions & 1 deletion packages/geom/src/Matrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,25 @@ export class Matrix
rotation: number = 0,
tx: number = 0, ty: number = 0
): void {
this.createBox(width / 1638.4, height / 1638.4, rotation, tx + width / 2, ty + height / 2);

this.a = width / 1638.4;
this.d = height / 1638.4;

if (rotation) {
const cos = $Math.cos(rotation);
const sin = $Math.sin(rotation);

this.b = sin * this.d;
this.c = -sin * this.a;
this.a *= cos;
this.d *= cos;
} else {
this.b = 0;
this.c = 0;
}

this.tx = tx + width / 2;
this.ty = ty + height / 2;
}

/**
Expand Down
10 changes: 5 additions & 5 deletions packages/share/src/RenderUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,37 +187,37 @@ export const $MATRIX_ARRAY_IDENTITY: Float32Array = new $Float32Array([1, 0, 0,
* @const
* @static
*/
export const $COLOR_ARRAY_IDENTITY = new $Float32Array([1, 1, 1, 1, 0, 0, 0, 0]);
export const $COLOR_ARRAY_IDENTITY: Float32Array = new $Float32Array([1, 1, 1, 1, 0, 0, 0, 0]);

/**
* @type {number}
* @const
* @static
*/
export const $SHORT_INT_MIN = 0 - 32768;
export const $SHORT_INT_MIN: number = -32768;

/**
* @type {number}
* @const
* @static
*/
export const $SHORT_INT_MAX = 32767;
export const $SHORT_INT_MAX: number = 32767;

/**
* @shortcut
* @type {number}
* @const
* @static
*/
export const $Deg2Rad = $Math.PI / 180;
export const $Deg2Rad: number = $Math.PI / 180;

/**
* @shortcut
* @type {number}
* @const
* @static
*/
export const $Rad2Deg = 180 / $Math.PI;
export const $Rad2Deg: number = 180 / $Math.PI;

/**
* @type {array}
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Next2D } from "@next2d/core";

if (!("next2d" in window)) {

console.log("%c Next2D Player %c 1.18.5 %c https://next2d.app",
console.log("%c Next2D Player %c 1.18.6 %c https://next2d.app",
"color: #fff; background: #5f5f5f",
"color: #fff; background: #4bc729",
"");
Expand Down

0 comments on commit 23b74bb

Please sign in to comment.