Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

tinyjin
Copy link
Member

@tinyjin tinyjin commented Oct 22, 2025

This patch enables slot overriding for custom effects (LottieFxCustom).

Allowing Lottie animations to dynamically override effect properties for Custom effect
through the slot system, providing runtime customization of visual effects.

Sample (default effect slot)

effect-default-slot.json

Result (lottie-web vs ThorVG)

CleanShot 2025-10-23 at 01 38 14

Slot JSON

{
    "slider_control": {
        "p": {
            "a": 1,
            "ix": 1,
            "k": [
                {
                    "i": {
                        "x": [
                            0.833
                        ],
                        "y": [
                            0.833
                        ]
                    },
                    "o": {
                        "x": [
                            0.167
                        ],
                        "y": [
                            0.167
                        ]
                    },
                    "t": 0,
                    "s": [
                        0
                    ],
                    "e": [
                        50
                    ]
                },
                {
                    "t": 100
                }
            ]
        }
    }
}

issue: #3826

    Make LottieEffect inherit from LottieObject for architectural consistency and enabling Slot overriding.

    Removed redundant 'nm' field from LottieEffect, now using the inherited 'id' field from LottieObject.

    Renamed property methods each to `getProp` and `propertyById` for backward compatibility with the LottieObject model.
This patch enables slot overriding for custom effects (LottieFxCustom).

Allowing Lottie animations to dynamically override effect properties for Custom effect
through the slot system, providing runtime customization of visual effects.

issue: #3826
@tinyjin tinyjin self-assigned this Oct 22, 2025
@tinyjin tinyjin added enhancement Improve features lottie Lottie animation labels Oct 22, 2025
@github-actions github-actions bot added the example Sample Code label Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improve features example Sample Code lottie Lottie animation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant