(p5.Element).show

def setup
  background(220)
  div = createDiv('Hello').position(30, 30)
  check = createCheckbox('表示', true).position(20, 60)
  check.changed do
    if check.checked
      div.show
    else
      div.hide
    end
  end
end

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

[p5.js] (p5.Element).show

概要

要素を表示します。

書式

show

引数

なし

戻値

なし

備考

・スタイル設定の「display: block」と同じ挙動です。

関連

(p5.Element).hide