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 | 7 | */ |
|
40 | public function reset() |
||
46 | |||
47 | 7 | /** |
|
48 | * light.angle |
||
49 | * |
||
50 | * @param int|float $angle |
||
51 | * @return self |
||
52 | */ |
||
53 | public function angle(float $angle = 60) |
||
58 | |||
59 | 1 | /** |
|
60 | 1 | * light.color |
|
61 | * |
||
62 | * @param string $color |
||
63 | * @return self |
||
64 | */ |
||
65 | public function color(string $color = '#fff'): EntityInterface |
||
70 | |||
71 | 4 | /** |
|
72 | * light.decay |
||
73 | 4 | * |
|
74 | 4 | * @param int $decay |
|
75 | * @return self |
||
76 | */ |
||
77 | public function decay(int $decay = 1) |
||
82 | |||
83 | /** |
||
84 | * light.distance |
||
85 | 1 | * |
|
86 | * @param float $distance |
||
87 | 1 | * @return self |
|
88 | 1 | */ |
|
89 | public function distance(float $distance = 0.0) |
||
94 | |||
95 | /** |
||
96 | * light.exponent |
||
97 | * |
||
98 | * @param float $exponent |
||
99 | 4 | * @return self |
|
100 | */ |
||
101 | 4 | public function exponent(float $exponent = 10.0) |
|
106 | |||
107 | /** |
||
108 | * light.groundColor |
||
109 | * |
||
110 | * @param string $ground_color |
||
111 | * @return self |
||
112 | */ |
||
113 | 1 | public function groundColor(string $ground_color = '#fff') |
|
118 | |||
119 | /** |
||
120 | * light.intensity |
||
121 | * |
||
122 | * @param float $intensity |
||
123 | * @return self |
||
124 | */ |
||
125 | public function intensity(float $intensity = 1.0) |
||
130 | 1 | ||
131 | /** |
||
132 | * light.penumbra |
||
133 | * |
||
134 | * @param float $penumbra |
||
135 | * @return self |
||
136 | */ |
||
137 | public function penumbra(float $penumbra) |
||
142 | |||
143 | 1 | ||
144 | 1 | /** |
|
145 | * light.type |
||
146 | * |
||
147 | * @param string $type |
||
148 | * @return self |
||
149 | */ |
||
150 | public function type(string $type = 'directional') |
||
155 | } |
||
156 |