Sha256: 8863554504eaf8d66103b020e9151ebb7be03cfd766eae8ea5f895e6a3b00a37

Contents?: true

Size: 501 Bytes

Versions: 25

Compression:

Stored size: 501 Bytes

Contents

%w[xot rucy beeps rays reflex processing rubysketch]
  .map  {|s| File.expand_path "../../#{s}/lib", __dir__}
  .each {|s| $:.unshift s if !$:.include?(s) && File.directory?(s)}

require 'rubysketch'
using RubySketch

noStroke
gravity 0, 1000

sprites = []
ground  = createSprite 0, height - 10, width, 10

draw do
  background 100
  sprite *sprites, ground
end

mousePressed do
  sp             = createSprite mouseX, mouseY, 20, 20
  sp.dynamic     = true
  sp.restitution = 0.5
  sprites << sp
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
rubysketch-0.5.31 examples/physics.rb
rubysketch-0.5.30 examples/physics.rb
rubysketch-0.5.28 examples/physics.rb
rubysketch-0.5.27 examples/physics.rb
rubysketch-0.5.26 examples/physics.rb
rubysketch-0.5.25 examples/physics.rb
rubysketch-0.5.24 examples/physics.rb
rubysketch-0.5.23 examples/physics.rb
rubysketch-0.5.22 examples/physics.rb
rubysketch-0.5.21 examples/physics.rb
rubysketch-0.5.20 examples/physics.rb
rubysketch-0.5.19 examples/physics.rb
rubysketch-0.5.18 examples/physics.rb
rubysketch-0.5.17 examples/physics.rb
rubysketch-0.5.16 examples/physics.rb
rubysketch-0.5.15 examples/physics.rb
rubysketch-0.5.14 examples/physics.rb
rubysketch-0.5.13 examples/physics.rb
rubysketch-0.5.12 examples/physics.rb
rubysketch-0.5.11 examples/physics.rb