3 Commits

Author SHA1 Message Date
Mario Zechner
3d5a66b5f8 Formatting 2025-08-28 13:57:28 +02:00
Mario Zechner
f1d98393d5 fix(spine-ios): Fix memory management and complete test implementation
- Changed code generator to emit dispose() methods instead of deinit
- Add override keyword for dispose() in subclasses
- Keep deinit with _ownsMemory check for array types
- Fix SkinExtensions to use correct C++ class names for attachments
- Complete skeleton_drawable_test implementations with no warnings
- Add comprehensive bone pose transformation tests
- Fix skin entries test to properly show attachments

The memory management fix prevents Swift wrappers from accidentally
disposing C++ objects they don't own when created via fromPointer.
2025-08-16 21:24:13 +02:00
Mario Zechner
cc43fd549b feat(spine-ios): Implement SpineSwift high-level API mirroring spine_dart.dart
- Created SkeletonDrawable class wrapping spine_skeleton_drawable C functions
- Implemented AnimationStateEventManager singleton for event listener management
- Added helper types: Bounds and Vector structs
- Added extensions for Skeleton (bounds, getPosition)
- Added extensions for Skin (getEntries to iterate attachments)
- Added extensions for BonePose (coordinate transformations)
- Added extensions for AnimationState and TrackEntry (event listeners)
- Created skeleton_drawable_test_swift.swift using SpineSwift high-level API
- Updated test Package.swift to include SpineSwift dependency
- SpineSwift module now compiles with 0 errors

This completes the port of the high-level API from spine-flutter's spine_dart.dart
to SpineSwift, providing a clean Swift API that mirrors the Dart implementation.
2025-08-11 20:17:17 +02:00