Skip to content

Comments

develop#214

Merged
ienaga merged 51 commits intomainfrom
develop
Oct 31, 2025
Merged

develop#214
ienaga merged 51 commits intomainfrom
develop

Conversation

@ienaga
Copy link
Member

@ienaga ienaga commented Oct 31, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 31, 2025 22:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements several improvements to the Next2D framework, including background color support for captures, worker format changes, test coverage expansion, and refactoring of type systems and test mocks.

  • Adds background color and alpha parameters to capture functionality across renderer and core packages
  • Changes worker bundle format from IIFE to ES modules
  • Replaces numeric IDs with UUID strings for VertexArrayObject management
  • Adds extensive test coverage for numerous use cases and services
  • Refactors test mocks to use proper function constructors instead of mockImplementation

Reviewed Changes

Copilot reviewed 147 out of 149 changed files in this pull request and generated 46 comments.

Show a summary per file
File Description
vite.config.ts Removed @vitest/web-worker from setup files
tsconfig.json Removed baseUrl and paths configuration
test.setup.ts Added MockWorker implementation and additional canvas context methods
src/tsconfig.json Updated paths from relative to absolute
src/index.ts Updated version number to 2.6.0
rollup.*.worker.config.js Changed worker output format from iife to es
packages/webgl/src/interface/IVertexArrayObject.ts Changed id type from number to string
packages/webgl/* Added numerous test files with comprehensive coverage
packages/webgl/src/VertexArrayObject.ts Removed $getId function and counter
packages/webgl/src/VertexArrayObject/service/* Replaced numeric ID with crypto.randomUUID()
packages/webgl/src/Shader/Fragment/* Removed unused shader functions and optimized color transform logic
packages/webgl/src/PathCommand.ts Inlined path validation logic
packages/webgl/src/Context.ts Fixed UNPACK_ALIGNMENT parameter (changed to 1, not true)
packages/text/src/TextUtil.ts Changed timer ID types from NodeJS.Timeout to number
packages/text/src/TextField/* Added comprehensive test coverage
packages/renderer/src/* Added background color and alpha support to capture
packages/media/src/* Added tests and refactored mocks to use function constructors
packages/display/src/* Added test coverage for various use cases
packages/core/src/interface/ICaptureOptions.ts Added bgColor and bgAlpha optional properties

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


// WebTextureの設定
gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);
gl.pixelStorei(gl.UNPACK_ALIGNMENT, true);
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second parameter to gl.pixelStorei(gl.UNPACK_ALIGNMENT, ...) should be a number (1, 2, 4, or 8), not a boolean. The value true will be coerced to 1, but this should be explicit. Change true to 1.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Comment on lines +39 to +41
bg_color >> 16 & 0xff / 255,
bg_color >> 8 & 0xff / 255,
bg_color & 0xff / 255,
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Operator precedence issue: the division by 255 is happening before the bitwise AND due to operator precedence. Each line should be: (bg_color >> N & 0xff) / 255 with parentheses around the bitwise operations.

Copilot uses AI. Check for mistakes.
const textField = new TextField();
textField.text = "Test";

const result = execute(textField);
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the function execute does not return anything, yet the return value is used.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

textField.focusIndex = 2;

const event = new KeyboardEvent("keydown", { key: "a" });
const result = execute(textField, event);
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the function execute does not return anything, yet the return value is used.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

const textField = new TextField();
textField.text = "Test";

const result = execute(textField);
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the function execute does not return anything, yet the return value is used.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

textField.text = "Test";
textField.selectIndex = 2;

const result = execute(textField);
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the function execute does not return anything, yet the return value is used.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

textField.type = "input";
textField.text = "Test";

const result = execute(textField, 10, 10);
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the function execute does not return anything, yet the return value is used.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

ienaga and others added 3 commits November 1, 2025 07:52
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…st.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Oct 31, 2025

@ienaga I've opened a new pull request, #216, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Oct 31, 2025

@ienaga I've opened a new pull request, #217, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Oct 31, 2025

@ienaga I've opened a new pull request, #218, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Oct 31, 2025

@ienaga I've opened a new pull request, #219, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 6 commits October 31, 2025 22:55
Co-authored-by: ienaga <4123454+ienaga@users.noreply.github.com>
Co-authored-by: ienaga <4123454+ienaga@users.noreply.github.com>
Co-authored-by: ienaga <4123454+ienaga@users.noreply.github.com>
Co-authored-by: ienaga <4123454+ienaga@users.noreply.github.com>
Co-authored-by: ienaga <4123454+ienaga@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Oct 31, 2025

@ienaga I've opened a new pull request, #220, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 7 commits October 31, 2025 23:10
Co-authored-by: ienaga <4123454+ienaga@users.noreply.github.com>
Fix gl.pixelStorei UNPACK_ALIGNMENT parameter type
Remove meaningless void function return value test
Fix test capturing return value from void function
Fix test checking return value of void function
Remove unnecessary void return value test in TextFieldReloadUseCase
Remove redundant void function return value test
@ienaga ienaga merged commit 86f68c1 into main Oct 31, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants