pixo 0.4.4 → 0.4.5

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
  SHA1:
3
- metadata.gz: 6be379ba75547b6aa4d0508af89d7aca42b53dc2
4
- data.tar.gz: c8654550452d64220c967ba91b7926f8651db1cf
3
+ metadata.gz: d520f8c8ce6474f1bbf4c1b2998a726155a93683
4
+ data.tar.gz: 98b7fc63adf6bdfa2fe658c4a7741a137402120c
5
5
  SHA512:
6
- metadata.gz: 8cdf863ed5065736406871226efa120bb19b46c79d5ad2bd2db1523169380ae7ed94fe03f7d0f6ede6f6a4ddeef86910547386d11bd4dca758b8721f38f3e13d
7
- data.tar.gz: 69bc190546c1478504bff4ed92fa3cc6ea5335a26d95ba4bf5b7437cce9256115e6802495e12b9f7ccf6e964010709ec36336543e62c46de5ece0cfad1d74b97
6
+ metadata.gz: f8c6b4d4da79a26261407bef69ab3b6c915e9c0b4a0b911de5446edfbe93f3c982b7a1e9fa9dd5289e7ab26ed60e1efb3c5d7a126b211ae856e54fd8c84603fe
7
+ data.tar.gz: 68be8f926ca22fa389201d36a5d3316b589e656c046607d3b591d9440a7e73a0b37ed06d1681858ce90fe091f207a2ca76f4a45813eaf82a8fccec419e723777
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pixo (0.4.3)
4
+ pixo (0.4.5)
5
5
  concurrent-ruby
6
6
 
7
7
  GEM
@@ -167,7 +167,10 @@ VALUE application_tick(VALUE self, VALUE r_pattern, VALUE r_brightness)
167
167
 
168
168
  app_holder->app->tick(pattern_holder->pattern, brightness, width, height);
169
169
 
170
- app_holder->app->move_camera_to_perspective();
170
+ if (app_holder->app->frame_timer.duration() > 0) {
171
+ float rotate_by = 5 * app_holder->app->frame_timer.duration();
172
+ app_holder->app->viewed_from.rotate(rotate_by);
173
+ }
171
174
 
172
175
  glfwSwapBuffers(app_holder->window);
173
176
 
@@ -30,14 +30,15 @@ namespace Pixlib {
30
30
  void move_camera_to_perspective();
31
31
 
32
32
  void tick(Pattern* pattern, float brightness, int width, int height);
33
+ Timer frame_timer;
34
+
35
+ IsoCamera viewed_from;
36
+ IsoCamera camera;
33
37
  private:
34
38
  Scene scene;
35
39
  std::vector<LedCluster*> led_clusters;
36
40
 
37
- IsoCamera viewed_from;
38
- IsoCamera camera;
39
41
 
40
- Timer frame_timer;
41
42
 
42
43
  FadeCandy *fc;
43
44
  };
@@ -55,11 +55,7 @@ namespace Pixlib {
55
55
  void App::tick(Pattern* pattern, float brightness, int width, int height) {
56
56
  frame_timer.end();
57
57
  frame_timer.start();
58
- if (frame_timer.duration() > 0) {
59
- float rotate_by = 5 * frame_timer.duration();
60
- camera.rotate(rotate_by);
61
- }
62
-
58
+
63
59
  for (LedCluster* led_cluster : led_clusters) {
64
60
  led_cluster->render(viewed_from, *pattern, brightness);
65
61
  }
@@ -1,3 +1,3 @@
1
1
  module Pixo
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Constantine