UNIFORM vec2 uTapPoint[MAXIMUM_ANIMATION_COUNT];
UNIFORM float uAcceleration;
UNIFORM float uRadius;
-UNIFORM float uScale;
+UNIFORM float uEffectScale;
UNIFORM float uBreak;
};
position = mix( position, vec2( 250.0,250.0 ),uBreak*(1.0-uOpacity[int(idx)]) ) ;
// vertex position on the mesh: (sign(aTexCoord.x), sign(aTexCoord.y))*PARTICLE_HALF_SIZE
- gl_Position = uMvpMatrix * vec4( position.x+sign(aTexCoord.x)*PARTICLE_HALF_SIZE/uScale,
- position.y+sign(aTexCoord.y)*PARTICLE_HALF_SIZE/uScale,
+ gl_Position = uMvpMatrix * vec4( position.x+sign(aTexCoord.x)*PARTICLE_HALF_SIZE/uEffectScale,
+ position.y+sign(aTexCoord.y)*PARTICLE_HALF_SIZE/uEffectScale,
0.0, 1.0 );
// we store the color index inside texCoord attribute
// 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);
+ mEffect.SetProperty(mEffect.GetPropertyIndex("uEffectScale"), 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(mEffect, "uEffectScale"), ACTOR_SCALE, EaseOutSquare);
breakAnimation.AnimateTo(Property(mMeshActor, Actor::Property::POSITION), ACTOR_POSITION, EaseOutSquare);
breakAnimation.FinishedSignal().Connect(this, &SparkleEffectExample::OnBreakAnimationFinished);
handle.RegisterProperty(oss.str(), PARTICLE_COLORS[i].RGB);
}
handle.RegisterProperty("uRadius", 250.f);
- handle.RegisterProperty("uScale", ACTOR_SCALE);
+ handle.RegisterProperty("uEffectScale", ACTOR_SCALE);
// set the initial uniform values