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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6be379ba75547b6aa4d0508af89d7aca42b53dc2
|
4
|
+
data.tar.gz: c8654550452d64220c967ba91b7926f8651db1cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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->
|
170
|
+
app_holder->app->move_camera_to_perspective();
|
171
171
|
|
172
172
|
glfwSwapBuffers(app_holder->window);
|
173
173
|
|
data/ext/pixo/pixlib/src/app.cpp
CHANGED
@@ -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
|
}
|
data/lib/pixo/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|