text

def setup
  background(220)
  textSize(32)
  text('word', 10, 30)
  fill(0, 102, 153)
  text('word', 10, 60)
  fill(0, 102, 153, 51)
  text('word', 10, 90)
end

p5.jsリファレンス(参考情報)

[p5.js] text

概要

キャンバスに文字列などを描画します。

書式

text(str, x, y [, x2] [, y2])

引数

引数名内容備考オプションデフォルト値
str表示対象文字列, 数値, 配列, オブジェクトなど
xx座標
yy座標
x2表示領域の幅rectModeの設定に依存(未詳)
y2表示領域の高さrectModeの設定に依存(未詳)

戻値

なし

備考

関連