Fixes camera inheritance.

This commit is contained in:
Felipe Martín 2013-05-31 18:26:14 +02:00
parent 9dad86f6ac
commit 20a378d7b6
1 changed files with 13 additions and 2 deletions

View File

@ -5,7 +5,18 @@ class Camera
_near: 1 _near: 1
_far: 1000 _far: 1000
class orthograpicCamera _position:
x: 0
y: 0
z: 0
move: (x, y, z) ->
@_position.x += x
@_position.y += y
@_position.z += z
@_self.position = @_position
class orthograpicCamera extends Camera
_self: null _self: null
_left: 0 _left: 0
_right: 0 _right: 0
@ -26,7 +37,7 @@ class orthograpicCamera
@_self = camera @_self = camera
class perspectiveCamera class perspectiveCamera extends Camera
_fov: 45 _fov: 45
_aspectRatio: 0 _aspectRatio: 0
_near: 1 _near: 1