Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Improve error handling in useSpriteLoader (#2105)
This commit refactors the useSpriteLoader function to improve error handling when loading standalone sprites. Previously, if neither the textureUrl nor the input was provided, the function would silently fail. Now, it throws an error indicating that either the textureUrl or the input must be provided. Additionally, if an invalid texture URL is provided, it throws an error indicating that a valid texture URL must be provided. The error handling has been enhanced to provide more informative error messages. These changes aim to make the useSpriteLoader function more robust and provide better error feedback to developers.
- Loading branch information