如何平滑移相器/画布线?

时间:2018-12-19 12:19:18

标签: javascript canvas phaser-framework

我尝试了lineCap,但没有帮助。

SVG中相同的几何图形看起来要好得多。

如何像SVG一样平滑或像photoshop这样的“画家”来绘制它?

enter image description here

  var game=new Phaser.Game(800,600,Phaser.AUTO,'game',{preload:preload,create:create, update:update});

function preload() {
      game.time.advancedTiming = true;
    }
  function create(){
    var graphics=game.add.graphics(300,10);  
    
    // graphics.beginFill(0xC7CFBE);
    graphics.lineStyle(7,0xB8B8B8,1);
    graphics.moveTo(10,10);
    graphics.lineTo(66, 10);
    graphics.lineTo(66,1380);
    graphics.lineTo(10,1380);
    graphics.lineTo(10,10);
    //graphics.endFill();
    graphics.angle = -2.699999999990382;
    
    window.graphics=graphics;
  }

   function update() 
    {
    }
<script src="https://cdnjs.cloudflare.com/ajax/libs/phaser/2.4.6/phaser.min.js"></script>
<div id="game"></div>

0 个答案:

没有答案