movedY

概要

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

[p5.js] movedY

サンプル

def setup
  @y = 50
  rectMode(CENTER)
end

def draw
  if @y > 48
     @y -= 2
   elsif @y < 48
     @y += 2
   end
   @y += (movedY / 1).floor
   background(237, 34, 93)
   fill(0)
   rect(@y, 50, 50, 50)
end

構文

戻値