1 | <?php |
||
29 | class Light extends Entity implements EntityInterface |
||
30 | { |
||
31 | |||
32 | /** |
||
33 | * Init <a-light> |
||
34 | * |
||
35 | * The light primitive adjusts the lighting setup of the scene. It is an entity that maps attributes to properties |
||
36 | * of the light component. |
||
37 | * |
||
38 | * @return void |
||
39 | */ |
||
40 | 1 | public function reset() |
|
46 | |||
47 | /** |
||
48 | * light.angle |
||
49 | * |
||
50 | * @param int|float $angle |
||
51 | * @return self |
||
|
|||
52 | */ |
||
53 | public function angle(float $angle = 60): self |
||
58 | |||
59 | /** |
||
60 | * light.color |
||
61 | * |
||
62 | * @param string $color |
||
63 | * @return self |
||
64 | */ |
||
65 | public function color(string $color = '#fff'): EntityInterface |
||
70 | |||
71 | /** |
||
72 | * light.decay |
||
73 | * |
||
74 | * @param int $decay |
||
75 | * @return self |
||
76 | */ |
||
77 | public function decay(int $decay = 1): self |
||
82 | |||
83 | /** |
||
84 | * light.distance |
||
85 | * |
||
86 | * @param float $distance |
||
87 | * @return self |
||
88 | */ |
||
89 | public function distance(float $distance = 0.0): self |
||
94 | |||
95 | /** |
||
96 | * light.exponent |
||
97 | * |
||
98 | * @param float $exponent |
||
99 | * @return self |
||
100 | */ |
||
101 | public function exponent(float $exponent = 10.0): self |
||
106 | |||
107 | /** |
||
108 | * light.groundColor |
||
109 | * |
||
110 | * @param string $ground_color |
||
111 | * @return self |
||
112 | */ |
||
113 | public function groundColor(string $ground_color = '#fff'): self |
||
118 | |||
119 | /** |
||
120 | * light.intensity |
||
121 | * |
||
122 | * @param float $intensity |
||
123 | * @return self |
||
124 | */ |
||
125 | public function intensity(float $intensity = 1.0): self |
||
130 | |||
131 | /** |
||
132 | * light.type |
||
133 | * |
||
134 | * @param string $type |
||
135 | * @return self |
||
136 | */ |
||
137 | public function type(string $type = 'directional'): self |
||
142 | } |
||
143 |
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.