1 | <?php |
||
34 | final class Assets |
||
35 | { |
||
36 | |||
37 | /** |
||
38 | * Array of mixins |
||
39 | * |
||
40 | * @var array |
||
41 | */ |
||
42 | protected $assets; |
||
43 | |||
44 | /** |
||
45 | * Set assets timeout attribute |
||
46 | * |
||
47 | * @var int |
||
48 | */ |
||
49 | protected $attr_timeout; |
||
50 | |||
51 | /** |
||
52 | * <a-scene><a-assets><audio> |
||
53 | * |
||
54 | * @param string $id |
||
55 | * @return \AframeVR\Interfaces\Core\Assets\AssetAudioInterface |
||
56 | */ |
||
57 | 1 | public function audio(string $id = 'untitled'): \AframeVR\Interfaces\Core\Assets\AssetAudioInterface |
|
61 | |||
62 | /** |
||
63 | * <a-scene><a-assets><img> |
||
64 | * |
||
65 | * @param string $id |
||
66 | * @return \AframeVR\Interfaces\Core\Assets\AssetImageInterface |
||
67 | */ |
||
68 | 1 | public function img(string $id = 'untitled'): \AframeVR\Interfaces\Core\Assets\AssetImageInterface |
|
72 | |||
73 | /** |
||
74 | * <a-scene><a-assets><a-asset-item> |
||
75 | * |
||
76 | * @param string $id |
||
77 | * @return \AframeVR\Interfaces\Core\Assets\AssetItemInterface |
||
78 | */ |
||
79 | 1 | public function item(string $id = 'untitled'): \AframeVR\Interfaces\Core\Assets\AssetItemInterface |
|
83 | |||
84 | /** |
||
85 | * <a-scene><a-assets><video> |
||
86 | * |
||
87 | * @param string $id |
||
88 | * @return \AframeVR\Interfaces\Core\Assets\AssetVideoInterface |
||
89 | */ |
||
90 | 1 | public function video(string $id = 'untitled'): \AframeVR\Interfaces\Core\Assets\AssetVideoInterface |
|
94 | |||
95 | /** |
||
96 | * Mixin which will be directly applied to element usin it |
||
97 | * |
||
98 | * A-Frame PHP does not create <a-mixin>. Instead it is appling |
||
99 | * mixin directly on element using this mixin. |
||
100 | * |
||
101 | * @param string $id |
||
102 | * @return \AframeVR\Interfaces\Core\Assets\MixinInterface |
||
103 | */ |
||
104 | 2 | public function mixin(string $id = 'untitled'): \AframeVR\Interfaces\Core\Assets\MixinInterface |
|
108 | |||
109 | /** |
||
110 | * Setting a timeout |
||
111 | * |
||
112 | * @param int $milliseconds |
||
113 | * @return Assets |
||
114 | */ |
||
115 | 1 | public function timeout(int $milliseconds = 3000) |
|
120 | |||
121 | /** |
||
122 | * Get all assets |
||
123 | * |
||
124 | * @return array|null |
||
125 | */ |
||
126 | 19 | public function getAssets() |
|
130 | } |
||
131 |