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.10 examples/physics.rb
rubysketch-0.5.9 examples/physics.rb
rubysketch-0.5.8 examples/physics.rb
rubysketch-0.5.7 examples/physics.rb
rubysketch-0.5.5 examples/physics.rb