X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fsparkle%2Fsparkle-effect-example.cpp;h=cac0e4055c66160fd781540b8cbb1c2f1fe41081;hb=1b19fd140ff139b5854a1a62447faf31b175d8f6;hp=cdae9585de1d9cd031015c21f0f62a5a12e9bfb8;hpb=a284a43f0bb9f45e37809d9778d3c774a5169d50;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/sparkle/sparkle-effect-example.cpp b/examples/sparkle/sparkle-effect-example.cpp index cdae958..cac0e40 100644 --- a/examples/sparkle/sparkle-effect-example.cpp +++ b/examples/sparkle/sparkle-effect-example.cpp @@ -15,14 +15,14 @@ * */ -#include #include +#include -#include #include +#include // std::chrono::system_clock #include -#include // std::default_random_engine -#include // std::chrono::system_clock +#include // std::default_random_engine +#include #include "shared/utility.h" #include "sparkle-effect.h" @@ -34,30 +34,29 @@ using namespace SparkleEffect; namespace // unnamed namespace { - //background image for normal status -const char * const CIRCLE_BACKGROUND_IMAGE( DEMO_IMAGE_DIR "sparkle_normal_background.png" ); +const char* const CIRCLE_BACKGROUND_IMAGE(DEMO_IMAGE_DIR "sparkle_normal_background.png"); //particle shape image -const char * const PARTICLE_IMAGE( DEMO_IMAGE_DIR "sparkle_particle.png" ); +const char* const PARTICLE_IMAGE(DEMO_IMAGE_DIR "sparkle_particle.png"); -float EaseOutSquare( float progress ) +float EaseOutSquare(float progress) { - return 1.0f - (1.0f-progress) * (1.0f-progress); + return 1.0f - (1.0f - progress) * (1.0f - progress); } -float CustomBounce( float progress ) +float CustomBounce(float progress) { - float p = 1.f-progress; - p *=p; - return 17.68f*p*p*p*progress; + float p = 1.f - progress; + p *= p; + return 17.68f * p * p * p * progress; } -float Mix( const Vector2& range, float a ) +float Mix(const Vector2& range, float a) { - return range.x * a + range.y*(1.f-a)-0.001f; + return range.x * a + range.y * (1.f - a) - 0.001f; } -const Vector4 BACKGROUND_COLOR( 0.f, 0.f, 0.05f, 1.f ); +const Vector4 BACKGROUND_COLOR(0.f, 0.f, 0.05f, 1.f); } // unnamed namespace @@ -66,55 +65,53 @@ const Vector4 BACKGROUND_COLOR( 0.f, 0.f, 0.05f, 1.f ); class SparkleEffectExample : public ConnectionTracker { public: - /** * Create the SparkleEffectExample * @param[in] application The DALi application instance */ - SparkleEffectExample( Application& application ) - : mApplication( application ), - mAnimationIndex( 0u ), - mShaking( false ) + SparkleEffectExample(Application& application) + : mApplication(application), + mAnimationIndex(0u), + mShaking(false) { - mApplication.InitSignal().Connect( this, &SparkleEffectExample::OnInit ); + mApplication.InitSignal().Connect(this, &SparkleEffectExample::OnInit); } private: - /** * Initialize the SparkleEffectExample * @param[in] application The DALi application instance */ - void OnInit( Application& application ) + void OnInit(Application& application) { Window window = application.GetWindow(); window.KeyEventSignal().Connect(this, &SparkleEffectExample::OnKeyEvent); - window.SetBackgroundColor( BACKGROUND_COLOR ); + window.SetBackgroundColor(BACKGROUND_COLOR); - mCircleBackground = ImageView::New( CIRCLE_BACKGROUND_IMAGE ); - mCircleBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mCircleBackground.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + mCircleBackground = ImageView::New(CIRCLE_BACKGROUND_IMAGE); + mCircleBackground.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); + mCircleBackground.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER); - window.Add( mCircleBackground ); + window.Add(mCircleBackground); mEffect = SparkleEffect::New(); mMeshActor = CreateMeshActor(); - window.Add( mMeshActor ); + window.Add(mMeshActor); - mMeshActor.SetProperty( Actor::Property::POSITION, ACTOR_POSITION ); - mMeshActor.SetProperty( Actor::Property::SCALE, ACTOR_SCALE ); + mMeshActor.SetProperty(Actor::Property::POSITION, ACTOR_POSITION); + mMeshActor.SetProperty(Actor::Property::SCALE, ACTOR_SCALE); mTapDetector = TapGestureDetector::New(); mTapDetector.Attach(mCircleBackground); - mTapDetector.DetectedSignal().Connect( this, &SparkleEffectExample::OnTap ); + mTapDetector.DetectedSignal().Connect(this, &SparkleEffectExample::OnTap); mPanGestureDetector = PanGestureDetector::New(); - mPanGestureDetector.DetectedSignal().Connect( this, &SparkleEffectExample::OnPan ); - mPanGestureDetector.Attach( mCircleBackground ); + mPanGestureDetector.DetectedSignal().Connect(this, &SparkleEffectExample::OnPan); + mPanGestureDetector.Attach(mCircleBackground); - PlayWanderAnimation( 35.f ); + PlayWanderAnimation(35.f); } /** @@ -124,28 +121,28 @@ private: { // shuffling to assign the color in random order unsigned int* shuffleArray = new unsigned int[NUM_PARTICLE]; - for( unsigned int i = 0; i vertices; - std::vector< unsigned short > faces; + std::vector vertices; + std::vector faces; - for( unsigned int i = 0; i(thereshold-particleIndex)/PARTICLE_COLORS[i].numParticle ); + return i + Mix(PARTICLE_COLORS[i].AlphaRange, static_cast(thereshold - particleIndex) / PARTICLE_COLORS[i].numParticle); } } - return NUM_COLOR-1; + return NUM_COLOR - 1; } /** @@ -212,35 +209,35 @@ private: * color index, particle index and textureCoor( (0,0) or (1,0) or (0,1) or (1,1) ) * ---- package these info into texCood attribute as: (+-colorIndex, +-particleIndex) */ - void AddParticletoMesh( std::vector< Vertex >& vertices, - std::vector< unsigned short >& faces, - MovingPath& movingPath, - float colorIndex ) + void AddParticletoMesh(std::vector& vertices, + std::vector& faces, + MovingPath& movingPath, + float colorIndex) { unsigned int idx = vertices.size(); // store the path into position and normal, which would be decoded inside the shader - Vector2 particlePath0( movingPath[0], movingPath[1] ); - Vector2 particlePath1( movingPath[2], movingPath[3] ); - Vector2 particlePath2( movingPath[4], movingPath[5] ); - Vector2 particlePath3( movingPath[6], movingPath[7] ); - Vector2 particlePath4( movingPath[8], movingPath[9] ); - Vector2 particlePath5( movingPath[10], movingPath[11] ); - - float particleIdx = static_cast(idx/4 + 1); // count from 1 - float colorIdx = colorIndex+1.f; // count from 1 - vertices.push_back( Vertex( Vector2(-colorIdx, -particleIdx), particlePath0, particlePath1, particlePath2, particlePath3, particlePath4, particlePath5 ) ); - vertices.push_back( Vertex( Vector2(-colorIdx, particleIdx), particlePath0, particlePath1, particlePath2, particlePath3, particlePath4, particlePath5 ) ); - vertices.push_back( Vertex( Vector2( colorIdx, particleIdx), particlePath0, particlePath1, particlePath2, particlePath3, particlePath4, particlePath5 ) ); - vertices.push_back( Vertex( Vector2( colorIdx, -particleIdx), particlePath0, particlePath1, particlePath2, particlePath3, particlePath4, particlePath5 ) ); + Vector2 particlePath0(movingPath[0], movingPath[1]); + Vector2 particlePath1(movingPath[2], movingPath[3]); + Vector2 particlePath2(movingPath[4], movingPath[5]); + Vector2 particlePath3(movingPath[6], movingPath[7]); + Vector2 particlePath4(movingPath[8], movingPath[9]); + Vector2 particlePath5(movingPath[10], movingPath[11]); + + float particleIdx = static_cast(idx / 4 + 1); // count from 1 + float colorIdx = colorIndex + 1.f; // count from 1 + vertices.push_back(Vertex(Vector2(-colorIdx, -particleIdx), particlePath0, particlePath1, particlePath2, particlePath3, particlePath4, particlePath5)); + vertices.push_back(Vertex(Vector2(-colorIdx, particleIdx), particlePath0, particlePath1, particlePath2, particlePath3, particlePath4, particlePath5)); + vertices.push_back(Vertex(Vector2(colorIdx, particleIdx), particlePath0, particlePath1, particlePath2, particlePath3, particlePath4, particlePath5)); + vertices.push_back(Vertex(Vector2(colorIdx, -particleIdx), particlePath0, particlePath1, particlePath2, particlePath3, particlePath4, particlePath5)); faces.push_back(idx); - faces.push_back(idx+1); - faces.push_back(idx+2); + faces.push_back(idx + 1); + faces.push_back(idx + 2); faces.push_back(idx); - faces.push_back(idx+2); - faces.push_back(idx+3); + faces.push_back(idx + 2); + faces.push_back(idx + 3); } /* @@ -248,9 +245,9 @@ private: */ void OnKeyEvent(const KeyEvent& event) { - if(event.GetState() == KeyEvent::Down) + if(event.GetState() == KeyEvent::DOWN) { - if( IsKey( event, Dali::DALI_KEY_ESCAPE) || IsKey( event, Dali::DALI_KEY_BACK) ) + if(IsKey(event, Dali::DALI_KEY_ESCAPE) || IsKey(event, Dali::DALI_KEY_BACK)) { mApplication.Quit(); } @@ -260,44 +257,44 @@ private: /** * Callback of the TapGesture */ - void OnTap( Actor actor, const TapGesture& tap ) + void OnTap(Actor actor, const TapGesture& tap) { { - PlayTapAnimation(5.f, tap.localPoint); + PlayTapAnimation(5.f, tap.GetLocalPoint()); } } /** * Callback of the PanGesture */ - void OnPan( Actor actor, const PanGesture& gesture ) + void OnPan(Actor actor, const PanGesture& gesture) { - if( gesture.state == Gesture::Finished ) + if(gesture.GetState() == GestureState::FINISHED) { switch(mAnimationIndex) { - case 0: - { - PlayParticleFadeAnimation(0, NUM_PARTICLE, 0.f, 3.f ); - break; + case 0: + { + PlayParticleFadeAnimation(0, NUM_PARTICLE, 0.f, 3.f); + break; + } + case 1: + { + PlayBreakAnimation(2.0f); + break; + } + case 2: + { + PlayShakeAnimation(0.5f, 2.5f); + break; + } + default: + { + break; + } } - case 1: - { - PlayBreakAnimation(2.0f); - break; - } - case 2: - { - PlayShakeAnimation(0.5f, 2.5f); - break; - } - default: - { - break; - } - } - mAnimationIndex = (mAnimationIndex+1)%3; + mAnimationIndex = (mAnimationIndex + 1) % 3; } } @@ -306,10 +303,10 @@ private: * @param[in] duration The duration for the particle to move a cycle on the path. the bigger this value the slower the floating movement. * @param[in] looping Infinite playing or not */ - void PlayWanderAnimation( float duration, bool looping = true ) + void PlayWanderAnimation(float duration, bool looping = true) { - Animation wanderAnimation= Animation::New(duration); - wanderAnimation.AnimateTo( Property( mEffect, PERCENTAGE_UNIFORM_NAME ), 1.f ); + Animation wanderAnimation = Animation::New(duration); + wanderAnimation.AnimateTo(Property(mEffect, PERCENTAGE_UNIFORM_NAME), 1.f); wanderAnimation.SetLooping(looping); // infinite playing wanderAnimation.Play(); @@ -320,19 +317,19 @@ private: * @param[in] cycle How many extra cycles to move during the animation * @param[in] duration The duration for the animation */ - void PlayShakeAnimation( float cycle, float duration ) + void PlayShakeAnimation(float cycle, float duration) { - if( mShaking ) + if(mShaking) { return; } - DestroyAnimation( mTapAnimationAux ); + DestroyAnimation(mTapAnimationAux); - float accelaration = GetFloatUniformValue( ACCELARATION_UNIFORM_NAME ); - mEffect.SetProperty( mEffect.GetPropertyIndex(ACCELARATION_UNIFORM_NAME), accelaration - int( accelaration) ); // Set the value as its fractional part + float accelaration = GetFloatUniformValue(ACCELARATION_UNIFORM_NAME); + mEffect.SetProperty(mEffect.GetPropertyIndex(ACCELARATION_UNIFORM_NAME), accelaration - int(accelaration)); // Set the value as its fractional part Animation shakeAnimation = Animation::New(duration); - shakeAnimation.AnimateBy( Property( mEffect, ACCELARATION_UNIFORM_NAME ), cycle, AlphaFunction::EASE_OUT ); - shakeAnimation.FinishedSignal().Connect( this, &SparkleEffectExample::OnShakeAnimationFinished ); + shakeAnimation.AnimateBy(Property(mEffect, ACCELARATION_UNIFORM_NAME), cycle, AlphaFunction::EASE_OUT); + shakeAnimation.FinishedSignal().Connect(this, &SparkleEffectExample::OnShakeAnimationFinished); shakeAnimation.Play(); mShaking = true; @@ -342,40 +339,40 @@ private: * Animate the particles to appear from center and spread all over around * @param[in] duration The duration for the animation */ - void PlayBreakAnimation( float duration ) + void PlayBreakAnimation(float duration) { - if( GetFloatUniformValue(BREAK_UNIFORM_NAME) > 0.f ) + if(GetFloatUniformValue(BREAK_UNIFORM_NAME) > 0.f) { return; } // Stop the fading / tap animation before the breaking - DestroyAnimation( mFadeAnimation); + DestroyAnimation(mFadeAnimation); mTapIndices.x = mTapIndices.y; - mEffect.SetProperty( mEffect.GetPropertyIndex( TAP_INDICES_UNIFORM_NAME ), mTapIndices ); - mEffect.SetProperty( mEffect.GetPropertyIndex( ACCELARATION_UNIFORM_NAME ), 0.f ); + mEffect.SetProperty(mEffect.GetPropertyIndex(TAP_INDICES_UNIFORM_NAME), mTapIndices); + mEffect.SetProperty(mEffect.GetPropertyIndex(ACCELARATION_UNIFORM_NAME), 0.f); // prepare the animation by setting the uniform to the required value - mEffect.SetProperty( mEffect.GetPropertyIndex( BREAK_UNIFORM_NAME ), 1.f ); - mMeshActor.SetProperty( Actor::Property::SCALE,0.01f); - mEffect.SetProperty( mEffect.GetPropertyIndex( "uScale" ), 0.01f ); - mMeshActor.SetProperty( Actor::Property::POSITION, Vector3( 0.f, 0.f, 1.f ) ); - - Animation breakAnimation = Animation::New(duration*1.5f); - breakAnimation.AnimateTo( Property(mMeshActor, Actor::Property::SCALE), Vector3(ACTOR_SCALE,ACTOR_SCALE,ACTOR_SCALE), EaseOutSquare); - breakAnimation.AnimateTo( Property( mEffect, "uScale" ), ACTOR_SCALE, EaseOutSquare); - breakAnimation.AnimateTo( Property(mMeshActor, Actor::Property::POSITION), ACTOR_POSITION, EaseOutSquare); - breakAnimation.FinishedSignal().Connect( this, &SparkleEffectExample::OnBreakAnimationFinished ); - - float timeUnit = duration/ (NUM_PARTICLE+1) /(NUM_PARTICLE+1) ; + mEffect.SetProperty(mEffect.GetPropertyIndex(BREAK_UNIFORM_NAME), 1.f); + mMeshActor.SetProperty(Actor::Property::SCALE, 0.01f); + mEffect.SetProperty(mEffect.GetPropertyIndex("uScale"), 0.01f); + mMeshActor.SetProperty(Actor::Property::POSITION, Vector3(0.f, 0.f, 1.f)); + + Animation breakAnimation = Animation::New(duration * 1.5f); + breakAnimation.AnimateTo(Property(mMeshActor, Actor::Property::SCALE), Vector3(ACTOR_SCALE, ACTOR_SCALE, ACTOR_SCALE), EaseOutSquare); + breakAnimation.AnimateTo(Property(mEffect, "uScale"), ACTOR_SCALE, EaseOutSquare); + breakAnimation.AnimateTo(Property(mMeshActor, Actor::Property::POSITION), ACTOR_POSITION, EaseOutSquare); + breakAnimation.FinishedSignal().Connect(this, &SparkleEffectExample::OnBreakAnimationFinished); + + float timeUnit = duration / (NUM_PARTICLE + 1) / (NUM_PARTICLE + 1); std::ostringstream oss; - for(unsigned int i = 0; i 0.f ) + if(GetFloatUniformValue(BREAK_UNIFORM_NAME) > 0.f) { return; } // start the opacity animation one particle after another gradually - float timeSlice = duration / (numParticle+1); - float fadeDuration = timeSlice>0.5f ? timeSlice : 0.5f; + float timeSlice = duration / (numParticle + 1); + float fadeDuration = timeSlice > 0.5f ? timeSlice : 0.5f; - Animation fadeAnimation= Animation::New(duration+fadeDuration*2.f); + Animation fadeAnimation = Animation::New(duration + fadeDuration * 2.f); std::ostringstream oss; - for(unsigned int i = startIndex; i=NUM_PARTICLE ) break; // out of bound + if(i >= NUM_PARTICLE) break; // out of bound oss.str(""); - oss<< OPACITY_UNIFORM_NAME<< i << "]"; - fadeAnimation.AnimateTo(Property( mEffect, oss.str()), targetValue, TimePeriod( timeSlice*i, fadeDuration*2.f )); + oss << OPACITY_UNIFORM_NAME << i << "]"; + fadeAnimation.AnimateTo(Property(mEffect, oss.str()), targetValue, TimePeriod(timeSlice * i, fadeDuration * 2.f)); } fadeAnimation.Play(); mFadeAnimation = fadeAnimation; - mFadeAnimation.FinishedSignal().Connect( this, &SparkleEffectExample::OnFadeAnimationFinished ); + mFadeAnimation.FinishedSignal().Connect(this, &SparkleEffectExample::OnFadeAnimationFinished); } /** @@ -421,44 +418,44 @@ private: * @param[in] duration The duration for the animation * @param[in] tapPoint The position of the tap point */ - void PlayTapAnimation(float duration, const Vector2& tapPoint ) + void PlayTapAnimation(float duration, const Vector2& tapPoint) { - if( mTapIndices.y > mTapIndices.x && mTapAnimation.GetCurrentProgress() < 0.2f) + if(mTapIndices.y > mTapIndices.x && mTapAnimation.GetCurrentProgress() < 0.2f) { return; } - Animation animation= Animation::New(duration); - int idx = int(mTapIndices.y)%MAXIMUM_ANIMATION_COUNT; + Animation animation = Animation::New(duration); + int idx = int(mTapIndices.y) % MAXIMUM_ANIMATION_COUNT; mTapIndices.y += 1.f; std::ostringstream oss; - oss<< TAP_OFFSET_UNIFORM_NAME<< idx << "]"; - mEffect.SetProperty( mEffect.GetPropertyIndex( oss.str() ), 0.f); - animation.AnimateTo( Property( mEffect, oss.str() ), 0.75f, CustomBounce); + oss << TAP_OFFSET_UNIFORM_NAME << idx << "]"; + mEffect.SetProperty(mEffect.GetPropertyIndex(oss.str()), 0.f); + animation.AnimateTo(Property(mEffect, oss.str()), 0.75f, CustomBounce); oss.str(""); - oss<< TAP_POINT_UNIFORM_NAME<< idx << "]"; - mEffect.SetProperty( mEffect.GetPropertyIndex( oss.str() ), tapPoint/ACTOR_SCALE); + oss << TAP_POINT_UNIFORM_NAME << idx << "]"; + mEffect.SetProperty(mEffect.GetPropertyIndex(oss.str()), tapPoint / ACTOR_SCALE); - mEffect.SetProperty( mEffect.GetPropertyIndex( TAP_INDICES_UNIFORM_NAME ), mTapIndices); + mEffect.SetProperty(mEffect.GetPropertyIndex(TAP_INDICES_UNIFORM_NAME), mTapIndices); if(!mShaking) { - mTapAnimationAux = Animation::New(duration*0.2f); - mTapAnimationAux.AnimateBy( Property( mEffect, ACCELARATION_UNIFORM_NAME ), 0.15f, AlphaFunction::EASE_IN_OUT ); + mTapAnimationAux = Animation::New(duration * 0.2f); + mTapAnimationAux.AnimateBy(Property(mEffect, ACCELARATION_UNIFORM_NAME), 0.15f, AlphaFunction::EASE_IN_OUT); mTapAnimationAux.Play(); } animation.Play(); - mTapAnimationIndexPair[animation] = static_cast(mTapIndices.y -1.f); - animation.FinishedSignal().Connect( this, &SparkleEffectExample::OnTapAnimationFinished ); + mTapAnimationIndexPair[animation] = static_cast(mTapIndices.y - 1.f); + animation.FinishedSignal().Connect(this, &SparkleEffectExample::OnTapAnimationFinished); mTapAnimation = animation; } /** * Callback of the animation finished signal */ - void OnShakeAnimationFinished( Animation& animation) + void OnShakeAnimationFinished(Animation& animation) { mShaking = false; } @@ -466,7 +463,7 @@ private: /** * Callback of the animation finished signal */ - void OnFadeAnimationFinished( Animation& animation) + void OnFadeAnimationFinished(Animation& animation) { mFadeAnimation.Clear(); mFadeAnimation.Reset(); @@ -475,31 +472,31 @@ private: /** * Callback of the animation finished signal */ - void OnBreakAnimationFinished( Animation& animation) + void OnBreakAnimationFinished(Animation& animation) { - mEffect.SetProperty( mEffect.GetPropertyIndex( BREAK_UNIFORM_NAME ), 0.f ); + mEffect.SetProperty(mEffect.GetPropertyIndex(BREAK_UNIFORM_NAME), 0.f); } /** * Callback of the animation finished signal */ - void OnTapAnimationFinished( Animation& animation ) + void OnTapAnimationFinished(Animation& animation) { - if( mTapAnimationIndexPair[animation] == static_cast(mTapIndices.x) ) + if(mTapAnimationIndexPair[animation] == static_cast(mTapIndices.x)) { mTapIndices.x += 1.f; - if( mTapIndices.x >= mTapIndices.y ) + if(mTapIndices.x >= mTapIndices.y) { mTapIndices = Vector2::ZERO; } - mEffect.SetProperty( mEffect.GetPropertyIndex( TAP_INDICES_UNIFORM_NAME ), mTapIndices); + mEffect.SetProperty(mEffect.GetPropertyIndex(TAP_INDICES_UNIFORM_NAME), mTapIndices); } - mTapAnimationIndexPair.erase( animation ); - if( mTapAnimationIndexPair.size() < 1 && mTapIndices != Vector2::ZERO) + mTapAnimationIndexPair.erase(animation); + if(mTapAnimationIndexPair.size() < 1 && mTapIndices != Vector2::ZERO) { mTapIndices = Vector2::ZERO; - mEffect.SetProperty( mEffect.GetPropertyIndex( TAP_INDICES_UNIFORM_NAME ), mTapIndices); + mEffect.SetProperty(mEffect.GetPropertyIndex(TAP_INDICES_UNIFORM_NAME), mTapIndices); } animation.Clear(); @@ -511,7 +508,7 @@ private: * @param[in] uniformName The uniform * @return The float value */ - float GetFloatUniformValue( const std::string& uniformName ) + float GetFloatUniformValue(const std::string& uniformName) { float value; mEffect.GetProperty(mEffect.GetPropertyIndex(uniformName)).Get(value); @@ -521,9 +518,9 @@ private: /** * Terminate the given animation */ - void DestroyAnimation( Animation& animation ) + void DestroyAnimation(Animation& animation) { - if( animation ) + if(animation) { animation.Clear(); animation.Reset(); @@ -531,30 +528,29 @@ private: } private: - - Application& mApplication; - Shader mEffect; - ImageView mCircleBackground; - Actor mMeshActor; + Application& mApplication; + Shader mEffect; + ImageView mCircleBackground; + Actor mMeshActor; PanGestureDetector mPanGestureDetector; TapGestureDetector mTapDetector; - Animation mFadeAnimation; - Animation mTapAnimation; - Animation mTapAnimationAux; + Animation mFadeAnimation; + Animation mTapAnimation; + Animation mTapAnimationAux; - Vector2 mTapIndices; - unsigned int mAnimationIndex; - bool mShaking; + Vector2 mTapIndices; + unsigned int mAnimationIndex; + bool mShaking; - std::map< Animation, int > mTapAnimationIndexPair; + std::map mTapAnimationIndexPair; }; -int DALI_EXPORT_API main( int argc, char **argv ) +int DALI_EXPORT_API main(int argc, char** argv) { - Application application = Application::New( &argc, &argv ); - SparkleEffectExample theApp( application ); + Application application = Application::New(&argc, &argv); + SparkleEffectExample theApp(application); application.MainLoop(); return 0; }