1 | <?php |
||
29 | class Camera extends Entity implements CameraPrimitiveIF |
||
30 | { |
||
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 | 7 | public function init() |
|
50 | |||
51 | /** |
||
52 | * Set defaults |
||
53 | * |
||
54 | * {@inheritdoc} |
||
55 | * |
||
56 | * @return void |
||
57 | */ |
||
58 | 7 | public function defaults() |
|
61 | |||
62 | /** |
||
63 | * camera.active |
||
64 | * |
||
65 | * {@inheritdoc} |
||
66 | * |
||
67 | * @param bool $active |
||
68 | * @return CameraPrimitiveIF |
||
69 | */ |
||
70 | 1 | public function active(bool $active = false): CameraPrimitiveIF |
|
78 | |||
79 | /** |
||
80 | * camera.far |
||
81 | * |
||
82 | * {@inheritdoc} |
||
83 | * |
||
84 | * @param int|float $far |
||
85 | * @return CameraPrimitiveIF |
||
86 | */ |
||
87 | 7 | public function far(float $far = 10000): CameraPrimitiveIF |
|
95 | |||
96 | /** |
||
97 | * camera.fov |
||
98 | * |
||
99 | * {@inheritdoc} |
||
100 | * |
||
101 | * @param int|float $fov |
||
102 | * @return CameraPrimitiveIF |
||
103 | */ |
||
104 | 7 | public function fov(float $fov = 80): CameraPrimitiveIF |
|
112 | |||
113 | /** |
||
114 | * look-controls.enabled |
||
115 | * |
||
116 | * {@inheritdoc} |
||
117 | * |
||
118 | * @param bool $look_controls |
||
119 | * @return CameraPrimitiveIF |
||
120 | */ |
||
121 | 7 | public function lookControls(bool $look_controls = true): CameraPrimitiveIF |
|
129 | |||
130 | /** |
||
131 | * camera.near |
||
132 | * |
||
133 | * {@inheritdoc} |
||
134 | * |
||
135 | * @param float $near |
||
136 | * @return CameraPrimitiveIF |
||
137 | */ |
||
138 | 4 | public function near(float $near = 0.5): CameraPrimitiveIF |
|
146 | |||
147 | /** |
||
148 | * wasd-controls.enabled |
||
149 | * |
||
150 | * {@inheritdoc} |
||
151 | * |
||
152 | * @param bool $wasd_controls |
||
153 | * @return CameraPrimitiveIF |
||
154 | */ |
||
155 | 7 | public function wasdControls(bool $wasd_controls = true): CameraPrimitiveIF |
|
163 | |||
164 | /** |
||
165 | * camera.zoom |
||
166 | * |
||
167 | * {@inheritdoc} |
||
168 | * |
||
169 | * @param int|float $zoom |
||
170 | * @return CameraPrimitiveIF |
||
171 | */ |
||
172 | 1 | public function zoom(float $zoom = 1): CameraPrimitiveIF |
|
180 | |||
181 | /** |
||
182 | * Camera child cursor entity |
||
183 | * |
||
184 | * @return \AframeVR\Interfaces\Core\Components\CursorCMPTIF |
||
|
|||
185 | */ |
||
186 | 1 | public function cursor() |
|
193 | } |
||
194 | |||
195 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.