0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

P5.js 日本語リファレンス(curveDetail)

Last updated at Posted at 2020-04-30

このページでは[「P5.js 日本語リファレンス」] (https://qiita.com/bit0101/items/91818244dc26c767a0fe) の curveDetail関数を説明します。

curveDetail()

説明文

曲線が表示される解像度を設定します。

デフォルト値は20で最小値は3です。

この関数はcreateCanvas()で WEBGL を指定した場合にのみ有効です。

構文

curveDetail(resolution)

パラメタ

  • resolution
    Number:曲線の解像度

例1

function setup(){
   createCanvas(100, 100, WEBGL);
   curveDetail(8); // 曲線の描画を少し粗くする
}
function draw(){
   curve(250, 600, 0, -30, 40, 0, 30, 30, 0, -250, 600, 0);
}

実行結果

curveDetail.png

著作権

p5.js was created by Lauren McCarthy and is developed by a community of collaborators, with support from the Processing Foundation and NYU ITP. Identity and graphic design by Jerel Johnson.

ライセンス

Creative Commons(CC BY-NC-SA 4.0) に従います。
P5.js 日本語リファレンス

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?