bezierCurveTo() の使い方

頭の中のphotoshopかIllustratorでパス描くイメージかな。
慣れれば使えるかも。でももっとポイント増やせないかな…


プレビュー

bezierCurveTo

ソースコード

function drawScreen() {
	context.beginPath();
	context.moveTo(0, 0);

	context.strokeStyle = "black";
	context.lineWidth=5;

	//3次ベジェ曲線 - context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);
	context.moveTo(150, 0);
	context.bezierCurveTo(0, 125, 300, 175, 150, 300);

	context.stroke();
}

jsdo.it

参考

Share

  • http://Dwain.thoughts.com Armando

    You share interesting things here. I think that your page can go viral easily, but you must give it initial boost and i know how to do it, just search
    in google for – wcnu traffic increase