From ba447583c74d44c6b07c5409918207157f921efe Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Mon, 9 Oct 2023 14:46:09 -0300 Subject: feat Render sprite in a 3D position --- test/src/mode/demo.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/src/mode') 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 -- cgit v1.2.3