1 | <?php |
||
29 | class Flat extends ShaderAbstract implements ShaderInterface |
||
30 | { |
||
31 | |||
32 | /** |
||
33 | * Base diffuse color. |
||
34 | * |
||
35 | * @var string $color |
||
36 | */ |
||
37 | public $color = '#fff'; |
||
38 | |||
39 | /** |
||
40 | * Whether or not material is affected by fog. |
||
41 | * |
||
42 | * @var string $fog |
||
43 | */ |
||
44 | public $fog = 'true'; |
||
45 | |||
46 | /** |
||
47 | * Height of video (in pixels), if defining a video texture. |
||
48 | * |
||
49 | * @var int $height |
||
50 | */ |
||
51 | public $height = 360; |
||
52 | |||
53 | /** |
||
54 | * How many times a texture (defined by src) repeats in the X and Y direction. |
||
55 | * |
||
56 | * @var string $repeat |
||
57 | */ |
||
58 | public $repeat = '1 1'; |
||
59 | |||
60 | /** |
||
61 | * Image or video texture map. |
||
62 | * Can either be a selector to an <img> or <video>, or an inline URL. |
||
63 | * |
||
64 | * @var string|null $src |
||
65 | */ |
||
66 | public $src = null; |
||
67 | |||
68 | /** |
||
69 | * Width of video (in pixels), if defining a video texture. |
||
70 | * |
||
71 | * @var int $width |
||
72 | */ |
||
73 | public $width = 640; |
||
74 | |||
75 | /** |
||
76 | * Base diffuse color |
||
77 | * |
||
78 | * @param string $color |
||
79 | */ |
||
80 | 1 | public function color(string $color = '#fff') |
|
84 | |||
85 | /** |
||
86 | * Whether or not material is affected by fog. |
||
87 | * |
||
88 | * @param bool $fog |
||
89 | */ |
||
90 | 1 | public function fog(bool $fog = true) |
|
94 | |||
95 | /** |
||
96 | * Height of video (in pixels), if defining a video texture. |
||
97 | * |
||
98 | * @param int $height |
||
99 | */ |
||
100 | 1 | public function height(int $height = 360) |
|
104 | |||
105 | /** |
||
106 | * |
||
107 | * @param int|float $x |
||
108 | * @param int|float $y |
||
109 | */ |
||
110 | 1 | public function repeat(float $x = 1, float $y = 1) |
|
114 | |||
115 | /** |
||
116 | * How many times a texture (defined by src) repeats in the X and Y direction. |
||
117 | * |
||
118 | * @param null|string $src |
||
119 | */ |
||
120 | 1 | public function src(string $src = null) |
|
124 | |||
125 | /** |
||
126 | * Width of video (in pixels), if defining a video texture. |
||
127 | * |
||
128 | * @param int $width |
||
129 | */ |
||
130 | 1 | public function width(int $width = 360) |
|
134 | } |
||
135 |