Sha256: ee809bf87c8fdd81795712ab908643b2e286ec4cf6dc367f9b9cb4a2ea097749

Contents?: true

Size: 227 Bytes

Versions: 2

Compression:

Stored size: 227 Bytes

Contents

require 'sgl'

def setup
  useSound
  window -200, -200, 200, 200
  $y = 0
  $sound = loadSound('sine.ogg')
end

def onMouseDown(x, y)
  $y = y
  $sound.play(y / 10 + 60)
end

def display
  line -200, $y, 200, $y
end

mainloop

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sgl-1.0.0 examples/sgl-sound2.rb
sgl-0.4.0 examples/sgl-sound2.rb