白鹭EGRET使用龙骨DRAGONBONES骨骼动画

            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);   

你可能感兴趣的:(骨骼动画,DRAGONBONES,Egret,动画,javascript)