1 | <?php |
||
36 | trait MeshAttributes |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * Load component for this entity |
||
41 | * |
||
42 | * @param string $component_name |
||
43 | * @throws \AframeVR\Core\Exceptions\BadComponentCallException |
||
44 | * @return object|null |
||
45 | */ |
||
46 | abstract public function component(string $component_name); |
||
47 | |||
48 | /** |
||
49 | * material.color |
||
50 | * |
||
51 | * @param string $color |
||
52 | * @return EntityInterface |
||
53 | */ |
||
54 | 8 | public function color(string $color): EntityInterface |
|
61 | |||
62 | /** |
||
63 | * material.metalness |
||
64 | * |
||
65 | * @param int|float $metalness |
||
|
|||
66 | * @return EntityInterface |
||
67 | */ |
||
68 | 2 | public function metalness(float $metalness): EntityInterface |
|
75 | |||
76 | /** |
||
77 | * material.opacity |
||
78 | * |
||
79 | * @param float $opacity |
||
80 | * @return EntityInterface |
||
81 | */ |
||
82 | 2 | public function opacity(float $opacity): EntityInterface |
|
87 | |||
88 | /** |
||
89 | * material.repeat |
||
90 | * |
||
91 | * @param float $x |
||
92 | * @param float $y |
||
93 | * |
||
94 | * @return EntityInterface |
||
95 | */ |
||
96 | 2 | public function repeat(float $x, float $y): EntityInterface |
|
101 | |||
102 | /** |
||
103 | * material.roughness |
||
104 | * |
||
105 | * @param float $roughness |
||
106 | * @return EntityInterface |
||
107 | */ |
||
108 | 2 | public function roughness(float $roughness): EntityInterface |
|
115 | |||
116 | /** |
||
117 | * material.shader |
||
118 | * |
||
119 | * @param string $shader |
||
120 | * @return EntityInterface |
||
121 | */ |
||
122 | 2 | public function shader($shader): EntityInterface |
|
127 | |||
128 | |||
129 | /** |
||
130 | * material.src |
||
131 | * |
||
132 | * @param null|string $src |
||
133 | * @return EntityInterface |
||
134 | */ |
||
135 | 2 | public function src(string $src = null): EntityInterface |
|
142 | |||
143 | /** |
||
144 | * material.transparent |
||
145 | * |
||
146 | * @param bool $transparent |
||
147 | * @return EntityInterface |
||
148 | */ |
||
149 | 4 | public function transparent(bool $transparent = false): EntityInterface |
|
154 | } |
||
155 |