javascript 放大缩小精灵升级版详解编程语言

javascript 放大缩小精灵升级版

function xuanzhuanactnew(dianthat, dianjix, dianjiy, zhongxinx, zhongxiny){ 
        var newangle = getjiaodu(dianjix, dianjiy, zhongxinx, zhongxiny); 
         var youxiajiajiao=dianthat.getChildByName('bunny').youxiajiajiao; 
         var renewangle=-(newangle+Math.abs(youxiajiajiao)); 
        dianthat.rotation = renewangle; 
        var newjuli = getjuli(dianjix, dianjiy, zhongxinx, zhongxiny); 
        console.group('x1'); 
        console.log('newjuli:'+newjuli); 
        console.log('newangle:'+newangle); 
        console.groupEnd(); 
        var x1 = newjuli * Math.cos(youxiajiajiao) 
        var cwidth=Math.abs(x1)*2 
        var bunny = dianthat.getChildByName('bunny'); 
       bunny.width = cwidth; 
       fangdaact(dianthat); 
}

youxiajiajiao  右下角与X的夹角

如果看不懂     

翻下以前的博客

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/18749.html

(0)
上一篇 2021年7月19日
下一篇 2021年7月19日

相关推荐

发表回复

登录后才能评论