Skip to main content

scenes

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

Abstract scene representations and related utilities.

Enumerations

  • SceneRenderEvent
  • SceneState

Classes

  • GeneratorScene
  • LifecycleEvents
  • Random
  • Slides
  • Variables

Interfaces

  • CachedSceneData
  • FullSceneDescription
  • Inspectable
  • Scene
  • SceneConstructor
  • SceneDescription
  • SceneDescriptionReload
  • Slide
  • ThreadGeneratorFactory
  • Threadable

Type Aliases

DescriptionOf

                            
                              
                                type 
                                DescriptionOf
                                
                                  
                                    
                                      TScene
                                    
                                  
                                
                                 = 
                                TScene
                                 extends 
                                Scene
                                
                                  
                                    
                                      infer 
                                      TConfig
                                    
                                  
                                
                                 ? 
                                SceneDescription
                                
                                  
                                    
                                      TConfig
                                    
                                  
                                
                                 : 
                                never
                              
                              

Type Parameters


InspectedAttributes

                            
                              
                                type 
                                InspectedAttributes
                                 = 
                                
                                  
                                    
                                      stack
                                      ?: 
                                      string
                                    
                                  
                                
                              
                              

Represents attributes of an inspected element.


InspectedElement

                            
                              
                                type 
                                InspectedElement
                                 = 
                                unknown
                              
                              

Represents an element to inspect.

The type is not important because the UI does not interact with it.It serves as a key that will be passed back to an Inspectable scene toreceive more information about said element.


SceneMetadata

                            
                              
                                type 
                                SceneMetadata
                                 = 
                                ReturnType
                                
                                  
                                    
                                      typeof 
                                      createSceneMetadata
                                    
                                  
                                
                              
                              

A runtime representation of the scene metadata.

Functions

createSceneMetadata

                            
                              
                                public 
                                createSceneMetadata
                                (): 
                                ObjectMetaField
                                
                                  
                                    
                                      
                                        
                                          
                                            seed
                                            : 
                                            MetaField
                                            
                                              
                                                
                                                  any
                                                
                                                
                                                  number
                                                
                                              
                                            
                                             = 
                                            ...
                                          
                                          
                                            timeEvents
                                            : 
                                            MetaField
                                            
                                              
                                                
                                                  SerializedTimeEvent
                                                  []
                                                
                                                
                                                  SerializedTimeEvent
                                                  []
                                                
                                              
                                            
                                             = 
                                            ...
                                          
                                          
                                            version
                                            : 
                                            MetaField
                                            
                                              
                                                
                                                  any
                                                
                                                
                                                  number
                                                
                                              
                                            
                                             = 
                                            ...
                                          
                                        
                                      
                                    
                                  
                                
                              
                              

Create a runtime representation of the scene metadata.


isInspectable

                            
                              
                                public 
                                isInspectable
                                
                                  
                                    
                                      value
                                      : 
                                      any
                                    
                                  
                                
                                : 
                                value 
                                is 
                                Inspectable
                              
                              

Parameters


isThreadable

                            
                              
                                public 
                                isThreadable
                                
                                  
                                    
                                      value
                                      : 
                                      any
                                    
                                  
                                
                                : 
                                value 
                                is 
                                Threadable
                              
                              

Parameters