lib/rubysketch/processing.rb in rubysketch-0.2.3 vs lib/rubysketch/processing.rb in rubysketch-0.2.4

- old
+ new

@@ -1025,23 +1025,27 @@ # Returns the perlin noise value. # # @overload noise(x) # @overload noise(x, y) + # @overload noise(x, y, z) # # @param x [Numeric] horizontal point in noise space # @param y [Numeric] vertical point in noise space + # @param z [Numeric] depth point in noise space # # @return [Numeric] noise value (0.0..1.0) # - def noise (x, y = 0) - Rays.perlin(x, y) / 2.0 + 1.0 + def noise (x, y = 0, z = 0) + Rays.perlin(x, y, z) / 2.0 + 0.5 end # Loads image. # # @param filename [String] file name to load image # @param extension [String] type of image to load (ex. 'png') + # + # @return [Image] loaded image object # def loadImage (filename, extension = nil) filename = getImage__ filename, extension if filename =~ %r|^https?://| Image.new Rays::Image.load filename end