summaryrefslogtreecommitdiff
path: root/test/src/mode
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/mode')
-rw-r--r--test/src/mode/demo.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/src/mode/demo.rb b/test/src/mode/demo.rb
index a821d65..65ea52a 100644
--- a/test/src/mode/demo.rb
+++ b/test/src/mode/demo.rb
@@ -21,6 +21,7 @@ module Mode
def initialize()
texture = CandyGear::Texture.from_image("textures/color_texture.qoi");
mesh = CandyGear::StaticMesh.new("meshes/cube.cgmesh");
+ skeletal_mesh = CandyGear::SkeletalMesh.new("meshes/cuboid.cgmesh");
font = CandyGear::Font.new("/usr/share/fonts/TTF/HanaMinA.ttf", 30);
japanese_text = CandyGear::Texture.from_text(
font, "こんにちは世界!");
@@ -66,11 +67,17 @@ module Mode
mesh, texture, instance_positions[5], @instances_orientation)
]
+ skeletal_mesh_position = CandyGear::Vector3D.new(0.0, 0.0, 0.0);
+ skeletal_mesh_orientation = CandyGear::Orientation3D.new(0.0, 0.0, 0.0);
+ @skeletal_model = CandyGear::SkeletalModel.new(
+ skeletal_mesh, texture, skeletal_mesh_position,
+ skeletal_mesh_orientation);
+
sprite_3d_position = CandyGear::Vector3D.new(0.0, 0.0, 0.0);
@sprite_3d = CandyGear::Sprite3D.new(
@sprite, sprite_3d_position, 1.0, 1.0);
- @camera_position = CandyGear::Vector3D.new(0.0, 0.0, 0.0);
+ @camera_position = CandyGear::Vector3D.new(0.0, 0.0, 20.0);
@camera_orientation = CandyGear::Orientation3D.new(0.0, 0.0, 0.0);
color = CandyGear::Vector3D.new(0.12, 0.12, 0.18);
@@ -129,7 +136,8 @@ module Mode
@instances_orientation.rotate(0.0, BOX_ROTATION_SPEED, 0.0);
@rectangle.draw_rectangle(@view1, @color);
@instances.each {_1.draw()};
- @sprite_3d.draw();
+ @skeletal_model.draw();
+ # @sprite_3d.draw();
end
end
end