rubysketch 0.5.24 → 0.5.25

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: 5538cde508d958c69978b0cdf51727303c3c509f96fae21a30b41cfabc99a9a8
4
- data.tar.gz: 9b7fd39a1684f7fe49fbc98250c0315038419566443209fddce8701ff9683228
3
+ metadata.gz: 41b147fcb3fd31ea85f6b29b30681a0280140ded656677ade8bddf91399af6b8
4
+ data.tar.gz: 3cc93b88d182703d4c08750029058e0911fe3a17f9c98aa6f951482552c8f1b6
5
5
  SHA512:
6
- metadata.gz: f71cd9de84e98317c61ad25c013cf0d6ec2257cc884138984908ee6ecd505c7a87068798539b8491fcccad90e7a829dea8d62fb907483c46be215cea010cb074
7
- data.tar.gz: 4758d91420fb1069ce87438ec0df5cfea7af382847f9375bc7869f48fce5ed3d21936d0af79c0c3b2a166121991f922a82944c5a89515e1b09f872fb8723b7cd
6
+ metadata.gz: 68665dc8c90267229151102218044d4a95f9a7fbdae5ed61dd8a16cdc9ef14b65b0b582e491bb5be7576618594721ad101e0923245dcb8ed20f004ed658c9c85
7
+ data.tar.gz: 94bdd58eda1690e820446a8b58fe2628110ec00d5093515416b9f0e64c2f31d9c545f075d436123abce715359cfe46f39a1d08f3125a1616248b15be2eead5eb
data/ChangeLog.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # rubysketch ChangeLog
2
2
 
3
3
 
4
+ ## [v0.5.25] - 2023-07-22
5
+
6
+ - Freeze EASINGS
7
+ - Fix that clearTimer() fails clearing timer in very rare cases
8
+
9
+
4
10
  ## [v0.5.24] - 2023-07-21
5
11
 
6
12
  - Add animate(), animateValue(), and EASINGS
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.24
1
+ 0.5.25
@@ -9,7 +9,7 @@ module RubySketch
9
9
  # @private
10
10
  def initialize(window)
11
11
  super
12
- @timers__, @nextTimerID__ = {}, 0
12
+ @timers__, @firingTimers__, @nextTimerID__ = {}, {}, 0
13
13
 
14
14
  @layer__ = window.add_overlay SpriteLayer.new
15
15
 
@@ -71,7 +71,7 @@ module RubySketch
71
71
  # @return [nil] nil
72
72
  #
73
73
  def clearTimer(id)
74
- @timers__.delete id
74
+ [@timers__, @firingTimers__].each {|timers| timers.delete id}
75
75
  nil
76
76
  end
77
77
 
@@ -87,11 +87,11 @@ module RubySketch
87
87
  # @private
88
88
  def fireTimers__()
89
89
  now = Time.now.to_f
90
- blocks = []
91
- @timers__.delete_if do |_, (time, args, block)|
92
- (now >= time).tap {|fire| blocks.push [block, args] if fire}
90
+ @firingTimers__.clear
91
+ @timers__.delete_if do |id, (time, args, block)|
92
+ (now >= time).tap {|fire| @firingTimers__[id] = [block, args] if fire}
93
93
  end
94
- blocks.each {|block, args| block.call *args}
94
+ @firingTimers__.each {|_, (block, args)| block.call *args}
95
95
  end
96
96
 
97
97
  # Animate with easing functions
@@ -100,6 +100,6 @@ module RubySketch
100
100
  backInOut: backInOut,
101
101
  elasticInOut: elasticInOut,
102
102
  bounceInOut: bounceInOut
103
- }
103
+ }.freeze
104
104
 
105
105
  end# RubySketch
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.24
4
+ version: 0.5.25
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-21 00:00:00.000000000 Z
11
+ date: 2023-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xot