1 | <?php |
||
35 | trait Primitives |
||
36 | { |
||
37 | |||
38 | protected $spheres; |
||
39 | |||
40 | protected $boxes; |
||
41 | |||
42 | protected $cylinders; |
||
43 | |||
44 | protected $planes; |
||
45 | |||
46 | protected $sky; |
||
47 | |||
48 | /** |
||
49 | * A-Frame Primitive box |
||
50 | * |
||
51 | * @param string $name |
||
52 | * @return Entity |
||
53 | */ |
||
54 | 9 | public function box(string $name = 'untitled'): Entity |
|
58 | |||
59 | /** |
||
60 | * A-Frame Primitive sphere |
||
61 | * |
||
62 | * @param string $name |
||
63 | * @return Entity |
||
64 | */ |
||
65 | 5 | public function sphere(string $name = 'untitled'): Entity |
|
69 | |||
70 | /** |
||
71 | * A-Frame Primitive cylinder |
||
72 | * |
||
73 | * @param string $name |
||
74 | * @return Entity |
||
75 | */ |
||
76 | 5 | public function cylinder(string $name = 'untitled'): Entity |
|
80 | |||
81 | /** |
||
82 | * A-Frame Primitive plane |
||
83 | * |
||
84 | * @param string $name |
||
85 | * @return Entity |
||
86 | */ |
||
87 | 5 | public function plane(string $name = 'untitled'): Entity |
|
91 | |||
92 | /** |
||
93 | * A-Frame Primitive sky |
||
94 | * |
||
95 | * @return Entity |
||
96 | */ |
||
97 | 5 | public function sky(): Entity |
|
101 | |||
102 | /** |
||
103 | * Add all used primitevs to the scene |
||
104 | * |
||
105 | * @param \DOMDocument $aframe_dom |
||
106 | * @param \DOMElement $scene |
||
107 | */ |
||
108 | 6 | protected function DOMAppendPrimitives(\DOMDocument &$aframe_dom, \DOMElement &$scene) |
|
144 | } |
||
145 |