| 1 | <?php |
||
| 29 | class Video extends Entity implements EntityInterface |
||
| 30 | { |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Init <a-video> |
||
| 34 | * |
||
| 35 | * The video primitive displays a video on a flat plane as a texture. It is an entity that prescribes the geometry |
||
| 36 | * with its geometric primitive set to plane. |
||
| 37 | * |
||
| 38 | * @return void |
||
| 39 | */ |
||
| 40 | 2 | public function reset() |
|
| 41 | { |
||
| 42 | 2 | parent::reset(); |
|
| 43 | 2 | $this->attr('Material')->shader('flat'); |
|
| 44 | 2 | $this->color('#FFF'); |
|
| 45 | 2 | $this->attr('Material')->side('double'); |
|
| 46 | 2 | $this->attr('Material')->transparent(true); |
|
| 47 | |||
| 48 | 2 | $this->attr('Geometry')->primitive('plane'); |
|
| 49 | 2 | $this->height(1.75); |
|
| 50 | 2 | $this->width(3); |
|
| 51 | 2 | } |
|
| 52 | |||
| 53 | /** |
||
| 54 | * geometry.height |
||
| 55 | * |
||
| 56 | * @param float $height |
||
| 57 | * @return Video |
||
| 58 | */ |
||
| 59 | 2 | public function height(float $height) |
|
| 64 | |||
| 65 | /** |
||
| 66 | * geometry.width |
||
| 67 | * |
||
| 68 | * @param float $width |
||
| 69 | * @return Video |
||
| 70 | */ |
||
| 71 | 2 | public function width(float $width) |
|
| 76 | } |