Sha256: 93e377b422a2d3757c1c5a9c5c79130ad5fc2da904df504e5438044369226e73
Contents?: true
Size: 593 Bytes
Versions: 1
Compression:
Stored size: 593 Bytes
Contents
# dummy_spring.rb by Martin Prout # An example of duck-typing in ruby-processing # This class avoids the tests for null seen in vanilla processing version class DummySpring def initialize; end def update(_x, _y); end def display; end # This is the key function where # we attach a real spring between 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pbox2d-0.4.2-java | examples/mouse_joint/dummy_spring.rb |