Search in sources :

Example 1 with Sequential

use of su.levenetc.android.textsurface.animations.Sequential in project TextSurface by elevenetc.

the class CookieThumperSample method play.

public static void play(TextSurface textSurface, AssetManager assetManager) {
    final Typeface robotoBlack = Typeface.createFromAsset(assetManager, "fonts/Roboto-Black.ttf");
    Paint paint = new Paint();
    paint.setAntiAlias(true);
    paint.setTypeface(robotoBlack);
    Text textDaai = TextBuilder.create("Daai").setPaint(paint).setSize(64).setAlpha(0).setColor(Color.WHITE).setPosition(Align.SURFACE_CENTER).build();
    Text textBraAnies = TextBuilder.create("bra Anies").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF, textDaai).build();
    Text textFokkenGamBra = TextBuilder.create(" hy's n fokken gam bra.").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.RIGHT_OF, textBraAnies).build();
    Text textHaai = TextBuilder.create("Haai!!").setPaint(paint).setSize(74).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF, textFokkenGamBra).build();
    Text textDaaiAnies = TextBuilder.create("Daai Anies").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.WHITE).setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textHaai).build();
    Text texThyLamInnie = TextBuilder.create(" hy lam innie mang ja.").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.WHITE).setPosition(Align.RIGHT_OF, textDaaiAnies).build();
    Text textThrowDamn = TextBuilder.create("Throw damn").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF | Align.CENTER_OF, texThyLamInnie).build();
    Text textDevilishGang = TextBuilder.create("devilish gang").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textThrowDamn).build();
    Text textSignsInTheAir = TextBuilder.create("signs in the air.").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textDevilishGang).build();
    textSurface.play(new Sequential(ShapeReveal.create(textDaai, 750, SideCut.show(Side.LEFT), false), new Parallel(ShapeReveal.create(textDaai, 600, SideCut.hide(Side.LEFT), false), new Sequential(Delay.duration(300), ShapeReveal.create(textDaai, 600, SideCut.show(Side.LEFT), false))), new Parallel(new TransSurface(500, textBraAnies, Pivot.CENTER), ShapeReveal.create(textBraAnies, 1300, SideCut.show(Side.LEFT), false)), Delay.duration(500), new Parallel(new TransSurface(750, textFokkenGamBra, Pivot.CENTER), Slide.showFrom(Side.LEFT, textFokkenGamBra, 750), ChangeColor.to(textFokkenGamBra, 750, Color.WHITE)), Delay.duration(500), new Parallel(TransSurface.toCenter(textHaai, 500), Rotate3D.showFromSide(textHaai, 750, Pivot.TOP)), new Parallel(TransSurface.toCenter(textDaaiAnies, 500), Slide.showFrom(Side.TOP, textDaaiAnies, 500)), new Parallel(TransSurface.toCenter(texThyLamInnie, 750), Slide.showFrom(Side.LEFT, texThyLamInnie, 500)), Delay.duration(500), new Parallel(new TransSurface(1500, textSignsInTheAir, Pivot.CENTER), new Sequential(new Sequential(ShapeReveal.create(textThrowDamn, 500, Circle.show(Side.CENTER, Direction.OUT), false)), new Sequential(ShapeReveal.create(textDevilishGang, 500, Circle.show(Side.CENTER, Direction.OUT), false)), new Sequential(ShapeReveal.create(textSignsInTheAir, 500, Circle.show(Side.CENTER, Direction.OUT), false)))), Delay.duration(200), new Parallel(ShapeReveal.create(textThrowDamn, 1500, SideCut.hide(Side.LEFT), true), new Sequential(Delay.duration(250), ShapeReveal.create(textDevilishGang, 1500, SideCut.hide(Side.LEFT), true)), new Sequential(Delay.duration(500), ShapeReveal.create(textSignsInTheAir, 1500, SideCut.hide(Side.LEFT), true)), Alpha.hide(texThyLamInnie, 1500), Alpha.hide(textDaaiAnies, 1500))));
}
Also used : TransSurface(su.levenetc.android.textsurface.animations.TransSurface) Sequential(su.levenetc.android.textsurface.animations.Sequential) Typeface(android.graphics.Typeface) Text(su.levenetc.android.textsurface.Text) Paint(android.graphics.Paint) Parallel(su.levenetc.android.textsurface.animations.Parallel)

Example 2 with Sequential

use of su.levenetc.android.textsurface.animations.Sequential in project TextSurface by elevenetc.

the class ScaleTextSample method run.

public static void run(TextSurface textSurface) {
    //		Text textA = TextBuilder.create("oat cake")
    ////				.setScale(2.0f, Pivot.RIGHT)
    //				.build();
    //
    //		textSurface.play(TYPE.SEQUENTIAL,
    //				//Just.show(textA)
    //				new Scale(textA, 1000, 0.1f, 1.5f, Pivot.RIGHT)
    //		);
    Text textA = TextBuilder.create("textA").build();
    Text textB = TextBuilder.create("textB").setPosition(Align.LEFT_OF, textA).build();
    Text textC = TextBuilder.create("textC").setPosition(Align.RIGHT_OF, textA).build();
    Text textD = TextBuilder.create("textD").setPosition(Align.LEFT_OF, textB).build();
    Text textE = TextBuilder.create("textE").setPosition(Align.RIGHT_OF, textC).build();
    textSurface.play(TYPE.PARALLEL, Just.show(textA, textB), new Sequential(new Scale(textA, 1000, 1, 2, Pivot.CENTER), new Scale(textA, 1000, 2, 1, Pivot.CENTER)));
}
Also used : Sequential(su.levenetc.android.textsurface.animations.Sequential) Text(su.levenetc.android.textsurface.Text) Scale(su.levenetc.android.textsurface.animations.Scale)

Aggregations

Text (su.levenetc.android.textsurface.Text)2 Sequential (su.levenetc.android.textsurface.animations.Sequential)2 Paint (android.graphics.Paint)1 Typeface (android.graphics.Typeface)1 Parallel (su.levenetc.android.textsurface.animations.Parallel)1 Scale (su.levenetc.android.textsurface.animations.Scale)1 TransSurface (su.levenetc.android.textsurface.animations.TransSurface)1