NewOrthographic creates and returns a new orthographic camera with the specified parameters.
(aspect, near, far, size float32, axis Axis)
| 75 | |
| 76 | // NewOrthographic creates and returns a new orthographic camera with the specified parameters. |
| 77 | func 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. |
| 93 | func (c *Camera) Aspect() float32 { |