Sha256: b24198409b16b9e441377dede1de8b0cec16f4a0e338614178323eef1f877466

Contents?: true

Size: 577 Bytes

Versions: 8

Compression:

Stored size: 577 Bytes

Contents

# dummy_spring.rb by Martin Prout
# An example of duck-typing in ruby-processing

# This class avoids the tests for null of the vanilla processing version
class DummySpring
  def initialize; end
  def update(_x, _y); end
  def display; end
  # This is the key function where
  # we attach the spring to an x,y location
  # and the box object's location
  # @param x (will be mouse_x)
  # @param y (will be mouse_y)
  # @param box Box
  # @return new bound Spring
  def bind(x, y, box)
    spring = Spring.new
    spring.bind(x, y, box)
    spring
  end

  def destroy; end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pbox2d-1.0.3-java examples/mouse_joint/dummy_spring.rb
pbox2d-1.0.2-java examples/mouse_joint/dummy_spring.rb
pbox2d-1.0.1-java examples/mouse_joint/dummy_spring.rb
pbox2d-1.0.0-java examples/mouse_joint/dummy_spring.rb
pbox2d-0.9.1-java examples/mouse_joint/dummy_spring.rb
pbox2d-0.9.0-java examples/mouse_joint/dummy_spring.rb
pbox2d-0.8.0-java examples/mouse_joint/dummy_spring.rb
pbox2d-0.6.0-java examples/mouse_joint/dummy_spring.rb