Module gust_render::view

source ·
Expand description

View system. A view is a point of view on a 2D scene. It’s like a camera filming paper. A view should be defined by sizes and left and down.

use gust::view::View;
use gust::window::Window;
use gust::rect::Rect;

let window = Window::new(1920, 1080, "View mod");
let view = View::from(Rect::new(500.0, 500.0, 10.0, 10.0));
let view2 = View::from(Rect::new(0.0, 0.0, 500.0, 500.0))

Structs

A View is a 2D camera. It’s the screen viewport. You can make multiple views and use them as Minimap, 2nd player screen etc… The view is attached to a gust::Window.