Repository navigation
feat: slots, bezier paths, asset resolver and state machine parity with dotlottie-rs - #155
Merged
Merged
Conversation
Bring the Swift API up to the dotlottie-rs C API at 02a61130: - getSlotIds, getSlotType, getSlot, getSlots, setSlot, resetSlot and resetSlots - setBezierPathSlot - an assetResolver on AnimationConfig for assets the player cannot load itself - stateMachineSetSeed and stateMachineStatus No xcframework rebuild: the binaries are already dotlottie-rs 02a61130 with ThorVG v1.1.3.
|
The bridge already had it, but the public class could only set the loop count through AnimationConfig at creation.
Bump deps/dotlottie-rs to e5356051 (LottieFiles/dotlottie-rs#625), which adds override, input reset and input listing to the C API, and rebuild the xcframeworks. ThorVG is unchanged at v1.1.3. Wrap them as stateMachineOverrideCurrentState and stateMachineResetInput. markers() put the marker's end frame in Marker.duration. It now holds the duration, so a marker that does not start at frame 0 is right.
make apple does not update Sources/DotLottieCore/cocoapods, so the CocoaPods copy was still the 02a61130 build and did not export the state machine functions the Swift layer now calls.
theashraf
marked this pull request as ready for review
November 11, 2026 05:47
theashraf
added a commit
that referenced
this pull request
Nov 11, 2026
…th dotlottie-rs (#155) (#156) * feat: slot introspection, bezier path slots and an asset resolver Bring the Swift API up to the dotlottie-rs C API at 02a61130: - getSlotIds, getSlotType, getSlot, getSlots, setSlot, resetSlot and resetSlots - setBezierPathSlot - an assetResolver on AnimationConfig for assets the player cannot load itself - stateMachineSetSeed and stateMachineStatus No xcframework rebuild: the binaries are already dotlottie-rs 02a61130 with ThorVG v1.1.3. * feat: setLoopCount on DotLottieAnimation The bridge already had it, but the public class could only set the loop count through AnimationConfig at creation. * feat: state machine override and input reset, fix marker duration Bump deps/dotlottie-rs to e5356051 (LottieFiles/dotlottie-rs#625), which adds override, input reset and input listing to the C API, and rebuild the xcframeworks. ThorVG is unchanged at v1.1.3. Wrap them as stateMachineOverrideCurrentState and stateMachineResetInput. markers() put the marker's end frame in Marker.duration. It now holds the duration, so a marker that does not start at frame 0 is right. * chore: refresh the CocoaPods xcframework copy make apple does not update Sources/DotLottieCore/cocoapods, so the CocoaPods copy was still the 02a61130 build and did not export the state machine functions the Swift layer now calls.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #154. Wraps the parts of the dotlottie-rs C API that Swift could not reach, and moves the core to dotlottie-rs
main(e5356051).Core
deps/dotlottie-rsbumped from02a61130toe5356051(feat: state machine override, input reset and input listing in the C API dotlottie-rs#625, which adds state machine override, input reset and input listing to the C API). The xcframeworks are rebuilt withmake apple.ce12cdd0e).Sources/DotLottieCore/cocoapodsis refreshed with./cocoapods-release.sh.make appledoes not update it, so it was still the02a61130build and did not export the new state machine functions.1fd64fec, the PR commit before the squash merge. Its tree is identical toe5356051.New API on
DotLottieAnimationgetSlotIds(),getSlotType(slotId:),getSlot(slotId:),getSlots(),setSlot(slotId:json:),resetSlot(slotId:),resetSlots().setBezierPathSlot(slotId:vertices:closed:inTangents:outTangents:): replaces the geometry of a path slot. Nil tangents mean straight segments.stateMachineOverrideCurrentState(_:immediate:),stateMachineResetInput(key:),stateMachineSetSeed(_:)andstateMachineStatus().setLoopCount(_:). The bridge had it; the public class could only set the loop count at creation.AnimationConfig.assetResolver: suppliesDatafor assets the player cannot load itself, such as an image referenced by a remote URL.Fix:
markers()Marker.durationheld the marker's end frame, because the C API returns start and end. It now holdsend - start.DotLottiePlayerUIViewalready computed the end astime + duration, so its marker ranges were too long before and are right now.Asset resolver notes
DotLottiePlayerkeeps every resolver box alive untildeinit.AnimationConfigrather than an initializer argument, to leave both existing initializers untouched.Tests
SlotsAndAssetResolverTestscovers the new calls.swift test: 119 tests, 0 failures, against the rebuilt frameworks.Not included
DotLottiePlayerUIView/DotLottiePlayerViewhave no slot API today, so nothing was added there..gitmodulesstill lists the staleSources/Thorvg/Thorvgentry. chore: remove stale Thorvg submodule entry from .gitmodules #153 already removes it.Counterparts: LottieFiles/dotlottie-web#997, LottieFiles/dotlottie-android#149.