Example #1
0
define(function(require,exports,module){
	var LA = require("mod/sa/lightanimation");

	var la1 = LA.newInstance("#w1", "transition::opacity:1!0.5s ease>transformOrigin:50% 50%!;translate3d:150px,200px,0px!1s ease 2s;rotate:60deg!");

	la1.play();

	var la2 = LA.newInstance("#w2", "animation::rotate:!1s linear 1s infinite normal");
	la2.addKeyFrame("rotate", "0%", {
		rotate:"0deg",
		scale:"1,1"
	});
	la2.addKeyFrame("rotate", "50%", {
		rotate:"180deg",
		scale:"0.5,0.5"
	});

	la2.addKeyFrame("rotate", "100%", {
		rotate:"360deg",
		scale:"1,1"
	});

	la2.printKeyFrames();

	la2.play();

	var la3 = LA.newInstance("#w3", "class::opacity animated fadeInDownBig!true");
	la3.play();

});
Example #2
0
        createAnimate : function(effect){
            var la = LA.newInstance(this.widget, effect);

            la.set("complete", {
                callback : function(target){
                    this.app.exec("widgetcomplete", [this.module, this.widget]);
                },
                context : this
            });

            la.set("play", {
                callback : function(target){
                    this.app.exec("widgetplay", [this.module, this.widget]);
                },
                context : this
            });

            la.set("reset", {
                callback : function(target){
                    this.app.exec("widgetreset", [this.module, this.widget]);
                },
                context : this
            });

            la.set("playing", {
                callback : function(target, index){
                    this.app.exec("widgetplaying", [this.module, this.widget, index]);
                },
                context : this
            });

            return la;
        },
Example #3
0
        create : function(){
            this.photos = $("#" + this.playerId + " > *");
            this.size = this.photos.length;
            this.fadeinAnimation = [];

            this.count = 0;
            this.ready = false;

            var fadein = null;
            var photo = null;
            var interaction = null;

            fadein = this.player.attr("data-in");

            if(fadein){
                this.playerAnimation = LA.newInstance(this.player, fadein);
                this.playerAnimation.set("complete", {
                    callback: function(target){
                        this.playPhotos();
                    },
                    context: this
                });
            }

            for(var i = 0; i < this.size; i++){
                photo = $(this.photos[i]);
                fadein = photo.attr("data-in");
                interaction = photo.attr("data-interaction") || "1";

                if(fadein){
                    photo.attr("data-photoIndex", this.fadeinAnimation.length);
                    this.fadeinAnimation.push(LA.newInstance(photo, fadein));
                }

                if("1" == interaction){
                    this.bind(photo);
                }
            }
        },
Example #4
0
        create : function(){
            var ins = this;

            var aniSource = ins.albums.attr("data-in");

            if(aniSource){
                var ani = LA.newInstance(ins.albums, aniSource);

                ani.play();
            }

            ins.albums.attr("data-relative", ins.relative);

            AlbumsCache[ins.id] = ins;

            Util.setActionHook(ins.albums);
            Util.injectAction(Action);
        },
Example #5
0
 setTimeout(function(){
     LA.newInstance(photos, aniSource).play();
 }, 60);