createVector

概要

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

[p5.js] createVector

サンプル

def setup
  stroke(255, 0, 255)
  @v1 = createVector(width / 2, height / 2)
end

def draw
  background(220)
  line(@v1.x, @v1.y, mouseX, mouseY)
end

構文

戻値