1 | <?php |
||
29 | class Standard extends ShaderAbstract implements ShaderInterface |
||
30 | { |
||
31 | |||
32 | /** |
||
33 | * Base diffuse color. |
||
34 | * |
||
35 | * @var string $color |
||
36 | */ |
||
37 | public $color = '#fff'; |
||
38 | |||
39 | /** |
||
40 | * Height of video (in pixels), if defining a video texture. |
||
41 | * |
||
42 | * @var int $height |
||
43 | */ |
||
44 | public $height = 360; |
||
45 | |||
46 | /** |
||
47 | * Environment cubemap texture for reflections. |
||
48 | * |
||
49 | * Can be a selector to or a comma-separated list of URLs. |
||
50 | * |
||
51 | * @var string|null $envMap |
||
52 | */ |
||
53 | public $envMap = null; |
||
54 | |||
55 | /** |
||
56 | * Whether or not material is affected by fog. |
||
57 | * |
||
58 | * @var string $fog |
||
59 | */ |
||
60 | public $fog = 'true'; |
||
61 | |||
62 | /** |
||
63 | * How metallic the material is from 0 to 1. |
||
64 | * |
||
65 | * @var float $metalness |
||
66 | */ |
||
67 | public $metalness = 0.5; |
||
68 | |||
69 | /** |
||
70 | * How many times a texture (defined by src) repeats in the X and Y direction. |
||
71 | * |
||
72 | * @var string $repeat |
||
73 | */ |
||
74 | public $repeat = '1 1'; |
||
75 | |||
76 | /** |
||
77 | * How rough the material is from 0 to 1. |
||
78 | * A rougher material will scatter |
||
79 | * reflected light in more directions than a smooth material. |
||
80 | * |
||
81 | * @var float $roughness |
||
82 | */ |
||
83 | public $roughness = 0.5; |
||
84 | |||
85 | /** |
||
86 | * Image or video texture map. |
||
87 | * Can either be a selector to an <img> or <video>, or an inline URL. |
||
88 | * |
||
89 | * @var string|null $src |
||
90 | */ |
||
91 | public $src = null; |
||
92 | |||
93 | /** |
||
94 | * Width of video (in pixels), if defining a video texture. |
||
95 | * |
||
96 | * @var int $width |
||
97 | */ |
||
98 | public $width = 640; |
||
99 | |||
100 | /** |
||
101 | * Base diffuse color |
||
102 | * |
||
103 | * @param string $color |
||
104 | */ |
||
105 | 8 | public function color(string $color = '#fff') |
|
109 | |||
110 | /** |
||
111 | * Height of video (in pixels), if defining a video texture. |
||
112 | * |
||
113 | * @param int $height |
||
114 | */ |
||
115 | 1 | public function height(int $height = 360) |
|
119 | |||
120 | /** |
||
121 | * envMap |
||
122 | * |
||
123 | * Environment cubemap texture for reflections. |
||
124 | * Can be a selector to or a comma-separated list of URLs. |
||
125 | * |
||
126 | * @param string|null $envMap |
||
127 | */ |
||
128 | 1 | public function envMap(string $envMap = null) |
|
132 | |||
133 | /** |
||
134 | * Whether or not material is affected by fog. |
||
135 | * |
||
136 | * @param bool $fog |
||
137 | */ |
||
138 | 1 | public function fog(bool $fog = true) |
|
142 | |||
143 | /** |
||
144 | * How metallic the material is from 0 to 1. |
||
145 | * |
||
146 | * @param float $metalness |
||
147 | */ |
||
148 | 6 | public function metalness(float $metalness = 0.5) |
|
152 | |||
153 | /** |
||
154 | * repeat |
||
155 | * |
||
156 | * @param float|int $x |
||
157 | * @param float|int $y |
||
158 | */ |
||
159 | 1 | public function repeat(float $x = 1, float $y = 1) |
|
163 | |||
164 | /** |
||
165 | * How rough the material is from 0 to 1 |
||
166 | * |
||
167 | * A rougher material will scatter reflected light in more directions than a smooth material. |
||
168 | * |
||
169 | * @param float $roughness |
||
170 | */ |
||
171 | 6 | public function roughness(float $roughness = 0.5) |
|
175 | |||
176 | /** |
||
177 | * How many times a texture (defined by src) repeats in the X and Y direction. |
||
178 | * |
||
179 | * @param string|null $src |
||
180 | */ |
||
181 | 7 | public function src(string $src = null) |
|
185 | |||
186 | /** |
||
187 | * Width of video (in pixels), if defining a video texture. |
||
188 | * |
||
189 | * @param int $width |
||
190 | */ |
||
191 | 1 | public function width(int $width = 360) |
|
195 | } |
||
196 |