当前位置:网站首页>pixi.js 爆炸效果
pixi.js 爆炸效果
2022-06-09 15:11:00 【weixin_44387746】
// 爆炸效果
let bomb = 'https://img.alicdn.com/imgextra/i2/39767794/O1CN013TFOm227Rhc5a7cza_!!39767794.png'
PIXI.loader.add(bomb).load(() => {
let base = PIXI.utils.TextureCache[bomb]
let arr = []
console.log(resourceCopy.frames[1].frame.x)
for (var i = 0; i < 26; i++) {
let texture = new PIXI.Texture(base)
texture.frame = new PIXI.Rectangle(resourceCopy.frames[i+1].frame.x,resourceCopy.frames[i+1].frame.y,resourceCopy.frames[i+1].frame.w,resourceCopy.frames[i+1].frame.h)
arr.push(texture)
}
let pixi = new PIXI.extras.AnimatedSprite(arr)
pixi.animationSpeed = 1
application.stage.addChild(pixi)
pixi.play()
})
边栏推荐
- Details on how Tencent can reduce the live broadcast delay by more than 90%
- 【Typecho博客小白搭建教程】你离拥有自己的blog只差我
- Linux runs shengxunwei online customer service system: implementation method of supporting SQL server and MySQL at the same time
- JS实现JSON数组合并和去重
- 详解Seaborn,看这一篇就够了
- 【实战】Redis Cluster(上)-环境搭建
- [云原生]Kubernetes可视化界面WEBUI Kubernetes Dashboard
- 数据库中错误1062,报错
- Hongmeng porting i.mx6ull (VI) kconfig_ GCC_ Mkefile
- Implementing MySQL master-slave with docker compose
猜你喜欢
随机推荐
松下高管:苹果CarPlay不是威胁 而是对自家产品的补充
Geoffrey Hinton最新访谈:不出五年,我们就会破解大脑的运作机制,但不是通过反向传播
不要假装怀念Kindle
从版权到资产 NFT有多不安全?
百度一程序员被判:不满他人接手项目、彰显自己作用、多次对数据库进行删改,犯破坏计算机信息系统罪
QT MSVC compiler Chinese problem solving, Chinese garbled and unable to compile normally
微信小程序轮播图的代码错误写法
Hongmeng porting i.mx6ull (VI) kconfig_ GCC_ Mkefile
最成功也最差劲的CEO去世,索尼还是走在他的老路上
From outsourcing to self research and then to large factories, who knows how I came here in the past five years
mysql 8.0.28安装配置方法图文教程(压缩包方式)
Using kubekey to build kubernetes/kubesphere environment“
How many points can you get if the programmer's college entrance examination paper is exposed?
Docker-Compose实现Mysql主从
^27定时器的相关问题
JS事件流、事件冒泡、阻止冒泡、事件捕获(一看就懂)
【云原生 | Kubernetes篇】深入了解Pod(六)
How insecure is NFT from copyright to assets?
细说腾讯如何做到直播延时降低90%以上方案
利用Redis进行数据缓存的项目实践







