rubysketch 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rubysketch/processing.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9603661dbdced67794a2d3f89a4e18e1314fc84daeb8721d5d05c47b5a935cd1
|
4
|
+
data.tar.gz: 8793bbe339b07ed9d0af7b82e87fc62a92470ce17ff7c9432215adc38c31f74e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ea4ed4be93eb7a1e2c2b5f187c59b8a7ea035e7ab80f2f3ec00ecd5c7f14861d55a76188e80251dc8efd3b48c8eb2d91217ff3da8e625885a4e55dcee5d76d9
|
7
|
+
data.tar.gz: 71b9f02e1e7a1bcba29ebbbff0d10a4ce0af9f7e12231014300ec23c5f26b15df288975e27ae683f033ba71f09d82ff39db1a0aef72700f34d87bf9474b2d0ba
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
@@ -1027,14 +1027,16 @@ module RubySketch
|
|
1027
1027
|
#
|
1028
1028
|
# @overload noise(x)
|
1029
1029
|
# @overload noise(x, y)
|
1030
|
+
# @overload noise(x, y, z)
|
1030
1031
|
#
|
1031
1032
|
# @param x [Numeric] horizontal point in noise space
|
1032
1033
|
# @param y [Numeric] vertical point in noise space
|
1034
|
+
# @param z [Numeric] depth point in noise space
|
1033
1035
|
#
|
1034
1036
|
# @return [Numeric] noise value (0.0..1.0)
|
1035
1037
|
#
|
1036
|
-
def noise (x, y = 0)
|
1037
|
-
Rays.perlin(x, y) / 2.0 +
|
1038
|
+
def noise (x, y = 0, z = 0)
|
1039
|
+
Rays.perlin(x, y, z) / 2.0 + 0.5
|
1038
1040
|
end
|
1039
1041
|
|
1040
1042
|
# Loads image.
|
@@ -1042,6 +1044,8 @@ module RubySketch
|
|
1042
1044
|
# @param filename [String] file name to load image
|
1043
1045
|
# @param extension [String] type of image to load (ex. 'png')
|
1044
1046
|
#
|
1047
|
+
# @return [Image] loaded image object
|
1048
|
+
#
|
1045
1049
|
def loadImage (filename, extension = nil)
|
1046
1050
|
filename = getImage__ filename, extension if filename =~ %r|^https?://|
|
1047
1051
|
Image.new Rays::Image.load filename
|