pixijs
pixijs copied to clipboard
[WIP] add core tests
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
anddetermineCrossOrigin
functions to a new modulesrc/assets/utils/crossOrigin.ts
and import them in other modules that use them (link, link, link, link, link) - Rename
BaseTexture
andResource
classes toTexture
andTextureSource
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 toTextureSourceOptions
interface and pass it tocrossOrigin
utility function when creating or updating source elements (link, link) - Add
isValid
getter toTextureSource
class and use it inTexture
class to check if the source is ready for rendering (link) - Add
update
method toCanvasSource
class and call it inTextureSource
class when the source is updated (link) - Move
Filter
andMatrix
classes to different modules and update imports and usages in other modules and tests (link, link) - Move
ImageResource
,ImageBitmapResource
,Geometry
, andGlProgram
classes to different modules and update imports and usages in other modules and tests (link, link, link) - Comment out tests for
ArrayResource
,BatchRenderer
,CubeResource
, andrenderer.generateTexture
methods, which are not available or deprecated in v8, and keep them for reference (link, link, link, link) - Add comments with
todo
,note
, ordeprecated
to indicate some unresolved issues, differences, or changes in the APIs between v7 and v8 (link, link, link, link, link, link, link, link)
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 |