summaryrefslogtreecommitdiff
path: root/test/src/mode
diff options
context:
space:
mode:
authorFrederico Linhares <fred@linhares.blue>2023-10-09 14:46:09 -0300
committerFrederico Linhares <fred@linhares.blue>2023-10-09 15:58:14 -0300
commitba447583c74d44c6b07c5409918207157f921efe (patch)
tree56cd1c36a8e77540136c8871eb3b94f0adf37139 /test/src/mode
parent8fa221cb60c19638d4ad0833965fee605593eea3 (diff)
feat Render sprite in a 3D position
Diffstat (limited to 'test/src/mode')
-rw-r--r--test/src/mode/demo.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/src/mode/demo.rb b/test/src/mode/demo.rb
index a9781b6..67fa805 100644
--- a/test/src/mode/demo.rb
+++ b/test/src/mode/demo.rb
@@ -66,6 +66,10 @@ module Mode
mesh, texture, instance_positions[5], @instances_rotation)
]
+ 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_rotation = CandyGear::Rotation3D.new(0.0, 0.0, 0.0);
@@ -125,6 +129,7 @@ module Mode
@instances_rotation.rotate(0.0, BOX_ROTATION_SPEED);
@rectangle.draw_rectangle(@view1, @color);
@instances.each {_1.draw()};
+ @sprite_3d.draw();
end
end
end