diff options
author | Frederico Linhares <fred@linhares.blue> | 2023-10-09 14:46:09 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2023-10-09 15:58:14 -0300 |
commit | ba447583c74d44c6b07c5409918207157f921efe (patch) | |
tree | 56cd1c36a8e77540136c8871eb3b94f0adf37139 /test/src | |
parent | 8fa221cb60c19638d4ad0833965fee605593eea3 (diff) |
feat Render sprite in a 3D position
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/mode/demo.rb | 5 |
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 |