diff options
author | Frederico Linhares <fred@linhares.blue> | 2022-09-21 13:57:31 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2022-09-21 14:33:18 -0300 |
commit | 78db82c0dac8db90a3de1004e5428f225947b2b9 (patch) | |
tree | f6e6191a7974b2d15b92a9a67fab167bb330ca61 /test/src | |
parent | dafe4a4335f48ce4098935bdf0333beac2ded2ed (diff) |
feat Create View2D
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/main.rb | 10 |
1 files changed, 5 insertions, 5 deletions
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); |