using Gosu and TexPlay to create a nice melting effect for images:
Melting a roseMelting a sabHere's the code:
(only works with most recent version of TexPlay, 0.1.9+)
require 'gosu'
require 'texplay'
class W < Gosu::Window
def initialize
super(1024, 769, false, 20)
@img = Gosu::Image.new(self, "maria.png")
end
def draw
x = @img.width * rand
y = (@img.height/2+ 100) * rand
@img.splice @img, x, y + 1, :crop => [x, y, x + 200, y + 200]
@img.draw 100, 50,1
end
end
w = W.new
w.show