rubysketch 0.5.20 → 0.5.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +11 -0
- data/VERSION +1 -1
- data/lib/rubysketch/sprite.rb +6 -4
- data/rubysketch.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0df293778e5e19a5976ef2b411e81170ae4be0966e7557460a79033bc3ef8087
|
4
|
+
data.tar.gz: 53cb60968e196f4875a1ff30df5bbf86178e33b4fabaf48172e6c6e664a81a08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6c8dfd681fc18adc3a22d4d221c3fed3479f4a9a594fa72046a2cc92c31758742b77d48eea4b686fe0202b925dc4a2223627e18d20337ea454ce4372684c7fc
|
7
|
+
data.tar.gz: d81a705672f9561c3bca9285ecce87ce931385143f47875d3a0cbbc20178e02af783cdfdf38d100a299b1481a997543208738a6e1e61c612606c8467c4b79162
|
data/ChangeLog.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
# rubysketch ChangeLog
|
2
2
|
|
3
3
|
|
4
|
+
## [v0.5.22] - 2023-07-11
|
5
|
+
|
6
|
+
- Update dependencies
|
7
|
+
|
8
|
+
|
9
|
+
## [v0.5.21] - 2023-07-10
|
10
|
+
|
11
|
+
- Sprite#contact block receives only contact begin event
|
12
|
+
- from_screen() -> fromScreen(), to_screen() -> toScreen()
|
13
|
+
|
14
|
+
|
4
15
|
## [v0.5.20] - 2023-07-09
|
5
16
|
|
6
17
|
- fix that calling mousePressed() without block removes mousePressed block
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.22
|
data/lib/rubysketch/sprite.rb
CHANGED
@@ -619,7 +619,7 @@ module RubySketch
|
|
619
619
|
#
|
620
620
|
# @return [Vector] sprite coordinate vector
|
621
621
|
#
|
622
|
-
def
|
622
|
+
def fromScreen(vec)
|
623
623
|
@view__.from_parent(vec.getInternal__).toVector
|
624
624
|
end
|
625
625
|
|
@@ -629,7 +629,7 @@ module RubySketch
|
|
629
629
|
#
|
630
630
|
# @return [Vector] screen coordinate vector
|
631
631
|
#
|
632
|
-
def
|
632
|
+
def toScreen(vec)
|
633
633
|
@view__.to_parent(vec.getInternal__).toVector
|
634
634
|
end
|
635
635
|
|
@@ -907,7 +907,7 @@ module RubySketch
|
|
907
907
|
end
|
908
908
|
|
909
909
|
def mouseButton()
|
910
|
-
((@pointersPressed + @pointersReleased) &
|
910
|
+
((@pointersPressed + @pointersReleased) & MOUSE_BUTTONS).last
|
911
911
|
end
|
912
912
|
|
913
913
|
def clickCount()
|
@@ -955,7 +955,7 @@ module RubySketch
|
|
955
955
|
on_pointer_up e
|
956
956
|
end
|
957
957
|
|
958
|
-
def
|
958
|
+
def on_contact_begin(e)
|
959
959
|
v = e.view
|
960
960
|
@contact.call v.sprite, e.action if @contact && v.respond_to?(:sprite)
|
961
961
|
end
|
@@ -973,6 +973,8 @@ module RubySketch
|
|
973
973
|
mouse_middle: Processing::GraphicsContext::CENTER
|
974
974
|
}
|
975
975
|
|
976
|
+
MOUSE_BUTTONS = MOUSE_BUTTON_MAP.values
|
977
|
+
|
976
978
|
def updatePointerStates(event)
|
977
979
|
pointer = event.find {|p| p.id == @pointer&.id} || event.first
|
978
980
|
if !mousePressed? || pointer.id == @pointer&.id
|
data/rubysketch.gemspec
CHANGED
@@ -29,8 +29,8 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.add_runtime_dependency 'rucy', '~> 0.1.39'
|
30
30
|
s.add_runtime_dependency 'beeps', '~> 0.1.41'
|
31
31
|
s.add_runtime_dependency 'rays', '~> 0.1.43'
|
32
|
-
s.add_runtime_dependency 'reflexion', '~> 0.1.
|
33
|
-
s.add_runtime_dependency 'processing', '~> 0.5.
|
32
|
+
s.add_runtime_dependency 'reflexion', '~> 0.1.49'
|
33
|
+
s.add_runtime_dependency 'processing', '~> 0.5.23'
|
34
34
|
|
35
35
|
s.add_development_dependency 'rake'
|
36
36
|
s.add_development_dependency 'test-unit'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubysketch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xordog
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xot
|
@@ -72,28 +72,28 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.1.
|
75
|
+
version: 0.1.49
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.1.
|
82
|
+
version: 0.1.49
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: processing
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.5.
|
89
|
+
version: 0.5.23
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.5.
|
96
|
+
version: 0.5.23
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|