shattered_pack 0.5.0.1 → 0.5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/shattered_view/base.rb +5 -5
- metadata +3 -3
data/lib/shattered_view/base.rb
CHANGED
@@ -156,7 +156,7 @@ module ShatteredView #:nodoc:
|
|
156
156
|
end
|
157
157
|
|
158
158
|
#Create a light and add it to the lights array
|
159
|
-
def create_light(name, options)
|
159
|
+
def create_light(name, options={})
|
160
160
|
light_number = @lights.length
|
161
161
|
light = scene_manager.create_light("#{self.to_s}.light(#{light_number})")
|
162
162
|
@lights << light
|
@@ -164,19 +164,19 @@ module ShatteredView #:nodoc:
|
|
164
164
|
end
|
165
165
|
|
166
166
|
#Creates a mesh and adds it to the mesh array
|
167
|
-
def create_mesh(name, options)
|
168
|
-
|
167
|
+
def create_mesh(name, options={})
|
168
|
+
mesh = Ogre::MeshInstance.new(node, scene_manager, name.to_s+".mesh")
|
169
169
|
@meshes << mesh
|
170
170
|
return mesh
|
171
171
|
end
|
172
172
|
|
173
173
|
#Create a node using the view's node as a parent
|
174
|
-
def create_node(name, options)
|
174
|
+
def create_node(name, options={})
|
175
175
|
node.create_child_scene_node
|
176
176
|
end
|
177
177
|
|
178
178
|
#Create a material and add it to the materials array
|
179
|
-
def create_material(name, options)
|
179
|
+
def create_material(name, options={})
|
180
180
|
@materials ||= {}
|
181
181
|
#pull the rmaterial from any resource path
|
182
182
|
file = Resources.instance.find_file("#{options[:template]}.rmaterial")
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.2
|
3
3
|
specification_version: 1
|
4
4
|
name: shattered_pack
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.5.0.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.5.0.2
|
7
|
+
date: 2007-07-14 00:00:00 -05:00
|
8
8
|
summary: "Shattered Pack: The combination of model/view/controllers and the domain specific language for each."
|
9
9
|
require_paths:
|
10
10
|
- lib
|