1 | <?php |
||
29 | class Flat extends ShaderAbstract implements ShaderInterface |
||
30 | { |
||
31 | /** |
||
32 | * Shader |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $shader = 'flat'; |
||
37 | |||
38 | /** |
||
39 | * Base diffuse color. |
||
40 | * |
||
41 | * @var string $color |
||
42 | */ |
||
43 | protected $color = '#fff'; |
||
44 | |||
45 | /** |
||
46 | * Whether or not material is affected by fog. |
||
47 | * |
||
48 | * @var string $fog |
||
49 | */ |
||
50 | protected $fog = 'true'; |
||
51 | |||
52 | /** |
||
53 | * Height of video (in pixels), if defining a video texture. |
||
54 | * |
||
55 | * @var int $height |
||
56 | */ |
||
57 | protected $height = 360; |
||
58 | |||
59 | /** |
||
60 | * Image or video texture map. |
||
61 | * Can either be a selector to an <img> or <video>, or an inline URL. |
||
62 | * |
||
63 | * @var string|null $src |
||
64 | */ |
||
65 | protected $src = null; |
||
66 | |||
67 | /** |
||
68 | * Width of video (in pixels), if defining a video texture. |
||
69 | * |
||
70 | * @var int $width |
||
71 | */ |
||
72 | protected $width = 640; |
||
73 | |||
74 | /** |
||
75 | * Set shader defaults |
||
76 | * |
||
77 | * @return void |
||
78 | */ |
||
79 | 1 | public function defaults() |
|
87 | |||
88 | /** |
||
89 | * Base diffuse color |
||
90 | * |
||
91 | * @param string $color |
||
92 | */ |
||
93 | 7 | public function color(string $color) |
|
98 | |||
99 | /** |
||
100 | * Whether or not material is affected by fog. |
||
101 | * |
||
102 | * @param bool $fog |
||
103 | */ |
||
104 | 1 | public function fog(bool $fog) |
|
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) |
|
120 | |||
121 | /** |
||
122 | * How many times a texture (defined by src) repeats in the X and Y direction. |
||
123 | * |
||
124 | * @param null|string $src |
||
125 | */ |
||
126 | 1 | public function src(string $src = null) |
|
131 | |||
132 | /** |
||
133 | * Width of video (in pixels), if defining a video texture. |
||
134 | * |
||
135 | * @param int $width |
||
136 | */ |
||
137 | 1 | public function width(int $width) |
|
142 | } |
||
143 |