       // Duration function - returns animation duration in seconds
            duration: () => {
                return window.currentParams ? window.currentParams.animationDurationSeconds : 3;
            },

            // Initialize animation for capture
            initAnimation: () => {
                const params = window.currentParams;
                if (!params) {
                    console.error('Parameters not loaded. Make sure animation is initialized first.');
                    return null