Flutter Engine
The Flutter Engine
Public Member Functions | Protected Attributes | List of all members
BouncingParticlesStage Class Reference
Inheritance diagram for BouncingParticlesStage:
Stage BouncingTaggedImagesStage

Public Member Functions

 BouncingParticlesStage (SkSize size)
 
bool animate (double nanos) override
 
- Public Member Functions inherited from Stage
 Stage (SkSize size, int startingObjectCount, int objectIncrement)
 
virtual ~Stage ()=default
 
virtual void draw (SkCanvas *canvas)
 
virtual bool animate (double nanos)
 
virtual bool onChar (SkUnichar uni)
 

Protected Attributes

SkSize fParticleSize
 
float fMaxVelocity
 
double fLastTime = -1
 
- Protected Attributes inherited from Stage
SkSize fSize
 
int fStartingObjectCount
 
int fObjectIncrement
 
std::vector< std::unique_ptr< MMObject > > fObjects
 
SkRandom fRandom
 

Additional Inherited Members

- Protected Member Functions inherited from Stage
virtual std::unique_ptr< MMObjectcreateObject ()=0
 
void initializeObjects ()
 

Detailed Description

Definition at line 735 of file MotionMarkSlide.cpp.

Constructor & Destructor Documentation

◆ BouncingParticlesStage()

BouncingParticlesStage::BouncingParticlesStage ( SkSize  size)
inline

Definition at line 737 of file MotionMarkSlide.cpp.

738 : Stage(size, /*startingObjectCount=*/3000, /*objectIncrement=*/500)
739 , fParticleSize({150, 150})
740 , fMaxVelocity(10){
741 }
Stage(SkSize size, int startingObjectCount, int objectIncrement)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259

Member Function Documentation

◆ animate()

bool BouncingParticlesStage::animate ( double  nanos)
inlineoverridevirtual

Reimplemented from Stage.

Definition at line 743 of file MotionMarkSlide.cpp.

743 {
744 // The particles take delta time
745 if (fLastTime < 0) {
746 fLastTime = nanos;
747 }
748 for (size_t i = 0; i < fObjects.size(); ++i) {
749 fObjects[i]->animate(nanos - fLastTime);
750 }
751 fLastTime = nanos;
752 return true;
753 }
std::vector< std::unique_ptr< MMObject > > fObjects

Member Data Documentation

◆ fLastTime

double BouncingParticlesStage::fLastTime = -1
protected

Definition at line 758 of file MotionMarkSlide.cpp.

◆ fMaxVelocity

float BouncingParticlesStage::fMaxVelocity
protected

Definition at line 757 of file MotionMarkSlide.cpp.

◆ fParticleSize

SkSize BouncingParticlesStage::fParticleSize
protected

Definition at line 756 of file MotionMarkSlide.cpp.


The documentation for this class was generated from the following file: