var dragonbonesData = RES.getRes("Robot_json");
var textureData = RES.getRes("texture_json");
var texture = RES.getRes("texture_png");
var dragonbonesFactory: dragonBones.EgretFactory = new dragonBones.EgretFactory();
dragonbonesFactory.addDragonBonesData(dragonBones.DataParser.parseDragonBonesData(dragonbonesData));
dragonbonesFactory.addTextureAtlas(new dragonBones.EgretTextureAtlas(texture, textureData));
var armature: dragonBones.Armature = dragonbonesFactory.buildArmature("robot");
this.aniGroup.addChild(armature.getDisplay());
armature.animation.play("Run");
armature.display.x =100;
armature.display.y =100;
/**
* 开启大时钟这步很关键
* */
dragonBones.WorldClock.clock.add(armature);
egret.Ticker.getInstance().register(function(advancedTime){
dragonBones.WorldClock.clock.advanceTime(advancedTime/1000);
},this); 白鹭EGRET使用龙骨DRAGONBONES骨骼动画
最新推荐文章于 2021-05-31 18:11:29 发布
本文介绍如何利用DragonBones动画库加载并播放角色动画。通过解析JSON配置文件及纹理资源,创建动画实例,并设置动画播放。最终将动画显示在指定位置。
部署运行你感兴趣的模型镜像
您可能感兴趣的与本文相关的镜像
Stable-Diffusion-3.5
图片生成
Stable-Diffusion
Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率
797

被折叠的 条评论
为什么被折叠?



