pixo 0.4.3 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ccf025fb1c7e0532685261b56e179535c54857a
4
- data.tar.gz: f62b87408c091e86dbd17e2ce495edf37733fbaa
3
+ metadata.gz: 6be379ba75547b6aa4d0508af89d7aca42b53dc2
4
+ data.tar.gz: c8654550452d64220c967ba91b7926f8651db1cf
5
5
  SHA512:
6
- metadata.gz: b838da4067c73c0817dd4820ebb9bafd59be463e5dbdbeea01b4663f56e4ba8177494771605b18e6a5bd275566c91c7f16f06da134a6ef3d3890c88b18544bfb
7
- data.tar.gz: 5b289741fd6e98eb1756fddab9ae9cacb33624bff1748895b47312a4a74ac03e281bda9fcb51988bf7212f823487645735e36c1b91c7491c82e74c7febcbed5e
6
+ metadata.gz: 8cdf863ed5065736406871226efa120bb19b46c79d5ad2bd2db1523169380ae7ed94fe03f7d0f6ede6f6a4ddeef86910547386d11bd4dca758b8721f38f3e13d
7
+ data.tar.gz: 69bc190546c1478504bff4ed92fa3cc6ea5335a26d95ba4bf5b7437cce9256115e6802495e12b9f7ccf6e964010709ec36336543e62c46de5ece0cfad1d74b97
@@ -167,7 +167,7 @@ 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_perspective_to_camera();
170
+ app_holder->app->move_camera_to_perspective();
171
171
 
172
172
  glfwSwapBuffers(app_holder->window);
173
173
 
@@ -27,6 +27,7 @@ namespace Pixlib {
27
27
  void ProcessMouseScroll(float x);
28
28
 
29
29
  void move_perspective_to_camera();
30
+ void move_camera_to_perspective();
30
31
 
31
32
  void tick(Pattern* pattern, float brightness, int width, int height);
32
33
  private:
@@ -1,4 +1,4 @@
1
- #pragma once
1
+ #pragma once
2
2
 
3
3
  // Std. Includes
4
4
  #include <vector>
@@ -48,6 +48,10 @@ namespace Pixlib {
48
48
  viewed_from.moveTowards(camera, scene.getTimeDelta()*0.8);
49
49
  }
50
50
 
51
+ void App::move_camera_to_perspective() {
52
+ camera.moveTowards(viewed_from, scene.getTimeDelta()*0.8);
53
+ }
54
+
51
55
  void App::tick(Pattern* pattern, float brightness, int width, int height) {
52
56
  frame_timer.end();
53
57
  frame_timer.start();
@@ -84,6 +84,13 @@ namespace Pixlib {
84
84
  // Calculates the front vector from the Camera's (updated) Eular Angles
85
85
  void IsoCamera::updateCameraVectors()
86
86
  {
87
+
88
+ if (Yaw > 360) {
89
+ Yaw -= 360;
90
+ } else if (Yaw < 0) {
91
+ Yaw += 360;
92
+ }
93
+
87
94
  // Calculate the new Front vector
88
95
  glm::vec3 front;
89
96
  front.x = cos(glm::radians(this->Yaw)) * cos(glm::radians(this->Pitch));
@@ -101,9 +108,6 @@ namespace Pixlib {
101
108
  void IsoCamera::rotate(const float degs)
102
109
  {
103
110
  Yaw += degs;
104
- if (Yaw > 360) {
105
- Yaw -= 360;
106
- }
107
111
 
108
112
  updateCameraVectors();
109
113
  }
@@ -1,3 +1,3 @@
1
1
  module Pixo
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Constantine
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-16 00:00:00.000000000 Z
11
+ date: 2017-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby