* 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
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, ...
* Removed MonoGame.Extended.Animations
This project was just a shell that referenced MonoGame.Extended.csproj. It added no additional functionality.
* Rework BitmapFonts for new project organization.
* Cleanup namespaces
* Cleanup namespaces
* Move MonoGame.Extended.Collision into base project
* Moved MonoGame.Extended.Entities into base project
* Moved MonoGame.Extended.Graphics into base project
* Moved MonoGame.Extended.Graphics into base project
* Moved MonoGame.Extended.Input into base project
* Moved MonoGame.Extended.Particles into base project
* Moved MonoGame.Extended.Tiled into base project
* Moved MonoGame.Extended.Tiled into base project
* Moved MonoGame.Extended.Tweening into base project
* Removing SpriteFactory support
This will be added back in at a later date once the SpriteFactory application has been updated
* Update TexturePacker content import support
* Only needs to reference base project now
* Moved to Serialization namespace
* Moved Json serialization to Serialization.Json namespace
* Moved TexturePacker content DTOs to the Content namespace
* Renamed to Texture2DRegion.Extensions.cs
* Cleaned up namespace
* Moved ReadTiledMapProperties into the ContentReaderExtensions
* Created an Extended content manager
* Moved Tweening tests to base test project
* Moved Tiled test to base test project
* Moved Entities Tests to base test project
* Moved Entities tests to base test project
* Moved Collisions tests to base test project
* Moved Pipeline Tiled test to Pipeline tests project
* Use `var` instead of full type name
* Add Tiled namespace
* Correct `Metadata` property name to new `Meta` property name
* Cleanup namespace
* Add effects namespace
* Add Content namespace
* Update using statements to new namespaces
* Move Pipeline Tiled tests to Pipeline test project
* Use correct namespace
* Use `var` instead of typing out nested types
* Remove unused namespaces
* Update to new namespaces
* Remove unused namespaces
* Update to new namespaces
* Remove dependency on Particles csproj
* Update included content on build
* Add embedded resources
* Merge multi csproj structure into single csproj structure
* TexturePackerPoint properties should be `double` not `int`
* Update csproj
* Use dotnet tool to rebuild effects
* Move effect compilation to targets file
This will ensure the effects are always built
* Fix workflow to build effects on linux
* Set wine path
* Export instead of using actions env section
* Revert back to manual effect compile until automation can be solved on GitHub Ubuntu runner
* Add file header
* Refator to file-scoped namespace
* Least complex to most complext method ordering
* Refactor: Group properties at top before constructor
* Use the new UV properties from Texture2DRegion.
This removes the dependency on the texture size in the calculations if the TextureRegion property is changed.
* No longer need to cache normalized origin to preserve it
* Use ArgumentNullException instead
* Use ArgumentNullException.ThrowIfNull
* Refactor: Use brackets for readability
* Add xml documentation
* Add check for disposed texture
* Moved `Sprite` to `MonoGame.Extended.Graphics`
* Moved extension methods for rendering sprite into `SpriteBatch.Extensions`
* `ISpriteBatchDrawable` is not used by anything
It was originally part of the ScreneGraph implementation in MonoGame.Extended which was replaced by the ECS system. It appears that this interface was forgotten to be removed and is not used for anything anymore.
* Add `CreateSprite` methods
* Add file header
* Moved `SpriteSheetAnimationFrame` to `MonoGame.Extended.Graphics`
* Move properties before constructor.
* Changed `Duration` to `TimeSpan` type
* Renamed `Index` to `FrameIndex`
* Add `TextureRegion` property
* Make property get only
* Cleanup whitespace
* Remove `SpriteSheetAnimationFrameJsonConverter`
* Cleanup unused namespaces
* Make file-scoped namespace
* Added xml documentation
* Added file header
* marked constructor as internal.
This will be created from a spritesheet itself
* Move `SpriteSheetAnimationCycle` to `MonoGame.Extended.Graphcis`
* File scoped namespace
* Add file header
* Reorganize: Move properties above constructor
* Make `Frames` property a read-only span
* Remove duration, this is being moved to the frame itself
* Add `Name` property
* Set looping, reversed, and ping pong properties in ctor
* Make ctor internal
This will be an object created by a spritesheet instane itself.
* Cleanup: Whitespace
* Add `FrameCount` property
* Add `GetFrame` method and accompanying `this[int]` method.
* Documentation: Added missing documentation.
* WIP: Temporary commit for workstation change
* WIP: Temporary commit for workstation change
* WIP: Temporary commit for workstation change
* WIP: Temporary commit for workstation change
* Refactor: Animation Refactor Completed
* Refactor: Sprite stuff finished
* Remove tests that can't be run on GitHub CI
Need to find alternative
* Make optional name param the last param in Texture2DRegion ctors
* Resolve merge conflicts
* KNI projects
* update actions
fixes MSBUILD : error MSB1011: Specify which project or solution file to
use because this folder contains more than one project or solution file.
* remove test for issue #633
* build tests
* KNI TypeReaders
* KNI/XNA compatible code
* GetRuntimeReader from runtime types
* remove MockGameWindow
* Moved `TextureRegion2D` and `NinePatchRegion2D` into Graphics namespace
These are used for more than just texture atlas related things and are primarly for working with `Texture2D` instances and creating sub textures from them. Moving them to Graphics namespace where `Texture2D` lives in MonoGame
* Dropped the `2D` suffix from `TextureRegion2D` and `NinePatchRegion2D`
* Moved `RectanglExtensions` to project root
This moves the extensions for `Rectangle` to the same relative namespace location as `Rectangle` is in MonoGame.
* Renamed to `Rectangle.Extensions.cs`
* Separate `Rectangle` from `RectangleF` extensions
* Added `GetRelativeRectangle` method
* Updated documentation
* Added `GetRelativeRectangle` method
* Updated documentation
* Top-level namespace
* Remove whitespace
* Move properties up
* Top-level namespace
* Don't recreate structs for `Bounds` and Size`
By having the property return a new struct, this allocates on the stack during situations like a loop during draw.
* Size should be `Size` not `SizeF` value
Textures deal in pixels (ints not floats)
* Removed setter for `Texture` property
Texture should not be set after region is created
* Added UV properties
* Refactor constructors
* Added documentation
* Added license header
* Make it an actual extension method
* Added `GetSubRegion` extension methods for `TextureRegion`
* Update documentation about ObjectDisposedException
* Move const values to top
* Resolve errors from`TextureRegion` refactor
* Update unit tests for TextureRegion refactor
* Started NinePatch rework
* Refactored NinePatch
* Update for texture region constructor change
* Remove ninepatch from atlas
* Moved `TextureAtlasExtensions` into `SpriteBatch.Extensions`
These are extension methods for the sprite batch
* Updated to use new `DrawTextureRegion` method after rename
* Renamed to NinePatchJsonConverter
* Removed `GetRegion<T>`
TextureAtlas no longer contains nine patch regions, so this method isn't needed
* Update after `NinePatchRegion2DJsonConverter` name change
* Resolve errors from NinePatch refactor
* TextureAtlas rework
* Renamed `TextureRegion` to `Texture2DRegion`
* Moved ContentReaders to new Content\ContentReaders directory
* Moved TextureAtlasJsonConvert to Serialization directory
* Adjusted name from `Texture*` to `Texture2D*`
* Update runtimereader and runtimettype strings
* Converted to use `System.Text.Json`
* Remove Newtonsoft.Json Dependency
Newtonsoft.Json dependency has been removed in favor of System.Text.Json
* Treat MGFXO file as binary