* Fix texture path resolution in ParticleEffectReader
This fixes texture loading issues when particle effect files reference textures with relative paths by properly resolving them against the effect file's location.
* Implement ParticleEffect FromFile/Stream methods
* Generate unique names for regions
Region names previously were generated using the name + bounds. This was removed in #997 which caused a regression bug.
This is now fixed, and region names are generated using the common format of "name_index"
* Add tests for issue #1013
* feat(ComponentMapper): Add 'TryGet' methods
* feat(tests): Add test for new 'TryGet' method in 'ComponentMapper'
* refact(ComponentMapper): Simplify logic in 'TryGet' method
* Hotfix: Update MonoGame reference to 3.8.4
* Bump patch version to 4.1.1
* update workflow to choose version tag
* Bump to version 4.1.2
* Resolve issues with KNI tests
* Bump version to 4.1.3
* Hotfix: Update MonoGame reference to 3.8.4
* Bump patch version to 4.1.1
* update workflow to choose version tag
* Bump to version 4.1.2
* Resolve issues with KNI tests
* SpriteBatch.Draw with Texture2DRegion and rotation: improved implementation to get rid of Math.Sin/Cos; fixed clipping for sprites rotated on sprite sheet.
* SpriteBatch.Draw: fixed flipping for rotated sprites
* Added the following features to Texture2DRegion to improve sprite sheet packing efficiency:
- Regions on the texture can now be rotated.
- Transparent borders around sprites can be trimmed.
The SpriteBatch.Draw method will automatically rotate the region back to its original orientation and restore the transparent borders during rendering.
Additionally, since sprite sheet data files can define sprite origins, TextureRegion2D can now optionally store this origin. Sprites created from a Texture2DRegion will use this stored origin as their default.
* Adapted nine-patch sprite implementation for support rotated / trimmed sprites, too.
* Extended the TextureAtlas content pipeline to support trimmed and rotated sprites, as well as reading anchor points (origins) from the data file.
The JSON format has been cleaned up by removing unnecessary keys. The legacy format remains supported for backward compatibility.
* added build-time check to ensure that texture image file referenced by atlas data file exists
* Removed boxing in TweenMemberss getters and setters
* Removed unnecessary inclusions and comments
* Simplified the get method creation on @AristurtleDev 's suggestion
* Add enabled state for modifiers
* Add enabled state for interpolators
* Move AutoTrigger to effect not emitters
* Remove LineUniformProfile
* Set Enabled field true by default
* Don't render invisible emitters
* Remove unused member
* Document update method
* Add documentation
* Remove test now that LineUniformProfile was removed
* Fix unit tests
* Initial guidelines
* Add solution level directory with github related files for access within VS 2022
* Updated guidelines for extension methods
- For types within MonoGame.Extended, prefer static methods within the type rather than extension methods
- Extension methods should be used for extending external types from MonoGame or other libraries used.
example: json data can be stored in sheetdata/player.json, texture can be stored in textures/player.png; player.json contains relative path to texture: image=../textures/player.png
don't remove subdirectories from atlas region names, to be able to load multiple animations from one texture atlas without conflicting region names;
example: walk/01.png, walk/02.png, ... turn/01.png, turn/02.png, ...
* Refactor particle system
* Use correct alloc
* Use original ParticleIterator imlementation for zero allications.
* Move ParticleIterator to its own class instead of a nested class
* Mark nullable
* Add fallback mechanism for loading textures when it's an image file and not an xnb
* Refactor HslColor: Improve implementation, documentation, and API
- Added explicit memory layout to prepare for particle update.
- Restructured fields as private with readonly property accessors. Struct is meant to be immutable, but the CopyTo method makes it mutable, so this is a trade off
- Added nullability annotations and explicit argument validations.
- Added Deconstruct method to match MonoGame terminology and marked Destruct as obsolete.
- Marked the implicit string conversion as obsolete. Users should use the Parse method as it's more explicity as to what's happening.
- Restructure the FromRgb method for better readability and future maintenance.
* Deprecate ColorExtensions.ToHsl method in favor of HslColor.FromRgb
The ColorExtensions.ToHsl and HslColor.FromRgb methods provide the same functionality
but with different implementations. HslColor.FromRgb is more accurate and handles
edge cases correctly, so it should be preferred.
* Mark ColorExtensions.FromHex as obsolete
This just calls ColorHelper.FromHex, which is where the call site should be anyway as this isn't an extension method of Color.
* Move FromAbgr to ColorHelper. This is not an extension method. Mark other as obsolete.
* Add a const value for machine epsilon
* Move ToRgb as a static method of HslColor struct
- ColorExtensions.ToRgb has been marked obsolete
* Mark ColorExtensions.ToRgb as obsolete
* Move ToHex from ColorHelper to ColorExtensions and make it an extension method. Marked ColorHelper.ToHex as obsolete
* Mark ColorHelper.FromHsl as obsolete
* Clean up namespaces
* Add FromHex overload that uses ReadOnlySpan<char> which increases performance and reduces memory allocations
* Update documentation of FromAbgr since it was moved to ColorHelper
* Fix <c> tag in documentation
* Per coding guidelines, fields at top of class declaration
* Per coding guidelines, prefix static fields with `s_`
* Document the FromName method
* Adhere to coding guidelines
- If statement, even single line, uses brackets
- Inline `Color` definition
* Documentat ColorHelper class
* Remove extra whitespace line
* Clean up unused namespaces
* Correct test case
* Move to root namespace
* Rename to HslColorTests
* Add tests for ColorExtensions.ToHex
* Use facts not theorys
* Add tests for ColorHelper.FromHex
- Restructure FastRandom to use interface-based implementation approach
- Add thread-safe Shared static instance for concurrent access
- Enhance documentation with improved explanations about algorithm characteristics
- Extract core logic into LinearCongruentialGeneratorImpl for better maintainability
- Replace Math function calls with MathF equivalents for better performance
- Add parameter validation using new .NET ArgumentOutOfRangeException.ThrowIfNegativeOrZero
- Keep API compatibility with original implementation
* Fix Invert(ref Matrix3x2)
* erroneous results were given by matrix fields being altered sequentially, some fields would use new state instead of the input
* Check for matrix.Determinant() = 0, now returns the identity instead of det becoming infinite"
* Add unit test for Matrix3x2.Invert
* Both now use ColorHelper.FromHex, rather than differing implementations
* FromHex now accepts hex numbers with three and four digits matching HTML color codes, where "ABC" maps to "AABBCC"
* Significant performance increase using bitshifts over string operations
* Correct exception message
* Pass serializer options as param for MultiDimensional reads
* Refactor to use TryGetRegion
* Update for System.Text.Json parsing
* Update MonoGame references to 3.8.2.1105
* Vector2.Rotate is not built into MonoGame
* Update to net8
* Update version number
* Update changelog
* Deprecate Vector2.Rotate for MonoGame only
* Deprecate it but don't error it so API doesn't break for others.
* Correctly swap rayNear and rayFar distance
* Retrieve bmfFile.Path when reading from stream
This closes#923
* Return null if character not found.
This is used for line feed characters.S