pixijs icon indicating copy to clipboard operation
pixijs copied to clipboard

[WIP] add core tests

Open achamas-playco opened this issue 1 year ago • 1 comments

NOTE: 📣 This PR has incomplete working tests. They are either failing or skipped due to api differences between v7 and v8, or there may be local/CI differences. Additional work required before merging

🤖 Generated by Copilot at a2869de

Summary

🔄🛠️🌐

This pull request refactors and updates the texture and resource modules and their tests to reflect the changes in terminology and structure in v8. It also adds cross origin support and validity checking for texture sources, and makes some minor improvements and fixes to the filter and geometry modules. It also comments out some tests that are not applicable or compatible with v8, but keeps them for reference.

TextureSource changes Cross origin and validity Autumn of v7

Walkthrough

  • Move crossOrigin and determineCrossOrigin functions to a new module src/assets/utils/crossOrigin.ts and import them in other modules that use them (link, link, link, link, link)
  • Rename BaseTexture and Resource classes to Texture and TextureSource respectively, and update imports and usages in other modules and tests (link, link, link, link, link, link, link, link, link, link, link)
  • Add crossorigin property to TextureSourceOptions interface and pass it to crossOrigin utility function when creating or updating source elements (link, link)
  • Add isValid getter to TextureSource class and use it in Texture class to check if the source is ready for rendering (link)
  • Add update method to CanvasSource class and call it in TextureSource class when the source is updated (link)
  • Move Filter and Matrix classes to different modules and update imports and usages in other modules and tests (link, link)
  • Move ImageResource, ImageBitmapResource, Geometry, and GlProgram classes to different modules and update imports and usages in other modules and tests (link, link, link)
  • Comment out tests for ArrayResource, BatchRenderer, CubeResource, and renderer.generateTexture methods, which are not available or deprecated in v8, and keep them for reference (link, link, link, link)
  • Add comments with todo, note, or deprecated to indicate some unresolved issues, differences, or changes in the APIs between v7 and v8 (link, link, link, link, link, link, link, link)

achamas-playco avatar Nov 10 '23 07:11 achamas-playco

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 54622a3b48c7de82d4415f89bea6bac965725727:

Sandbox Source
pixi.js-sandbox Configuration

codesandbox-ci[bot] avatar Nov 10 '23 07:11 codesandbox-ci[bot]