效果 : 消除字母 当前位置出现爆炸效果 这里使用到了AnimatedSprite 动画 

Members

An AnimatedSprite is a simple way to display an animation depicted by a list of textures.
let alienImages = ["image_sequence_01.png","image_sequence_02.png","image_sequence_03.png","image_sequence_04.png"];
let textureArray = []; for (let i=0; i < 4; i++)
{
let texture = PIXI.Texture.fromImage(alienImages[i]);
textureArray.push(texture);
}; let mc = new PIXI.AnimatedSprite(textureArray);

mc 对象加载了图片序列。

1、alpha 

图片透明度(0 - 1)

2、anchor 

   The anchor sets the origin point of the texture. The default is 0,0 this means the texture's origin is the top left Setting the anchor to 0.5,0.5 means the texture's origin is centered Setting the anchor to 1,1 would mean the texture's origin point will be the bottom right corner

3、animationSpeed

默认值:1

4、buttonMode

If enabled, the mouse cursor use the pointer behavior when hovered over the displayObject if it is interactive Setting this changes the 'cursor' property to 'pointer'.

const sprite = new PIXI.Sprite(texture);
sprite.interactive = true;
sprite.buttonMode = true;

5、loop

Whether or not the animate sprite repeats after playing.

Default Value: true

6、onComplete  函数

Function to call when a AnimatedSprite finishes playing

 7、onFrameChange

Function to call when a AnimatedSprite changes which texture is being rendered

8、destroy 

Stops the AnimatedSprite and destroys it

9、gotoAndPlay

Goes to a specific frame and begins playing the AnimatedSprite

10、gotoAndStop

Stops the AnimatedSprite and goes to a specific frame

11、play

Plays the AnimatedSprite

12、stop

Stops the AnimatedSprite

更多查看

 ----------------------------------------------示例介绍-------------------------------------------------

1、字母下落获取坐标位置

2、字母消除位置,指定爆炸动画,执行完成调用    onComplete  对该动画销毁或隐藏操作。

 

PIXI AnimatedSprite 及打字爆炸动画(5)的更多相关文章

  1. 基于HTML5 SVG炫酷文字爆炸特效

    这是一款使用html5 svg.css3和js制作的炫酷文字爆炸特效.该文字特效用SVG path属性将文字路径切割为很多小块,然后使用css3和js在鼠标滑过文字时制作文字爆炸分裂的炫酷效果. 在线 ...

  2. [一位菜鸟的COCOS-2D编程之路]打飞机中机种敌机和战机损毁时的爆炸效果

    1.第一步,添加爆炸动画 //添加玩家飞机飞行动画 id _playerFlyAction; id _playerBlowupAnimation; //战机爆炸动画 id _enemyBlowupAn ...

  3. Android制作粒子爆炸特效

    简介 最近在闲逛的时候,发现了一款粒子爆炸特效的控件,觉得比较有意思,效果也不错. 但是代码不好扩展,也就是说如果要提供不同的爆炸效果,需要修改的地方比较多.于是我对源代码进行了一些重构,将爆炸流程和 ...

  4. 11个超震撼的HTML5和纯CSS3动画源码

    1.jQuery多功能手风琴个人信息菜单面板 这是一款基于jQuery的手风琴个人信息菜单面板,每一个菜单项展开后可以自定义布局,因此可以为每一个菜单项实现多功能.类似这样的多功能菜单还有jQuery ...

  5. 10款基于jquery的web前端动画特效

    1.jQuery横向手风琴图片切换动画 之前我们为大家分享过很多款基于jQuery和CSS3的手风琴菜单和手风琴焦点图插件,比如CSS3响应式垂直手风琴菜单和jQuery横向手风琴图片展示插件.今天要 ...

  6. 16个富有创意的HTML5 Canvas动画特效集合

    HTML5技术正在不断的发展和更新,越来越多的开发者也正在加入HTML5阵营,甚至在移动开发上HTML5的地位也是越来越重要了.HTML5中的大部分动画都是通过Canvas实现,因为Canvas就像一 ...

  7. 16个非常有趣的HTML5 Canvas动画特效集合

    HTML5技术正在不断的发展和更新,越来越多的开发者也正在加入HTML5阵营,甚至在移动开发上HTML5的地位也是越来越重要了.HTML5中的大部分动画都是通过Canvas实现,因为Canvas就像一 ...

  8. 游戏编程算法与技巧 Game Programming Algorithms and Techniques (Sanjay Madhav 著)

    http://gamealgorithms.net 第1章 游戏编程概述 (已看) 第2章 2D图形 (已看) 第3章 游戏中的线性代数 (已看) 第4章 3D图形 (已看) 第5章 游戏输入 (已看 ...

  9. 太阳系Demo(openGL)

    这个是8年前写的demo,提交的一份作业,按照提出的需求点,以最快和最简单的方式完成功能,因此代码比较简单. 1)截图 2) 功能点描述: 1.公转,自传 2.基础的摄像机运动 3.正视和顶视 4.天 ...

随机推荐

  1. Python基础-5

    目录 time &datetime模块 random os sys shutil json & picle shelve xml处理 yaml处理 hashlib re正则表达式 模块 ...

  2. portableDFS-可便携的分布式文件系统

    PPT下载(因附件大小有限制,删除了PPT中的隐藏页,如需完整版本,请转到it168文库下载):portableDFS-可便携的分布式文件系统.ppt 完整版本请上这里下载:http://wenku. ...

  3. 升级Ubuntu 12.04下的gcc到4.7

    我们知道C++11标准开始支持类内初始化(in-class initializer),Qt creator编译出现error,不支持这个特性,原因在于,Ubuntu12.04默认的是使用gcc4.6, ...

  4. shell 字符串中定位字符位置 获取字符位置

    linux shell 字符串操作(长度,查找,替换)详解 该博文中描述的如下两个字符串操作, ${string:position} #在$string中, 从位置$position开始提取子串 ${ ...

  5. jQuery拾忆

    用jQuery操作select元素 http://www.jb51.net/article/23648.htm 表单中如果用disabled属性,则提交时不会提交该数据,尽量使用readonly属性 ...

  6. Task ContinueWith

    前正无生意,且记Task.ContinueWith之用法. using System; using System.Collections.Generic; using System.Diagnosti ...

  7. Xcode9新功能

    1.折叠代码 局部折叠(折叠一个函数):Command+Option+Left/Right 全局折叠(折叠当前文件下的全部函数): Shift+Command+Option+Left/Right 折叠 ...

  8. day02.3-元组内置方法

    元组——tuple的定义:test = (11,"alex",(22,33),[44,55],True) 特点:1. 元组是可迭代对象 2. 元组中元素是有序的,但其不可修改,也不 ...

  9. Spring Boot多数据源

    我们在开发过程中可能需要用到多个数据源,我们有一个项目(MySQL)就是和别的项目(SQL Server)混合使用了.其中SQL Server是别的公司开发的,有些基本数据需要从他们平台进行调取,那么 ...

  10. 【bzoj4806~bzoj4809】 象棋四连发 DP-高精度-匈牙利算法-dfs

    都是经典题了吧..我好无聊.. 4806 4806-1801是双倍经验..DP方程看代码吧.. /* http://www.cnblogs.com/karl07/ */ #include <cs ...