Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR bumps the Next2D Player version from 2.12.0 to 2.13.0, introducing performance optimizations and bug fixes across multiple packages.
- Version update to 2.13.0 across all package files
- Performance optimizations through constant caching and object pooling
- Fix to vertex array data structure in WebGL rendering
- Dependency updates for vitest and related packages
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/index.ts | Updated version display from 2.12.0 to 2.13.0 |
| packages/webgl/src/VertexArrayObject/usecase/VertexArrayObjectCreateRectVertexArrayObjectUseCase.ts | Corrected vertex buffer data structure for rectangle rendering |
| packages/webgl/src/VertexArrayObject/usecase/VertexArrayObjectCreateInstancedVertexArrayObjectUseCase.ts | Corrected vertex buffer data structure for instanced rendering |
| packages/webgl/src/VertexArrayObject/usecase/VertexArrayObjectCreateInstancedVertexArrayObjectUseCase.test.ts | Updated test to validate corrected vertex data and improved code formatting |
| packages/webgl/src/AtlasManager.ts | Added constant caching for Number.MAX_VALUE to optimize performance |
| packages/texture-packer/src/Node/service/NodeInsertService.ts | Fixed padding calculation logic for texture packing |
| packages/texture-packer/src/Node/service/NodeDisposeService.ts | Added node pool cleanup to prevent memory leaks |
| packages/texture-packer/src/Node.ts | Implemented object pooling pattern for performance optimization |
| package.json | Version bump and vitest dependency updates to 4.0.14 |
| package-lock.json | Lockfile updates reflecting new package versions and dependency tree changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+14
to
+31
| "bindBuffer": vi.fn((target: number, srcData: Float32Array) => { | ||
| if (!(srcData instanceof Float32Array)) { | ||
| return; | ||
| } | ||
| expect(srcData[0]).toBe(0); | ||
| expect(srcData[1]).toBe(0); | ||
| expect(srcData[2]).toBe(1); | ||
| expect(srcData[3]).toBe(0); | ||
| expect(srcData[4]).toBe(1); | ||
| expect(srcData[5]).toBe(1); | ||
|
|
||
| expect(srcData[6]).toBe(0); | ||
| expect(srcData[7]).toBe(0); | ||
| expect(srcData[8]).toBe(1); | ||
| expect(srcData[9]).toBe(1); | ||
| expect(srcData[10]).toBe(0); | ||
| expect(srcData[11]).toBe(1); | ||
| }), |
There was a problem hiding this comment.
The bindBuffer mock has incorrect parameter types. According to the WebGL API and the actual usage in line 21 of the implementation, bindBuffer(target, buffer) takes a WebGLBuffer as the second parameter, not a Float32Array. The Float32Array validation should be moved to the bufferData mock instead, which receives the actual data at line 22-25.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.