Skip to main content

events

                            
                              
                                import
                                
                                {
                                ...
                                }
                                
                                from
                                
                                "@motion-canvas/core/lib/events"
                                ;
                                

Subscriptions and triggering of events.

Classes

  • AsyncEventDispatcher
  • EventDispatcher
  • EventDispatcherBase
  • FlagDispatcher
  • Subscribable
  • SubscribableValueEvent
  • ValueDispatcher

Interfaces

  • AsyncEventHandler
  • EventHandler

Type Aliases

SubscribableAsyncEvent

                            
                              
                                type 
                                SubscribableAsyncEvent
                                
                                  
                                    
                                      T
                                    
                                  
                                
                                 = 
                                Subscribable
                                
                                  
                                    
                                      T
                                    
                                    
                                      AsyncEventHandler
                                      
                                        
                                          
                                            T
                                          
                                        
                                      
                                    
                                  
                                
                              
                              

Provides safe access to the public interface of AsyncEventDispatcher .

External classes can use it to subscribe to an event without being able todispatch it.

Type Parameters

  • T

    The type of the argument passed to subscribers.


SubscribableEvent

                            
                              
                                type 
                                SubscribableEvent
                                
                                  
                                    
                                      T
                                    
                                  
                                
                                 = 
                                Subscribable
                                
                                  
                                    
                                      T
                                    
                                  
                                
                              
                              

Provides safe access to the public interface of EventDispatcher .

External classes can use it to subscribe to an event without being able todispatch it.

Type Parameters

  • T

    The type of the argument passed to subscribers.


SubscribableFlagEvent

                            
                              
                                type 
                                SubscribableFlagEvent
                                 = 
                                Subscribable
                                
                                  
                                    
                                      void
                                    
                                  
                                
                              
                              

Provides safe access to the public interface of FlagDispatcher .

External classes can use it to subscribe to an event without being able todispatch it.