1 | <?php |
||
31 | class MaterialComponent extends ComponentAbstract implements MaterialCMPTIF |
||
32 | { |
||
33 | |||
34 | private $shaderObj; |
||
35 | |||
36 | /** |
||
37 | * Initialize Component |
||
38 | * |
||
39 | * {@inheritdoc} |
||
40 | * |
||
41 | * @return bool |
||
42 | */ |
||
43 | 35 | public function initializeComponent(): bool |
|
48 | |||
49 | /** |
||
50 | * Return DOM attribute contents |
||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | 3 | public function getDomAttributeString(): string |
|
59 | |||
60 | /** |
||
61 | * Material Shader |
||
62 | * |
||
63 | * {@inheritdoc} |
||
64 | * |
||
65 | * @param string $shader |
||
66 | * @throws BadShaderCallException |
||
67 | * @return object|null |
||
68 | */ |
||
69 | 16 | public function shader(string $shader = 'standard') |
|
84 | |||
85 | /** |
||
86 | * opacity |
||
87 | * |
||
88 | * {@inheritdoc} |
||
89 | * |
||
90 | * @param float $opacity |
||
91 | * @return void |
||
92 | */ |
||
93 | 8 | public function opacity(float $opacity = 1.0) |
|
97 | |||
98 | /** |
||
99 | * transparent |
||
100 | * |
||
101 | * {@inheritdoc} |
||
102 | * |
||
103 | * @param bool $transparent |
||
104 | * @return void |
||
105 | */ |
||
106 | 7 | public function transparent(bool $transparent = false) |
|
110 | |||
111 | /** |
||
112 | * depthTest |
||
113 | * |
||
114 | * {@inheritdoc} |
||
115 | * |
||
116 | * @param bool $depth_test |
||
117 | * @return void |
||
118 | */ |
||
119 | 1 | public function depthTest(bool $depth_test = true) |
|
123 | |||
124 | /** |
||
125 | * side |
||
126 | * |
||
127 | * {@inheritdoc} |
||
128 | * |
||
129 | * @param string $side |
||
130 | * @return void |
||
131 | */ |
||
132 | 1 | public function side(string $side = 'front') |
|
136 | |||
137 | /** |
||
138 | * Prepare Shader attributes |
||
139 | * |
||
140 | * @return void |
||
141 | */ |
||
142 | 3 | private function prepareShader() |
|
148 | } |
||
149 |