1 | <?php |
||
30 | class Camera extends Entity implements CameraInterface |
||
31 | { |
||
32 | /** |
||
33 | * Init <a-box> |
||
34 | * |
||
35 | * The box primitive, formerly called <a-cube>, creates shapes such as boxes, cubes, or walls. |
||
36 | * It is an entity that prescribes the geometry with its geometric primitive set to box. |
||
37 | * |
||
38 | * {@inheritdoc} |
||
39 | * |
||
40 | * @return void |
||
41 | */ |
||
42 | 6 | public function init() |
|
48 | |||
49 | /** |
||
50 | * Set defaults |
||
51 | * |
||
52 | * {@inheritdoc} |
||
53 | * |
||
54 | * @return void |
||
55 | */ |
||
56 | 6 | public function defaults() |
|
59 | |||
60 | /** |
||
61 | * camera.active |
||
62 | * |
||
63 | * {@inheritdoc} |
||
64 | * |
||
65 | * @param bool $active |
||
66 | * @return CameraInterface |
||
67 | */ |
||
68 | 1 | public function active(bool $active = false): CameraInterface |
|
73 | |||
74 | /** |
||
75 | * camera.far |
||
76 | * |
||
77 | * {@inheritdoc} |
||
78 | * |
||
79 | * @param int|float $far |
||
80 | * @return CameraInterface |
||
81 | */ |
||
82 | 1 | public function far(float $far = 10000): CameraInterface |
|
87 | |||
88 | /** |
||
89 | * camera.fov |
||
90 | * |
||
91 | * {@inheritdoc} |
||
92 | * |
||
93 | * @param int|float $fov |
||
94 | * @return CameraInterface |
||
95 | */ |
||
96 | 1 | public function fov(float $fov = 10000): CameraInterface |
|
101 | |||
102 | /** |
||
103 | * look-controls.enabled |
||
104 | * |
||
105 | * {@inheritdoc} |
||
106 | * |
||
107 | * @param bool $look_controls |
||
108 | * @return CameraInterface |
||
109 | */ |
||
110 | 6 | public function lookControls(bool $look_controls = true): CameraInterface |
|
115 | |||
116 | /** |
||
117 | * camera.near |
||
118 | * |
||
119 | * {@inheritdoc} |
||
120 | * |
||
121 | * @param int|float $near |
||
|
|||
122 | * @return CameraInterface |
||
123 | */ |
||
124 | 4 | public function near(float $near = 0.5): CameraInterface |
|
129 | |||
130 | /** |
||
131 | * wasd-controls.enabled |
||
132 | * |
||
133 | * {@inheritdoc} |
||
134 | * |
||
135 | * @param bool $wasd_controls |
||
136 | * @return CameraInterface |
||
137 | */ |
||
138 | 6 | public function wasdControls(bool $wasd_controls = true): CameraInterface |
|
143 | |||
144 | /** |
||
145 | * camera.zoom |
||
146 | * |
||
147 | * {@inheritdoc} |
||
148 | * |
||
149 | * @param int|float $zoom |
||
150 | * @return CameraInterface |
||
151 | */ |
||
152 | public function zoom(float $zoom = 1): CameraInterface |
||
157 | } |
||
158 | |||
159 |