MCPcopy
hub / github.com/g3n/engine / NewOrthographic

Function NewOrthographic

camera/camera.go:77–90  ·  view source on GitHub ↗

NewOrthographic creates and returns a new orthographic camera with the specified parameters.

(aspect, near, far, size float32, axis Axis)

Source from the content-addressed store, hash-verified

75
76// NewOrthographic creates and returns a new orthographic camera with the specified parameters.
77func NewOrthographic(aspect, near, far, size float32, axis Axis) *Camera {
78
79 c := new(Camera)
80 c.Node.Init(c)
81 c.aspect = aspect
82 c.near = near
83 c.far = far
84 c.axis = axis
85 c.proj = Orthographic
86 c.fov = 60
87 c.size = size
88 c.projChanged = true
89 return c
90}
91
92// Aspect returns the camera aspect ratio.
93func (c *Camera) Aspect() float32 {

Callers 1

LoadCameraMethod · 0.92

Calls 1

InitMethod · 0.45

Tested by

no test coverage detected