pixo 0.3.0 → 0.3.1

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: 6b6f02aec4edb8967668a68b0e5e82d06989a41a
4
- data.tar.gz: e7722d6196838c3dc7f3e8c15f04318737f161b0
3
+ metadata.gz: 2cbac5c2bd33d6a29527ccfb233027b8bce2c4e6
4
+ data.tar.gz: 393a6f891e03e97f46c07772f344aa102d24fe82
5
5
  SHA512:
6
- metadata.gz: 901ba8065c211abf4e5382139e279ee315befbe652d0743e2bd61816f2984fe20da791f0bd9fbedd601346e234c6c3ffd02f11c08354b306418df282fa97f81d
7
- data.tar.gz: 4a6474b8ea8552582c4e6509debc6bd93e2f884d399f54d274765aa4ecd02da7fd793bb07f891af6a4084a769ecce12c7bb2d2281993502ffc0a44814874aa54
6
+ metadata.gz: a0e3dd1cd394a75df5264d20fc83fc90955d97d8f7c0bcc6018d0ab7b3c821450c7618b57154407a153f1cdc6863a727c4fb78512a83734df1c409a086a76c3e
7
+ data.tar.gz: d99d10e7823e296085fa3bcfb2debcb50e62541db716acce5989159db5828725477b7c8711888739b86f9f8713c570a27289762007d1eb041ae282894b0fa4dc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pixo (0.3.0)
4
+ pixo (0.3.1)
5
5
  concurrent-ruby
6
6
 
7
7
  GEM
@@ -14,7 +14,7 @@ void main()
14
14
  /// integers values align perfectly
15
15
  float numSides = 9.;
16
16
 
17
- float brightness = 1. + abs(cos(time/5.) * 3.);
17
+ float brightness = 5.;// + abs(cos(time/5.) * 3.);
18
18
  float size = 7. + sin(time/20.) * 50.;
19
19
 
20
20
  vec2 position = (gl_FragCoord.xy - 0.5*resolution) / resolution.xx ;
@@ -23,7 +23,6 @@ namespace Pixlib {
23
23
 
24
24
  out vec2 TexCoords;
25
25
  out vec3 Normal;
26
- out vec4 Position;
27
26
 
28
27
  uniform mat4 view;
29
28
  uniform mat4 projection;
@@ -35,7 +34,6 @@ namespace Pixlib {
35
34
  gl_Position = projection * view * positionOffset * vec4(position, 1.0f);
36
35
  TexCoords = texCoords + texCoordsOffset;
37
36
  Normal = normal;
38
- Position = positionOffset*vec4(position, 1.0f);
39
37
  })",
40
38
  R"(#version 330 core
41
39
 
@@ -44,7 +42,6 @@ namespace Pixlib {
44
42
  #endif
45
43
 
46
44
  in vec2 TexCoords;
47
- in vec3 Position;
48
45
 
49
46
  out vec4 color;
50
47
 
@@ -53,7 +53,7 @@ module Pixo
53
53
  end
54
54
 
55
55
  def key_callback(key, scancode, action, mods)
56
- @service.request(Pixo::Renderer::OnKey.new(key, scancode, action, mods))
56
+ @service.request(Pixo::Renderer::OnKey.new(key, scancode, action, mods), async: true)
57
57
  end
58
58
 
59
59
  def patterns
@@ -47,9 +47,9 @@ module Pixo::Ipc
47
47
  @writer_pipe.close
48
48
  end
49
49
 
50
- def request(message, timeout: 10)
50
+ def request(message, timeout: 10, async: false)
51
51
  request = Pixo::Ipc::Request.new(message)
52
- @live_requests[request.message.rid] = request
52
+ @live_requests[request.message.rid] = request unless async
53
53
 
54
54
  bytes_to_write = Base64.strict_encode64(Marshal.dump(request.message))
55
55
  @pipe_mutex.synchronize do
@@ -58,6 +58,8 @@ module Pixo::Ipc
58
58
  @writer_pipe.flush
59
59
  end
60
60
 
61
+ return if async
62
+
61
63
  unless request.latch.wait(timeout)
62
64
  raise Timeout::Error.new("%s: request timed out after %.3f seconds." % [request.message.rid, timeout] )
63
65
  end
data/lib/pixo/renderer.rb CHANGED
@@ -70,7 +70,7 @@ module Pixo
70
70
  end
71
71
 
72
72
  def add_fadecandy(hostname, count)
73
- service.request(Pixo::Renderer::AddFadecandy.new(hostname, count))
73
+ service.request(Pixo::Renderer::AddFadecandy.new(hostname, count), async: true)
74
74
  end
75
75
 
76
76
  private
data/lib/pixo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pixo
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
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.3.0
4
+ version: 0.3.1
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-09-30 00:00:00.000000000 Z
11
+ date: 2017-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby