5 Commits

Author SHA1 Message Date
Mario Zechner
3d5a66b5f8 Formatting 2025-08-28 13:57:28 +02:00
Mario Zechner
81c9f5630a [ios] Fix SkeletonDrawableWrapper.update() to call directly into the drawable. 2025-08-26 17:38:08 +02:00
Mario Zechner
9b345068b6 feat(spine-ios): Update SpineiOS and Example to work with new SpineSwift generated bindings
- Remove AnimationStateWrapper (no longer needed with new SpineSwift API)
- Replace Spine.Generated+Extensions.swift with simplified SpineSwiftExtensions.swift
- Update SpineiOS to use SpineSwift API instead of direct SpineC calls
- Fix namespace conflicts (ContentMode → SpineContentMode, Alignment → SpineAlignment)
- Update texture mapping to use atlas page index from RenderCommand pointer
- Fix all Example app API calls to match new SpineSwift generated API:
  - setAnimationByName → setAnimation
  - addAnimationByName → addAnimation
  - slot.color → slot.appliedPose.color.set()
  - EventType enum cases instead of constants
  - Physics enum with qualified name to avoid conflicts
  - setSkin2() instead of property assignment
  - Array iteration using indices instead of for-in
  - bone.worldX → bone.appliedPose.worldX
- Update Objective-C imports from Spine to SpineiOS module

Note: SimpleAnimationViewController.m still needs updates for full ObjC compatibility
2025-08-26 17:35:31 +02:00
Mario Zechner
9fdc0f0033 spine-ios: Fix Swift bindings compilation - arrays and type conversions
- Fixed array wrapper generation to use correct pointer casting
- Changed array count/length properties to return Int instead of Int32
- Fixed buffer access for primitive and object arrays (no assumingMemoryBound needed)
- Corrected size_t parameters to use Int instead of Int32
- Updated module imports (SpineSwift instead of Spine)
- Reduced compilation errors from 17,500 to 0 for SpineSwift module
- Remaining 27 errors are iOS-specific (UIKit) in SpineiOS module
2025-08-11 19:31:33 +02:00
Mario Zechner
ecbd700af4 Restructure spine-ios modules: SpineC, SpineSwift, SpineiOS
- Created clean module separation:
  - SpineC: C/C++ compilation only (working)
  - SpineSwift: Generated Swift bindings + platform-agnostic API
  - SpineiOS: iOS-specific UI components only
- Updated Package.swift with proper target structure
- Moved generated Swift files to SpineSwift/Generated
- Removed redundant SpineModule
- Created test with skeleton_drawable_test.swift ported from Dart
- Test successfully runs using SpineC module directly
- Note: SpineSwift has Objective-C selector conflicts to be fixed
2025-08-11 19:07:29 +02:00