rubysketch 0.5.20 → 0.5.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de696798b30cb2b3545e2b2c44aeda9ca5df2658e7026392f20ba9cf9bf85570
4
- data.tar.gz: a7a93a821db3bb44dac6c656d23ae246f696b09ce4d2b2c2eacd797d44664659
3
+ metadata.gz: 465b63fb2c047489e7df0a629141c3413acf79d07411309326639ca39d751da0
4
+ data.tar.gz: 9a2adaafb57a38b765b5afe482868b0da0f4c62f7dc98963b865c202246c0637
5
5
  SHA512:
6
- metadata.gz: 4c4f5662bd7ad50e429dc5de1e91de19fe73be52de3f48addefa6b67007218f9dd9bad033603cf89a2bf08b092d8b424116abc0cb8a1ac4e0d6a9428b7eaa124
7
- data.tar.gz: 4b2e98ed91f9eff96170fcd79f1bfac8323c341e7c10ffa65f060be7d04645f8bf41502608dc2d7914f5a5a968f6ec4a9959db5af57cd2217d862468e1ad01b2
6
+ metadata.gz: edd124cb7e330e5193dbd0cb19e669d67913b2910a59d236000e624bf3371bec247bcee5a87f5225bdd822e3801d39df9d3094aed17fe17ec1b9d14629c0fdba
7
+ data.tar.gz: 347152e6d8c121166677cabbf9f28f611f4da284a1251c06e977bb977f59e87db29e9af5649274699b6820d334b25784ef2614e303cdd896c637ef379e905510
data/ChangeLog.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # rubysketch ChangeLog
2
2
 
3
3
 
4
+ ## [v0.5.21] - 2023-07-10
5
+
6
+ - Sprite#contact block receives only contact begin event
7
+ - from_screen() -> fromScreen(), to_screen() -> toScreen()
8
+
9
+
4
10
  ## [v0.5.20] - 2023-07-09
5
11
 
6
12
  - fix that calling mousePressed() without block removes mousePressed block
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.20
1
+ 0.5.21
@@ -619,7 +619,7 @@ module RubySketch
619
619
  #
620
620
  # @return [Vector] sprite coordinate vector
621
621
  #
622
- def from_screen(vec)
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 to_screen(vec)
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) & [LEFT, RIGHT, CENTER]).last
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 on_contact(e)
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.47'
33
- s.add_runtime_dependency 'processing', '~> 0.5.21'
32
+ s.add_runtime_dependency 'reflexion', '~> 0.1.48'
33
+ s.add_runtime_dependency 'processing', '~> 0.5.22'
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.20
4
+ version: 0.5.21
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-09 00:00:00.000000000 Z
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.47
75
+ version: 0.1.48
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.47
82
+ version: 0.1.48
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.21
89
+ version: 0.5.22
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.21
96
+ version: 0.5.22
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement