1 | <?php |
||
41 | trait Primitives |
||
42 | { |
||
43 | |||
44 | /** |
||
45 | * Aframe Document Object Model |
||
46 | * |
||
47 | * @var \AframeVR\Core\DOM\AframeDOMDocument |
||
48 | */ |
||
49 | protected $aframeDomObj; |
||
50 | |||
51 | /** |
||
52 | * Sphere primitives |
||
53 | * |
||
54 | * @var array |
||
55 | */ |
||
56 | protected $spheres = array(); |
||
57 | |||
58 | /** |
||
59 | * Box primitives |
||
60 | * |
||
61 | * @var array |
||
62 | */ |
||
63 | protected $boxes = array(); |
||
64 | |||
65 | /** |
||
66 | * Cylinder primitives |
||
67 | * |
||
68 | * @var array |
||
69 | */ |
||
70 | protected $cylinders = array(); |
||
71 | |||
72 | /** |
||
73 | * Plane primitives |
||
74 | * |
||
75 | * @var array |
||
76 | */ |
||
77 | protected $planes = array(); |
||
78 | |||
79 | /** |
||
80 | * Camera primitives |
||
81 | * |
||
82 | * @var array |
||
83 | */ |
||
84 | protected $cameras = array(); |
||
85 | |||
86 | /** |
||
87 | * collada-model primitives |
||
88 | * |
||
89 | * @var array |
||
90 | */ |
||
91 | protected $collada_models = array(); |
||
92 | |||
93 | /** |
||
94 | * |
||
95 | * @var \AframeVR\Extras\Primitives\Sky $sky |
||
96 | */ |
||
97 | protected $sky; |
||
98 | |||
99 | /** |
||
100 | * |
||
101 | * @var \AframeVR\Extras\Primitives\Videosphere $videosphere |
||
102 | */ |
||
103 | protected $videosphere; |
||
104 | |||
105 | |||
106 | /** |
||
107 | * |
||
108 | * @var array |
||
109 | */ |
||
110 | protected $images = array(); |
||
111 | |||
112 | /** |
||
113 | * |
||
114 | * @var lights |
||
115 | */ |
||
116 | protected $lights = array(); |
||
117 | |||
118 | /** |
||
119 | * |
||
120 | * @var videos |
||
121 | */ |
||
122 | protected $videos = array(); |
||
123 | |||
124 | /** |
||
125 | * A-Frame Primitive box |
||
126 | * |
||
127 | * @param string $id |
||
128 | * @return Entity |
||
129 | */ |
||
130 | 11 | public function box(string $id = 'untitled'): Entity |
|
134 | |||
135 | /** |
||
136 | * A-Frame Primitive sphere |
||
137 | * |
||
138 | * @param string $id |
||
139 | * @return Entity |
||
140 | */ |
||
141 | 7 | public function sphere(string $id = 'untitled'): Entity |
|
145 | |||
146 | /** |
||
147 | * A-Frame Primitive cylinder |
||
148 | * |
||
149 | * @param string $id |
||
150 | * @return Entity |
||
151 | */ |
||
152 | 7 | public function cylinder(string $id = 'untitled'): Entity |
|
156 | |||
157 | /** |
||
158 | * A-Frame Primitive plane |
||
159 | * |
||
160 | * @param string $id |
||
161 | * @return Entity |
||
162 | */ |
||
163 | 7 | public function plane(string $id = 'untitled'): Entity |
|
167 | |||
168 | /** |
||
169 | * A-Frame Primitive camera |
||
170 | * |
||
171 | * @param string $id |
||
172 | * @return Entity |
||
173 | */ |
||
174 | 6 | public function camera(string $id = 'untitled'): Entity |
|
178 | |||
179 | /** |
||
180 | * A-Frame Primitive collada-model |
||
181 | * |
||
182 | * @param string $id |
||
183 | * @return Entity |
||
184 | */ |
||
185 | 3 | public function colladaModel(string $id = 'untitled'): Entity |
|
189 | |||
190 | /** |
||
191 | * A-Frame Primitive image |
||
192 | * |
||
193 | * @param string $id |
||
194 | * @return Entity |
||
195 | */ |
||
196 | 1 | public function image(string $id = 'untitled'): Entity |
|
200 | |||
201 | /** |
||
202 | * A-Frame Primitive light |
||
203 | * |
||
204 | * @param string $id |
||
205 | * @return Entity |
||
206 | */ |
||
207 | 6 | public function light(string $id = 'untitled'): Entity |
|
211 | |||
212 | /** |
||
213 | * A-Frame Primitive video |
||
214 | * |
||
215 | * @param string $id |
||
216 | * @return Entity |
||
217 | */ |
||
218 | 3 | public function video(string $id = 'untitled'): Entity |
|
222 | |||
223 | /** |
||
224 | * A-Frame Primitive sky |
||
225 | * |
||
226 | * @return Entity |
||
227 | */ |
||
228 | 7 | public function sky(): Entity |
|
232 | |||
233 | /** |
||
234 | * A-Frame Primitive sky |
||
235 | * |
||
236 | * @return Entity |
||
237 | */ |
||
238 | 3 | public function videosphere(): Entity |
|
242 | |||
243 | /** |
||
244 | * Add all used primitevs to the scene |
||
245 | * |
||
246 | * @return void |
||
247 | */ |
||
248 | 10 | protected function preparePrimitives() |
|
264 | } |
||
265 |