scene 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +18 -12
  3. data/lib/scene/default_scene.rb +1 -1
  4. metadata +49 -74
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 25c32d43d102e7db5ceccc6cd9079b841051fb0f
4
+ data.tar.gz: 208320e656dc3d508172bf89ed0015e0a8b47a85
5
+ SHA512:
6
+ metadata.gz: de6162c28cf771243d93ad0c9a044230cbe5cdc0b9eb48b59dbaedc69805ee51deb9d727bc23291421e556db2b7ac6b937a42724db3a98785eae557ea2f7678d
7
+ data.tar.gz: e0dd12dd3edbd6bd9f7a989964ba4ee6c4eb3cf9c1f916334f56b6350f1db0ed2e8d071b1e22ffaa0183e04b84219654a3a6e1b76489b85e65976dcb174ab80a
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Introduction
2
2
 
3
- Super Simple Scene is a gem that attempts to make things as easy as possible to get started with OpenGL. It handles all of the messy window setup and provides sensible defaults various things. Under the hood it uses the GLUT windowing system, which is well-known and widely documented. It has been tested in Ruby 1.8.7+ on Mac OSX Snow Leopard.
3
+ Super Simple Scene is a gem that attempts to make things as easy as possible to get started with OpenGL. It handles all of the messy window setup and provides sensible defaults for various things. Under the hood it uses the GLUT windowing system, which is well-known and widely documented. It has been tested in Ruby 1.8.7+ on Mac OSX Snow Leopard and Windows 7 x64.
4
4
 
5
5
  <img src='http://i44.tinypic.com/veyp3.png' width="400" height="400" />
6
6
 
@@ -20,6 +20,10 @@ require 'scene'
20
20
 
21
21
  You may need to require 'rubygems' too, if you are running an old version of Ruby.
22
22
 
23
+ **Windows users:**
24
+
25
+ You'll need the GLUT dynamic link library, which you can download [here](http://dl.dropbox.com/u/5490406/github/glut32.dll). Copy that into your Windows > SysWOW64 folder, or System32 if you don't have that.
26
+
23
27
  **Running the default scene:**
24
28
 
25
29
  ```ruby
@@ -32,25 +36,25 @@ Press H to display help in the terminal.
32
36
 
33
37
  ```ruby
34
38
  class MyScene < Scene
35
-
39
+
36
40
  def initialize
37
41
  end
38
-
42
+
39
43
  def display
40
44
  end
41
-
45
+
42
46
  def timer(elapsed)
43
47
  end
44
-
48
+
45
49
  def keyboard(key, x, y)
46
50
  end
47
-
51
+
48
52
  def mouse(button, state, x, y)
49
53
  end
50
-
54
+
51
55
  def reshape(width, height)
52
56
  end
53
-
57
+
54
58
  end
55
59
 
56
60
  MyScene.display
@@ -77,10 +81,10 @@ The display method will be called every 10 milliseconds, or thereabouts- dependi
77
81
  def display
78
82
  glColor3f(1, 0, 0)
79
83
  glBegin(GL_POLYGON)
80
- glVertex3f(-1, -1, 0)
81
- glVertex3f(-1, 1, 0)
82
- glVertex3f(1, 1, 0)
83
84
  glVertex3f(1, -1, 0)
85
+ glVertex3f(1, 1, 0)
86
+ glVertex3f(-1, 1, 0)
87
+ glVertex3f(-1, -1, 0)
84
88
  glEnd
85
89
  end
86
90
  ```
@@ -89,7 +93,7 @@ The camera is positioned at 0, 0, -4 and is focussed on the origin by default. F
89
93
 
90
94
  ## Timer
91
95
 
92
- The timer method is called after each frame is drawn. This is a good place to control animations, for example, you could rotate by x many degrees every time this method is called. Is is given the elapsed time since the previous timer method was called. This allows for building time-accurate animations. It is also a good indication of whether or not your machine is struggling to display the animation if it strays too far from 10ms.
96
+ The timer method is called after each frame is drawn. This is a good place to control animations, for example, you could rotate by x many degrees every time this method is called. It is given the elapsed time since the previous timer method was called. This allows for building time-accurate animations. It is also a good indication of whether or not your machine is struggling to display the animation if it strays too far from 10ms.
93
97
 
94
98
  ```ruby
95
99
  def timer(elapsed)
@@ -135,4 +139,6 @@ end
135
139
 
136
140
  Please feel free to contribute, either through pull requests or feature requests here on Github.
137
141
 
142
+ I'm thinking of including several default scenes in the gem. If you have something cool, let me know and it might get included!
143
+
138
144
  For news and latest updates, follow me on Twitter ([@cpatuzzo](https://twitter.com/#!/cpatuzzo)).
@@ -67,7 +67,7 @@ module DefaultScene
67
67
  puts 'Middle click : Inverse y-rotation'
68
68
  puts 'Right click : Inverse z-rotation'
69
69
  puts
70
- puts 'Visit https://github.com/cpatuzzo/scene for more information'
70
+ puts 'Visit https://github.com/tuzz/scene for more information'
71
71
  when 'o'
72
72
  @show_outline = !@show_outline
73
73
  end
metadata CHANGED
@@ -1,98 +1,73 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: scene
3
- version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 2
10
- version: 0.0.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
11
5
  platform: ruby
12
- authors:
13
- - Christopher Patuzzo
6
+ authors:
7
+ - Chris Patuzzo
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2012-03-03 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2012-03-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: opengl
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3953727737
29
- segments:
30
- - 0
31
- - 7
32
- - 0
33
- - pre
34
- - 1
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
35
19
  version: 0.7.0.pre1
36
20
  type: :runtime
37
- version_requirements: *id001
38
- - !ruby/object:Gem::Dependency
39
- name: rspec
40
21
  prerelease: false
41
- requirement: &id002 !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- hash: 3
47
- segments:
48
- - 0
49
- version: "0"
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.7.0.pre1
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
50
34
  type: :development
51
- version_requirements: *id002
52
- description: Super simple scenes using OpenGL
53
- email: chris.patuzzo@gmail.com
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Render OpenGL animations with sensible defaults
42
+ email: chris@patuzzo.co.uk
54
43
  executables: []
55
-
56
44
  extensions: []
57
-
58
45
  extra_rdoc_files: []
59
-
60
- files:
46
+ files:
61
47
  - README.md
62
48
  - lib/scene/default_scene.rb
63
49
  - lib/scene.rb
64
- homepage: https://github.com/cpatuzzo/scene
50
+ homepage: https://github.com/tuzz/scene
65
51
  licenses: []
66
-
52
+ metadata: {}
67
53
  post_install_message:
68
54
  rdoc_options: []
69
-
70
- require_paths:
55
+ require_paths:
71
56
  - lib
72
- required_ruby_version: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- hash: 3
78
- segments:
79
- - 0
80
- version: "0"
81
- required_rubygems_version: !ruby/object:Gem::Requirement
82
- none: false
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- hash: 3
87
- segments:
88
- - 0
89
- version: "0"
57
+ required_ruby_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
90
67
  requirements: []
91
-
92
68
  rubyforge_project:
93
- rubygems_version: 1.8.15
69
+ rubygems_version: 2.0.0
94
70
  signing_key:
95
- specification_version: 3
96
- summary: Super simple scenes using OpenGL
71
+ specification_version: 4
72
+ summary: Super Simple Scene
97
73
  test_files: []
98
-