wavefront 0.0.61 → 0.1.0
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 +6 -14
- data/lib/wavefront/version.rb +1 -1
- data/lib/wavefront_object.rb +10 -6
- data/wavefront.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
YTM1NzQ2YjI5MjU2M2JmZDFjNWNlODNmODU2NWE3ZTg1M2ExOTZjOGUxMjgy
|
10
|
-
OGNmZmVhYzdmMTFmZjZkOTQ5OWUwMjlmMjdhODZlYTRkYmY0OGU0ZTgyOWNl
|
11
|
-
YmIxOWIwOTNlZmE0ZWJjMDdjZWRjNjI2MTkzYzM1ZGQ3OWM0YmU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MzFlMWNkNzIxYzI3NjE0YWFjOTIxMTBmNGJiN2UwNGY1MTMyNzMyYTgyZGMy
|
14
|
-
MzU4NDVhZGE0YTgwNTA2NTk3Y2Y5YWMxOTg4NzQ4OTlmOWQwNmNhNTY0MzFj
|
15
|
-
NTQwOWM4YTU4OTgyMGViZjVhNDdlNzYxNTNmYTA1ZjYyM2Y2MTg=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f016cf0604451c59b9bb8ab37f45e7325c41f37a
|
4
|
+
data.tar.gz: 3963654f752bb5c51d291135edaa9799dbde6286
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3e5711346ed8a11adac3a0844874132d596e038bf7328549d1a52516145f94b35753c5a81f68840fed0278600f04924f8dc83a47e566c5e1f3f80d66b6bcb3c0
|
7
|
+
data.tar.gz: 50b0cb2b9d3d3ecb0d4a5bc5f8a5f056d35708dd6cc458ffe776ad2e5b0c6c9d8e45c3062aba9ad452fa7c8d7f702e2e9231ac67e4db8ac3d56eb610b5699da9
|
data/lib/wavefront/version.rb
CHANGED
data/lib/wavefront_object.rb
CHANGED
@@ -119,6 +119,12 @@ module Wavefront
|
|
119
119
|
end
|
120
120
|
|
121
121
|
private
|
122
|
+
def set_new_group name
|
123
|
+
@current_group = Group.new name
|
124
|
+
groups << @current_group
|
125
|
+
end
|
126
|
+
|
127
|
+
|
122
128
|
def parse!
|
123
129
|
while line = file.gets
|
124
130
|
components = line.split
|
@@ -145,12 +151,10 @@ module Wavefront
|
|
145
151
|
else
|
146
152
|
raise "current version of gem cannot parse triangles with #{components.size} verts!"
|
147
153
|
end
|
154
|
+
set_new_group 'default' if @current_group.nil?
|
148
155
|
triangles.each { |triangle| @current_group.add_triangle triangle }
|
149
156
|
when 'g'
|
150
|
-
|
151
|
-
@current_group = Group.new name
|
152
|
-
groups << @current_group
|
153
|
-
|
157
|
+
set_new_group components.first
|
154
158
|
when 's'
|
155
159
|
@current_group.set_smoothing_group components.first
|
156
160
|
when 'o'
|
@@ -174,9 +178,9 @@ module Wavefront
|
|
174
178
|
tex_coordinate = tex_index ? texture_coordinates[tex_index-1] : nil
|
175
179
|
normal = normals[normal_index-1]
|
176
180
|
|
177
|
-
triangle_vertices << Vertex.new(position, tex_coordinate, normal, position_index, tex_index, normal_index)
|
181
|
+
triangle_vertices << Wavefront::Vertex.new(position, tex_coordinate, normal, position_index, tex_index, normal_index)
|
178
182
|
end
|
179
|
-
Triangle.new triangle_vertices
|
183
|
+
Wavefront::Triangle.new triangle_vertices
|
180
184
|
end
|
181
185
|
end
|
182
186
|
end
|
data/wavefront.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wavefront
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Misha Conway
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Wavefront parser and exporter
|
14
14
|
email:
|
@@ -17,7 +17,7 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
-
- .gitignore
|
20
|
+
- ".gitignore"
|
21
21
|
- Gemfile
|
22
22
|
- LICENSE.txt
|
23
23
|
- README.md
|
@@ -42,17 +42,17 @@ require_paths:
|
|
42
42
|
- lib
|
43
43
|
required_ruby_version: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
|
-
- -
|
50
|
+
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0'
|
53
53
|
requirements: []
|
54
54
|
rubyforge_project:
|
55
|
-
rubygems_version: 2.
|
55
|
+
rubygems_version: 2.2.1
|
56
56
|
signing_key:
|
57
57
|
specification_version: 4
|
58
58
|
summary: Wavefront parser and exporter
|