From 78db82c0dac8db90a3de1004e5428f225947b2b9 Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Wed, 21 Sep 2022 13:57:31 -0300 Subject: feat Create View2D --- test/src/main.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/src/main.rb b/test/src/main.rb index 67ef80c..40a7c79 100644 --- a/test/src/main.rb +++ b/test/src/main.rb @@ -37,12 +37,12 @@ def init() $camera_rotation = CandyGear::Rotation3D.new(0.0, 0.0, 0.0); color = CandyGear::Vector3D.new(0.12, 0.12, 0.18); - $view1 = CandyGear::View.new(CandyGear::Vector4D.new(0, 0, 1280, 360)); - $view2 = CandyGear::View.new(CandyGear::Vector4D.new(0, 360, 1280, 360)); + $view1 = CandyGear::View2D.new(CandyGear::Vector4D.new(0, 0, 1280, 360)); + $view2 = CandyGear::View3D.new(CandyGear::Vector4D.new(0, 360, 1280, 360)); CandyGear.views = [$view1, $view2]; - $view1.camera_position = $camera_position; - $view1.camera_rotation = $camera_rotation; + $view2.camera_position = $camera_position; + $view2.camera_rotation = $camera_rotation; end def key_down(key) @@ -76,7 +76,7 @@ end def quit() = CandyGear.quit(); def tick() - $sprite.draw($view2, $sprite_position); + $view1.draw($sprite, $sprite_position); $instances_rotation.rotate(0.0, BOX_ROTATION_SPEED); $instances.each do |i| $model.draw(i, $instances_rotation); -- cgit v1.2.3