use of su.levenetc.android.textsurface.animations.AnimationsSet in project TextSurface by elevenetc.
the class Rotation3DSample method play.
public static void play(TextSurface textSurface) {
Text textA = TextBuilder.create("How are you?").setPosition(Align.SURFACE_CENTER).build();
Text textB = TextBuilder.create("I'm fine! And you?").setPosition(Align.SURFACE_CENTER, textA).build();
Text textC = TextBuilder.create("Haaay!").setPosition(Align.SURFACE_CENTER, textB).build();
int duration = 2750;
textSurface.play(TYPE.SEQUENTIAL, new AnimationsSet(TYPE.SEQUENTIAL, Rotate3D.showFromCenter(textA, duration, Direction.CLOCK, Axis.X), Rotate3D.hideFromCenter(textA, duration, Direction.CLOCK, Axis.Y)), new AnimationsSet(TYPE.SEQUENTIAL, Rotate3D.showFromSide(textB, duration, Pivot.LEFT), Rotate3D.hideFromSide(textB, duration, Pivot.RIGHT)), new AnimationsSet(TYPE.SEQUENTIAL, Rotate3D.showFromSide(textC, duration, Pivot.TOP), Rotate3D.hideFromSide(textC, duration, Pivot.BOTTOM)));
}
use of su.levenetc.android.textsurface.animations.AnimationsSet in project TextSurface by elevenetc.
the class ShapeRevealLoopSample method play.
public static void play(TextSurface textSurface) {
Text textA = TextBuilder.create("Now why you loer en kyk gelyk?").setPosition(Align.SURFACE_CENTER).build();
Text textB = TextBuilder.create("Is ek miskien van goud gemake?").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textA).build();
Text textC = TextBuilder.create("You want to fight, you come tonight.").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textB).build();
Text textD = TextBuilder.create("Ek moer jou sleg! So jy hardloop weg.").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textC).build();
final int flash = 1500;
textSurface.play(new Loop(Rotate3D.showFromCenter(textA, 500, Direction.CLOCK, Axis.X), new AnimationsSet(TYPE.PARALLEL, ShapeReveal.create(textA, flash, SideCut.hide(Side.LEFT), false), new AnimationsSet(TYPE.SEQUENTIAL, Delay.duration(flash / 4), ShapeReveal.create(textA, flash, SideCut.show(Side.LEFT), false))), new AnimationsSet(TYPE.PARALLEL, Rotate3D.showFromSide(textB, 500, Pivot.TOP), new TransSurface(500, textB, Pivot.CENTER)), Delay.duration(500), new AnimationsSet(TYPE.PARALLEL, Slide.showFrom(Side.TOP, textC, 500), new TransSurface(1000, textC, Pivot.CENTER)), Delay.duration(500), new AnimationsSet(TYPE.PARALLEL, ShapeReveal.create(textD, 500, Circle.show(Side.CENTER, Direction.OUT), false), new TransSurface(1500, textD, Pivot.CENTER)), Delay.duration(500), new AnimationsSet(TYPE.PARALLEL, new AnimationsSet(TYPE.PARALLEL, Alpha.hide(textD, 700), ShapeReveal.create(textD, 1000, SideCut.hide(Side.LEFT), true)), new AnimationsSet(TYPE.SEQUENTIAL, Delay.duration(500), new AnimationsSet(TYPE.PARALLEL, Alpha.hide(textC, 700), ShapeReveal.create(textC, 1000, SideCut.hide(Side.LEFT), true))), new AnimationsSet(TYPE.SEQUENTIAL, Delay.duration(1000), new AnimationsSet(TYPE.PARALLEL, Alpha.hide(textB, 700), ShapeReveal.create(textB, 1000, SideCut.hide(Side.LEFT), true))), new AnimationsSet(TYPE.SEQUENTIAL, Delay.duration(1500), new AnimationsSet(TYPE.PARALLEL, Alpha.hide(textA, 700), ShapeReveal.create(textA, 1000, SideCut.hide(Side.LEFT), true))), new TransSurface(4000, textA, Pivot.CENTER))));
}
use of su.levenetc.android.textsurface.animations.AnimationsSet in project TextSurface by elevenetc.
the class SlideSample method play.
public static void play(TextSurface textSurface) {
Text textA = TextBuilder.create(" How are you?").build();
Text textB = TextBuilder.create("I'm fine! ").setPosition(Align.LEFT_OF, textA).build();
Text textC = TextBuilder.create("Are you sure?").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textB).build();
Text textD = TextBuilder.create("Totally!").setPadding(10, 10, 10, 10).setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textC).build();
int duration = 1250;
textSurface.play(TYPE.SEQUENTIAL, new AnimationsSet(TYPE.PARALLEL, new AnimationsSet(TYPE.SEQUENTIAL, new AnimationsSet(TYPE.PARALLEL, Slide.showFrom(Side.LEFT, textA, duration), Slide.showFrom(Side.RIGHT, textB, duration)), Slide.showFrom(Side.TOP, textC, duration), Slide.showFrom(Side.BOTTOM, textD, duration)), new TransSurface(duration * 3, textD, Pivot.CENTER)), new AnimationsSet(TYPE.PARALLEL, new AnimationsSet(TYPE.SEQUENTIAL, new AnimationsSet(TYPE.PARALLEL, Slide.hideFrom(Side.LEFT, textD, duration), Slide.hideFrom(Side.RIGHT, textC, duration)), Slide.hideFrom(Side.TOP, textB, duration), Slide.hideFrom(Side.BOTTOM, textA, duration)), new TransSurface(duration * 3, textA, Pivot.CENTER)));
}
use of su.levenetc.android.textsurface.animations.AnimationsSet in project TextSurface by elevenetc.
the class ShapeRevealSample method play.
public static void play(TextSurface textSurface) {
Text textA = TextBuilder.create("Now why you loer en kyk gelyk?").setPosition(Align.SURFACE_CENTER).build();
Text textB = TextBuilder.create("Is ek miskien van goud gemake?").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textA).build();
Text textC = TextBuilder.create("You want to fight, you come tonight.").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textB).build();
Text textD = TextBuilder.create("Ek moer jou sleg! So jy hardloop weg.").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textC).build();
final int flash = 1500;
textSurface.play(TYPE.SEQUENTIAL, Rotate3D.showFromCenter(textA, 500, Direction.CLOCK, Axis.X), new AnimationsSet(TYPE.PARALLEL, ShapeReveal.create(textA, flash, SideCut.hide(Side.LEFT), false), new AnimationsSet(TYPE.SEQUENTIAL, Delay.duration(flash / 4), ShapeReveal.create(textA, flash, SideCut.show(Side.LEFT), false))), new AnimationsSet(TYPE.PARALLEL, Rotate3D.showFromSide(textB, 500, Pivot.TOP), new TransSurface(500, textB, Pivot.CENTER)), Delay.duration(500), new AnimationsSet(TYPE.PARALLEL, Slide.showFrom(Side.TOP, textC, 500), new TransSurface(1000, textC, Pivot.CENTER)), Delay.duration(500), new AnimationsSet(TYPE.PARALLEL, ShapeReveal.create(textD, 500, Circle.show(Side.CENTER, Direction.OUT), false), new TransSurface(1500, textD, Pivot.CENTER)), Delay.duration(500), new AnimationsSet(TYPE.PARALLEL, new AnimationsSet(TYPE.PARALLEL, Alpha.hide(textD, 700), ShapeReveal.create(textD, 1000, SideCut.hide(Side.LEFT), true)), new AnimationsSet(TYPE.SEQUENTIAL, Delay.duration(500), new AnimationsSet(TYPE.PARALLEL, Alpha.hide(textC, 700), ShapeReveal.create(textC, 1000, SideCut.hide(Side.LEFT), true))), new AnimationsSet(TYPE.SEQUENTIAL, Delay.duration(1000), new AnimationsSet(TYPE.PARALLEL, Alpha.hide(textB, 700), ShapeReveal.create(textB, 1000, SideCut.hide(Side.LEFT), true))), new AnimationsSet(TYPE.SEQUENTIAL, Delay.duration(1500), new AnimationsSet(TYPE.PARALLEL, Alpha.hide(textA, 700), ShapeReveal.create(textA, 1000, SideCut.hide(Side.LEFT), true))), new TransSurface(4000, textA, Pivot.CENTER)));
}
use of su.levenetc.android.textsurface.animations.AnimationsSet in project TextSurface by elevenetc.
the class SurfaceScaleSample method play.
public static void play(TextSurface textSurface) {
Text textA = TextBuilder.create("How are you?").setPosition(Align.SURFACE_CENTER).build();
Text textB = TextBuilder.create("Would you mind?").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textA).build();
Text textC = TextBuilder.create("Yes!").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textB).build();
textSurface.play(TYPE.SEQUENTIAL, Alpha.show(textA, 500), new AnimationsSet(TYPE.PARALLEL, new AnimationsSet(TYPE.PARALLEL, Alpha.show(textB, 500), Alpha.hide(textA, 500)), new ScaleSurface(500, textB, Fit.WIDTH)), Delay.duration(1000), new AnimationsSet(TYPE.PARALLEL, new AnimationsSet(TYPE.PARALLEL, Alpha.show(textC, 500), Alpha.hide(textB, 500)), new ScaleSurface(500, textC, Fit.WIDTH)));
}
Aggregations