kinetic-slider
Version:
A WebGL-powered kinetic slider component using PIXI.js
1 lines • 20.4 kB
Source Map (JSON)
{"version":3,"file":"AnimationCoordinator.cjs","sources":["../../../src/managers/AnimationCoordinator.ts"],"sourcesContent":["/**\n * @file AnimationCoordinator.ts\n * @description Coordinates animations across different components of the KineticSlider.\n * Ensures animations are properly grouped, prioritized, and synchronized.\n */\n\nimport { gsap } from 'gsap';\nimport RenderScheduler from './RenderScheduler';\nimport { UpdateType, UpdatePriority } from './UpdateTypes';\nimport ResourceManager from './ResourceManager';\n\n// Development environment check\nconst isDevelopment = import.meta.env?.MODE === 'development';\n\n/**\n * Animation group types for categorizing related animations\n */\nexport enum AnimationGroupType {\n SLIDE_TRANSITION = 'slide_transition',\n MOUSE_MOVEMENT = 'mouse_movement',\n IDLE_EFFECT = 'idle_effect',\n FILTER_EFFECT = 'filter_effect',\n TEXT_ANIMATION = 'text_animation',\n DISPLACEMENT = 'displacement',\n INTERACTION = 'interaction'\n}\n\n/**\n * Animation priority levels\n */\nexport enum AnimationPriority {\n CRITICAL = 'critical',\n HIGH = 'high',\n NORMAL = 'normal',\n LOW = 'low'\n}\n\n/**\n * Maps animation group types to their default priority\n */\nconst GROUP_PRIORITY_MAP: Record<AnimationGroupType, AnimationPriority> = {\n [AnimationGroupType.SLIDE_TRANSITION]: AnimationPriority.CRITICAL,\n [AnimationGroupType.MOUSE_MOVEMENT]: AnimationPriority.HIGH,\n [AnimationGroupType.INTERACTION]: AnimationPriority.HIGH,\n [AnimationGroupType.DISPLACEMENT]: AnimationPriority.NORMAL,\n [AnimationGroupType.FILTER_EFFECT]: AnimationPriority.NORMAL,\n [AnimationGroupType.TEXT_ANIMATION]: AnimationPriority.NORMAL,\n [AnimationGroupType.IDLE_EFFECT]: AnimationPriority.LOW\n};\n\n/**\n * Maps animation priority to RenderScheduler UpdateType\n */\nconst PRIORITY_UPDATE_TYPE_MAP: Record<AnimationPriority, UpdateType> = {\n [AnimationPriority.CRITICAL]: UpdateType.SLIDE_TRANSITION,\n [AnimationPriority.HIGH]: UpdateType.INTERACTION_FEEDBACK,\n [AnimationPriority.NORMAL]: UpdateType.FILTER_UPDATE,\n [AnimationPriority.LOW]: UpdateType.IDLE_EFFECT\n};\n\n/**\n * Interface for animation group configuration\n */\nexport interface AnimationGroupConfig {\n id: string;\n type: AnimationGroupType;\n priority?: AnimationPriority;\n animations: gsap.core.Tween[];\n onComplete?: () => void;\n onStart?: () => void;\n}\n\n/**\n * Interface for animation group tracking\n */\ninterface AnimationGroup {\n id: string;\n type: AnimationGroupType;\n priority: AnimationPriority;\n timeline: gsap.core.Timeline;\n animations: gsap.core.Tween[];\n isActive: boolean;\n startTime: number;\n}\n\n/**\n * Coordinates animations across different components of the KineticSlider.\n * Ensures animations are properly grouped, prioritized, and synchronized.\n */\nexport class AnimationCoordinator {\n /** Singleton instance */\n private static instance: AnimationCoordinator;\n\n /** Active animation groups */\n private activeGroups: Map<string, AnimationGroup> = new Map();\n\n /** Resource manager for tracking animations */\n private resourceManager: ResourceManager | null = null;\n\n /** Render scheduler for coordinating updates */\n private scheduler: RenderScheduler;\n\n /** Pending animation groups to be processed */\n private pendingGroups: AnimationGroupConfig[] = [];\n\n /** Processing state */\n private isProcessing: boolean = false;\n\n /** Processing timeout ID */\n private processingTimeoutId: number | null = null;\n\n /**\n * Get the singleton instance\n */\n public static getInstance(): AnimationCoordinator {\n if (!AnimationCoordinator.instance) {\n AnimationCoordinator.instance = new AnimationCoordinator();\n }\n return AnimationCoordinator.instance;\n }\n\n /**\n * Private constructor for singleton pattern\n */\n private constructor() {\n this.scheduler = RenderScheduler.getInstance();\n }\n\n /**\n * Set the resource manager\n */\n public setResourceManager(resourceManager: ResourceManager): void {\n this.resourceManager = resourceManager;\n }\n\n /**\n * Create and register an animation group\n */\n public createAnimationGroup(config: AnimationGroupConfig): gsap.core.Timeline {\n try {\n // Use provided priority or default for the group type\n const priority = config.priority || GROUP_PRIORITY_MAP[config.type];\n\n // Create a timeline for the group\n const timeline = gsap.timeline({\n onComplete: () => {\n this.completeGroup(config.id);\n if (config.onComplete) config.onComplete();\n },\n onStart: () => {\n if (config.onStart) config.onStart();\n }\n });\n\n // Add all animations to the timeline\n config.animations.forEach(animation => {\n timeline.add(animation, 0);\n });\n\n // Create the animation group\n const group: AnimationGroup = {\n id: config.id,\n type: config.type,\n priority,\n timeline,\n animations: config.animations,\n isActive: true,\n startTime: Date.now()\n };\n\n // Register the group\n this.activeGroups.set(config.id, group);\n\n // Track the timeline with resource manager\n if (this.resourceManager) {\n this.resourceManager.trackAnimation(timeline);\n }\n\n if (isDevelopment) {\n console.log(`Created animation group: ${config.id} (${config.type}) with priority ${priority}`);\n }\n\n return timeline;\n } catch (error) {\n if (isDevelopment) {\n console.error('Error creating animation group:', error);\n }\n // Return an empty timeline on error\n return gsap.timeline();\n }\n }\n\n /**\n * Queue an animation group for processing\n */\n public queueAnimationGroup(config: AnimationGroupConfig): void {\n // Add to pending groups\n this.pendingGroups.push(config);\n\n // Schedule processing\n this.schedulePendingGroupsProcessing();\n }\n\n /**\n * Schedule processing of pending animation groups\n */\n private schedulePendingGroupsProcessing(): void {\n if (this.isProcessing || this.processingTimeoutId !== null) {\n return;\n }\n\n this.processingTimeoutId = window.setTimeout(() => {\n this.processingTimeoutId = null;\n this.processPendingGroups();\n }, 16); // Process on next frame\n }\n\n /**\n * Process pending animation groups\n */\n private processPendingGroups(): void {\n if (this.pendingGroups.length === 0) {\n return;\n }\n\n this.isProcessing = true;\n\n try {\n // Group pending animations by type\n const groupedByType = new Map<AnimationGroupType, AnimationGroupConfig[]>();\n\n this.pendingGroups.forEach(group => {\n if (!groupedByType.has(group.type)) {\n groupedByType.set(group.type, []);\n }\n groupedByType.get(group.type)!.push(group);\n });\n\n // Process each type\n groupedByType.forEach((groups, type) => {\n // For each type, create a single combined group\n if (groups.length > 1) {\n this.combineAndCreateGroup(groups, type);\n } else if (groups.length === 1) {\n this.createAnimationGroup(groups[0]);\n }\n });\n\n // Clear pending groups\n this.pendingGroups = [];\n } catch (error) {\n if (isDevelopment) {\n console.error('Error processing pending animation groups:', error);\n }\n } finally {\n this.isProcessing = false;\n }\n }\n\n /**\n * Combine multiple animation groups of the same type into a single group\n */\n private combineAndCreateGroup(groups: AnimationGroupConfig[], type: AnimationGroupType): void {\n try {\n // Combine all animations\n const allAnimations: gsap.core.Tween[] = [];\n const onCompleteCallbacks: (() => void)[] = [];\n const onStartCallbacks: (() => void)[] = [];\n\n groups.forEach(group => {\n allAnimations.push(...group.animations);\n if (group.onComplete) onCompleteCallbacks.push(group.onComplete);\n if (group.onStart) onStartCallbacks.push(group.onStart);\n });\n\n // Create a combined group\n const combinedGroup: AnimationGroupConfig = {\n id: `combined_${type}_${Date.now()}`,\n type,\n animations: allAnimations,\n onComplete: () => {\n onCompleteCallbacks.forEach(callback => callback());\n },\n onStart: () => {\n onStartCallbacks.forEach(callback => callback());\n }\n };\n\n // Create the combined group\n this.createAnimationGroup(combinedGroup);\n\n if (isDevelopment) {\n console.log(`Combined ${groups.length} animation groups of type ${type}`);\n }\n } catch (error) {\n if (isDevelopment) {\n console.error('Error combining animation groups:', error);\n }\n }\n }\n\n /**\n * Mark an animation group as complete\n */\n private completeGroup(groupId: string): void {\n try {\n const group = this.activeGroups.get(groupId);\n if (!group) return;\n\n // Mark as inactive\n group.isActive = false;\n\n // Remove from active groups\n this.activeGroups.delete(groupId);\n\n if (isDevelopment) {\n const duration = Date.now() - group.startTime;\n console.log(`Completed animation group: ${groupId} (${group.type}) after ${duration}ms`);\n }\n } catch (error) {\n if (isDevelopment) {\n console.error('Error completing animation group:', error);\n }\n }\n }\n\n /**\n * Cancel all animations of a specific type\n */\n public cancelAnimationsByType(type: AnimationGroupType): void {\n try {\n const groupsToCancel: string[] = [];\n\n // Find all groups of the specified type\n this.activeGroups.forEach((group, id) => {\n if (group.type === type) {\n groupsToCancel.push(id);\n }\n });\n\n // Cancel each group\n groupsToCancel.forEach(id => {\n this.cancelAnimationGroup(id);\n });\n\n if (isDevelopment && groupsToCancel.length > 0) {\n console.log(`Cancelled ${groupsToCancel.length} animation groups of type ${type}`);\n }\n } catch (error) {\n if (isDevelopment) {\n console.error('Error cancelling animations by type:', error);\n }\n }\n }\n\n /**\n * Cancel a specific animation group\n */\n public cancelAnimationGroup(groupId: string): void {\n try {\n const group = this.activeGroups.get(groupId);\n if (!group) return;\n\n // Kill the timeline\n group.timeline.kill();\n\n // Remove from active groups\n this.activeGroups.delete(groupId);\n\n if (isDevelopment) {\n console.log(`Cancelled animation group: ${groupId} (${group.type})`);\n }\n } catch (error) {\n if (isDevelopment) {\n console.error('Error cancelling animation group:', error);\n }\n }\n }\n\n /**\n * Schedule an animation update with the render scheduler\n */\n public scheduleAnimationUpdate(\n groupType: AnimationGroupType,\n callback: () => void,\n identifier: string = 'animation'\n ): void {\n try {\n // Get the priority for this group type\n const priority = GROUP_PRIORITY_MAP[groupType];\n\n // Map to update type\n const updateType = PRIORITY_UPDATE_TYPE_MAP[priority];\n\n // Schedule the update\n this.scheduler.scheduleTypedUpdate(\n identifier,\n updateType,\n callback\n );\n\n if (isDevelopment) {\n console.log(`Scheduled animation update for ${groupType} with priority ${priority}`);\n }\n } catch (error) {\n if (isDevelopment) {\n console.error('Error scheduling animation update:', error);\n }\n }\n }\n\n /**\n * Get all active animation groups\n */\n public getActiveGroups(): Map<string, AnimationGroup> {\n return new Map(this.activeGroups);\n }\n\n /**\n * Check if there are any active animations of a specific type\n */\n public hasActiveAnimationsOfType(type: AnimationGroupType): boolean {\n for (const group of this.activeGroups.values()) {\n if (group.type === type && group.isActive) {\n return true;\n }\n }\n return false;\n }\n}\n\nexport default AnimationCoordinator;"],"names":["AnimationGroupType","UpdateType","RenderScheduler","gsap"],"mappings":";;;;;;;;;;;AAYA,MAAM,aAAgB,GAAA,KAAA;AAKV,IAAA,kBAAA,qBAAAA,mBAAL,KAAA;AACH,EAAAA,oBAAA,kBAAmB,CAAA,GAAA,kBAAA;AACnB,EAAAA,oBAAA,gBAAiB,CAAA,G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