73 lines
2.2 KiB
JavaScript
73 lines
2.2 KiB
JavaScript
(function (PIXI, lib) {
|
|
|
|
var MovieClip = PIXI.animate.MovieClip;
|
|
var Container = PIXI.Container;
|
|
var Sprite = PIXI.Sprite;
|
|
var fromFrame = PIXI.Texture.fromFrame;
|
|
|
|
lib.icon = Container.extend(function () {
|
|
Container.call(this);
|
|
|
|
});
|
|
|
|
lib.border = Container.extend(function () {
|
|
Container.call(this);
|
|
var instance1 = new Sprite(fromFrame("ActionButtonBorder1"))
|
|
.setTransform(-132.05, -132.05);
|
|
this.addChild(instance1);
|
|
});
|
|
|
|
lib.gradient = Container.extend(function () {
|
|
Container.call(this);
|
|
var instance1 = new Sprite(fromFrame("ActionButtonGradient1"))
|
|
.setTransform(-132.05, -132.05);
|
|
this.addChild(instance1);
|
|
});
|
|
|
|
lib.background = Container.extend(function () {
|
|
Container.call(this);
|
|
var instance1 = new Sprite(fromFrame("ActionButtonBackground1"))
|
|
.setTransform(-132.05, -132.05);
|
|
this.addChild(instance1);
|
|
});
|
|
|
|
lib.content = Container.extend(function () {
|
|
Container.call(this);
|
|
var instance4 = new lib.background();
|
|
this[instance4.name = "background"] = instance4;
|
|
var instance3 = new lib.gradient();
|
|
this[instance3.name = "gradient"] = instance3;
|
|
var instance2 = new lib.border();
|
|
this[instance2.name = "border"] = instance2;
|
|
var instance1 = new lib.icon();
|
|
this[instance1.name = "icon"] = instance1;
|
|
this.addChild(instance4, instance3, instance2, instance1);
|
|
});
|
|
|
|
lib.actionButton = MovieClip.extend(function () {
|
|
MovieClip.call(this, {
|
|
duration: 1,
|
|
framerate: 30
|
|
});
|
|
var instance1 = new lib.content()
|
|
.setTransform(132, 132);
|
|
this[instance1.name = "content"] = instance1;
|
|
this.addChild(instance1);
|
|
});
|
|
|
|
lib.actionButton.assets = {
|
|
"actionButton_atlas_1": "images/actionButton_atlas_1.json"
|
|
};
|
|
})(PIXI, lib = lib || {});
|
|
var lib;
|
|
if (typeof module !== 'undefined' && module.exports) {
|
|
module.exports = {
|
|
stage: lib.actionButton,
|
|
background: 0x0,
|
|
width: 264,
|
|
height: 264,
|
|
framerate: 30,
|
|
totalFrames: 1,
|
|
library: lib
|
|
};
|
|
} |