class Prism::Camera
- Prism::Camera
- Crash::Component
- Reference
- Object
Included Modules
Defined in:
prism/camera.crConstructors
- .new(fov : Angle, aspect : Float32, z_near : Float32, z_far : Float32)
-
.new
Creates a camera with default values
Instance Method Summary
-
#aspect=(aspect_ratio : Float32)
changes the aspect ratio
-
#get_projection : Matrix4f
Returns the projection matrix.
-
#input!(tick : RenderLoop::Tick, input : RenderLoop::Input, entity : Crash::Entity)
Receives input events from the
InputSubscriber
-
#sync_aspect_ratio=(sync_aspect_ratio : Bool)
Controls whether or not the camera should automatically sync it's aspect ratio with the window size.
Instance methods inherited from module Prism::InputReceiver
input!(tick : RenderLoop::Tick, input : RenderLoop::Input, entity : Crash::Entity)
input!
Constructor Detail
Instance Method Detail
Returns the projection matrix. This represents the projection of entities on the screen. In other words, things get bigger or smaller as they get closing to the screen or farther away.
def input!(tick : RenderLoop::Tick, input : RenderLoop::Input, entity : Crash::Entity)
#
Description copied from module Prism::InputReceiver
Receives input events from the InputSubscriber
def sync_aspect_ratio=(sync_aspect_ratio : Bool)
#
Controls whether or not the camera should automatically sync it's aspect ratio with the window size.