Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 17 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next2d/player",
"version": "2.2.0",
"version": "2.2.1",
"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@next2d.app> (https://github.com/ienaga/)",
"license": "MIT",
Expand Down Expand Up @@ -46,7 +46,7 @@
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.24.0",
"@eslint/js": "^9.25.0",
"@rollup/plugin-commonjs": "^28.0.3",
"@rollup/plugin-node-resolve": "^16.0.1",
"@rollup/plugin-terser": "^0.4.4",
Expand All @@ -55,7 +55,7 @@
"@typescript-eslint/eslint-plugin": "^8.30.1",
"@typescript-eslint/parser": "^8.30.1",
"@vitest/web-worker": "^3.1.1",
"eslint": "^9.24.0",
"eslint": "^9.25.0",
"eslint-plugin-unused-imports": "^4.1.4",
"globals": "^16.0.0",
"jsdom": "^26.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ describe("CacheStoreGenerateKeysService.js test", () =>
{
it("test case1", () =>
{
expect(execute(0.25, 0.5, 0)).toBe(13038674);
expect(execute(0.25, 0.5, 0)).toBe(12414094);
});

it("test case2", () =>
{
expect(execute(0.25, 0.5, 0.3)).toBe(6614284);
expect(execute(0.25, 0.5, 0.3)).toBe(763280);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
export const execute = (x_scale: number, y_scale: number, alpha: number): number =>
{
const values = [x_scale * 10, y_scale * 10];
const values = [x_scale * 100, y_scale * 100];
if (alpha) {
values.push(alpha * 100);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ export const execute = (
const xScale = Math.round(Math.sqrt(
tMatrix[0] * tMatrix[0]
+ tMatrix[1] * tMatrix[1]
) * 10) / 10;
) * 100) / 100;

const yScale = Math.round(Math.sqrt(
tMatrix[2] * tMatrix[2]
+ tMatrix[3] * tMatrix[3]
) * 10) / 10;
) * 100) / 100;

if (!shape.isBitmap
&& !shape.cacheKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ export const execute = (
const xScale = Math.round(Math.sqrt(
tMatrix[0] * tMatrix[0]
+ tMatrix[1] * tMatrix[1]
) * 10) / 10;
) * 100) / 100;

const yScale = Math.round(Math.sqrt(
tMatrix[2] * tMatrix[2]
+ tMatrix[3] * tMatrix[3]
) * 10) / 10;
) * 100) / 100;

if (text_field.changed
&& !text_field.cacheKey
Expand Down
18 changes: 6 additions & 12 deletions packages/renderer/src/Shape/usecase/ShapeRenderUseCase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ export const execute = (render_queue: Float32Array, index: number): number =>
const uniqueKey = `${render_queue[index++]}`;
const cacheKey = render_queue[index++];

const xScale = Math.round(Math.sqrt(
const xScale = Math.sqrt(
matrix[0] * matrix[0]
+ matrix[1] * matrix[1]
) * 10) / 10;
);

const yScale = Math.round(Math.sqrt(
const yScale = Math.sqrt(
matrix[2] * matrix[2]
+ matrix[3] * matrix[3]
) * 10) / 10;
);

let node: Node;
const hasCache = render_queue[index++];
Expand Down Expand Up @@ -205,14 +205,8 @@ export const execute = (render_queue: Float32Array, index: number): number =>
const radianY = Math.atan2(-matrix[2], matrix[3]);
if (radianX || radianY) {

const tx = xMin * Math.sqrt(
matrix[0] * matrix[0]
+ matrix[1] * matrix[1]
);
const ty = yMin * Math.sqrt(
matrix[2] * matrix[2]
+ matrix[3] * matrix[3]
);
const tx = xMin * xScale;
const ty = yMin * yScale;

const cosX = Math.cos(radianX);
const sinX = Math.sin(radianX);
Expand Down
18 changes: 6 additions & 12 deletions packages/renderer/src/TextField/usecase/TextFieldRenderUseCase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ export const execute = (render_queue: Float32Array, index: number): number =>
// text state
const changed = Boolean(render_queue[index++]);

const xScale = Math.round(Math.sqrt(
const xScale = Math.sqrt(
matrix[0] * matrix[0]
+ matrix[1] * matrix[1]
) * 10) / 10;
);

const yScale = Math.round(Math.sqrt(
const yScale = Math.sqrt(
matrix[2] * matrix[2]
+ matrix[3] * matrix[3]
) * 10) / 10;
);

let node: Node;
const hasCache = render_queue[index++];
Expand Down Expand Up @@ -192,14 +192,8 @@ export const execute = (render_queue: Float32Array, index: number): number =>
const radianY = Math.atan2(-matrix[2], matrix[3]);
if (radianX || radianY) {

const tx = xMin * Math.sqrt(
matrix[0] * matrix[0]
+ matrix[1] * matrix[1]
);
const ty = yMin * Math.sqrt(
matrix[2] * matrix[2]
+ matrix[3] * matrix[3]
);
const tx = xMin * xScale;
const ty = yMin * yScale;

const cosX = Math.cos(radianX);
const sinX = Math.sin(radianX);
Expand Down
1 change: 0 additions & 1 deletion packages/webgl/src/Mask/usecase/MaskBindUseCase.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ describe("MaskBindUseCase.js method test", () =>
"$gl": {
"disable": vi.fn((cap) =>
{
console.log(cap);
switch (cap) {
case "STENCIL_TEST":
case "SCISSOR_TEST":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ describe("MeshCalculateCurveRectangleUseCase.js method test", () =>
it("test case", () =>
{
const paths = execute({ x: 90, y: 120 }, { x: 91, y: 30 }, { x: 210, y: 100 }, 3);
console.log(paths);
expect(paths).toEqual([
92.99981483195982, 120.03333127591067, false,
93.05847547276832, 117.3240110485681, true,
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { Next2D } from "@next2d/core";

if (!("next2d" in window)) {
console.log("%c Next2D Player %c 2.2.0 %c https://next2d.app",
console.log("%c Next2D Player %c 2.2.1 %c https://next2d.app",
"color: #fff; background: #5f5f5f",
"color: #fff; background: #4bc729",
"");
Expand Down