cone

概要

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

[p5.js] cone

サンプル

def setup
  createCanvas(100, 100, WEBGL)
end

def draw
  background(200)
  rotateX(frameCount * 0.02)
  rotateZ(frameCount * 0.02)
  cone(40, 70)
end
def setup
  createCanvas(100, 100, WEBGL)
  @detailX = createSlider(3, 16, 3)
  @detailX.position(10, height + 5)
  @detailX.style('width', '80px')
end

def draw
  background(205, 102, 94)
  rotateY(millis / 1000)
  cone(30, 65, @detailX.value, 16)
end
def setup
  createCanvas(100, 100, WEBGL)
  @detailY = createSlider(3, 16, 3)
  @detailY.position(10, height + 5)
  @detailY.style('width', '80px')
end

def draw
  background(205, 102, 94)
  rotateY(millis / 1000)
  cone(30, 65, 16, @detailY.value)
end

構文

戻値