@qispace/vue3-player 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/README.md +18 -0
  2. package/dist/components/apartmentChooser/QiApartmentChooser.vue.d.ts +4 -0
  3. package/dist/components/apartmentChooser/QiApartmentChooser.vue.d.ts.map +1 -0
  4. package/dist/components/apartmentChooser/QiApartmentChooserNavigation.vue.d.ts +4 -0
  5. package/dist/components/apartmentChooser/QiApartmentChooserNavigation.vue.d.ts.map +1 -0
  6. package/dist/components/apartmentChooser/QiApartmentChooserRaster.vue.d.ts +4 -0
  7. package/dist/components/apartmentChooser/QiApartmentChooserRaster.vue.d.ts.map +1 -0
  8. package/dist/components/apartmentChooser/QiApartmentChooserRotator.vue.d.ts +4 -0
  9. package/dist/components/apartmentChooser/QiApartmentChooserRotator.vue.d.ts.map +1 -0
  10. package/dist/components/apartmentChooser/QiApartmentChooserSvg.vue.d.ts +4 -0
  11. package/dist/components/apartmentChooser/QiApartmentChooserSvg.vue.d.ts.map +1 -0
  12. package/dist/components/buildingPicker/QiBuildingChooser.vue.d.ts +3 -0
  13. package/dist/components/buildingPicker/QiBuildingChooser.vue.d.ts.map +1 -0
  14. package/dist/components/buildingPicker/QiBuildingChooserRaster.vue.d.ts +4 -0
  15. package/dist/components/buildingPicker/QiBuildingChooserRaster.vue.d.ts.map +1 -0
  16. package/dist/components/buildingPicker/QiBuildingChooserRasterOverlay.vue.d.ts +4 -0
  17. package/dist/components/buildingPicker/QiBuildingChooserRasterOverlay.vue.d.ts.map +1 -0
  18. package/dist/components/buildingPicker/QiBuildingChooserSceneImageStack.vue.d.ts +4 -0
  19. package/dist/components/buildingPicker/QiBuildingChooserSceneImageStack.vue.d.ts.map +1 -0
  20. package/dist/components/buildingPicker/QiBuildingChooserSunSimControl.vue.d.ts +5 -0
  21. package/dist/components/buildingPicker/QiBuildingChooserSunSimControl.vue.d.ts.map +1 -0
  22. package/dist/components/buildingPicker/QiBuildingChooserSvg.vue.d.ts +4 -0
  23. package/dist/components/buildingPicker/QiBuildingChooserSvg.vue.d.ts.map +1 -0
  24. package/dist/components/index.d.ts +4 -0
  25. package/dist/components/shared/QiFloatingCard.vue.d.ts +4 -0
  26. package/dist/components/shared/QiFloatingCard.vue.d.ts.map +1 -0
  27. package/dist/components/shared/QiHoverProbe.vue.d.ts +4 -0
  28. package/dist/components/shared/QiHoverProbe.vue.d.ts.map +1 -0
  29. package/dist/components/shared/QiNorthDirection.vue.d.ts +3 -0
  30. package/dist/components/shared/QiNorthDirection.vue.d.ts.map +1 -0
  31. package/dist/components/shared/QiZoomBox.vue.d.ts +4 -0
  32. package/dist/components/shared/QiZoomBox.vue.d.ts.map +1 -0
  33. package/dist/components/virtualTourV2/Disclaimer.vue.d.ts +4 -0
  34. package/dist/components/virtualTourV2/Disclaimer.vue.d.ts.map +1 -0
  35. package/dist/components/virtualTourV2/FullScreenButton.vue.d.ts +3 -0
  36. package/dist/components/virtualTourV2/FullScreenButton.vue.d.ts.map +1 -0
  37. package/dist/components/virtualTourV2/ManualSlideShow.vue.d.ts +4 -0
  38. package/dist/components/virtualTourV2/ManualSlideShow.vue.d.ts.map +1 -0
  39. package/dist/components/virtualTourV2/ManualSlideShowPlayer.vue.d.ts +4 -0
  40. package/dist/components/virtualTourV2/ManualSlideShowPlayer.vue.d.ts.map +1 -0
  41. package/dist/components/virtualTourV2/SingleImage.vue.d.ts +4 -0
  42. package/dist/components/virtualTourV2/SingleImage.vue.d.ts.map +1 -0
  43. package/dist/components/virtualTourV2/SocialShare.vue.d.ts +4 -0
  44. package/dist/components/virtualTourV2/SocialShare.vue.d.ts.map +1 -0
  45. package/dist/components/virtualTourV2/WaypointCarousel.vue.d.ts +4 -0
  46. package/dist/components/virtualTourV2/WaypointCarousel.vue.d.ts.map +1 -0
  47. package/dist/lib/virtualTour__/ApartmentConfig.d.ts +27 -0
  48. package/dist/lib/virtualTour__/ApartmentFiles.d.ts +7 -0
  49. package/dist/lib/virtualTour__/MinimapConfig.d.ts +23 -0
  50. package/dist/lib/virtualTour__/impl/HttpApartmentFiles.d.ts +19 -0
  51. package/dist/vue3-player.cjs.js +2 -0
  52. package/dist/vue3-player.esm.js +2992 -0
  53. package/dist/vue3-player.iife.js +3 -0
  54. package/dist/vue3-player.umd.js +3 -0
  55. package/package.json +65 -0
  56. package/src/components/apartmentChooser/QiApartmentChooser.vue +319 -0
  57. package/src/components/apartmentChooser/QiApartmentChooserNavigation.vue +88 -0
  58. package/src/components/apartmentChooser/QiApartmentChooserRaster.vue +408 -0
  59. package/src/components/apartmentChooser/QiApartmentChooserRotator.vue +202 -0
  60. package/src/components/apartmentChooser/QiApartmentChooserSvg.vue +257 -0
  61. package/src/components/apartmentChooser/index.js +5 -0
  62. package/src/components/buildingPicker/QiBuildingChooser.vue +61 -0
  63. package/src/components/buildingPicker/QiBuildingChooserRaster.vue +312 -0
  64. package/src/components/buildingPicker/QiBuildingChooserRasterOverlay.vue +96 -0
  65. package/src/components/buildingPicker/QiBuildingChooserSceneImageStack.vue +89 -0
  66. package/src/components/buildingPicker/QiBuildingChooserSunSimControl.vue +257 -0
  67. package/src/components/buildingPicker/QiBuildingChooserSvg.vue +414 -0
  68. package/src/components/buildingPicker/index.js +6 -0
  69. package/src/components/index.ts +4 -0
  70. package/src/components/shared/QiFloatingCard.vue +76 -0
  71. package/src/components/shared/QiHoverProbe.vue +22 -0
  72. package/src/components/shared/QiNorthDirection.vue +27 -0
  73. package/src/components/shared/QiZoomBox.vue +322 -0
  74. package/src/components/shared/index.js +4 -0
  75. package/src/components/virtualTourV2/Compass.vue +37 -0
  76. package/src/components/virtualTourV2/Disclaimer.vue +41 -0
  77. package/src/components/virtualTourV2/FloorLevel.vue +73 -0
  78. package/src/components/virtualTourV2/FullScreenButton.vue +23 -0
  79. package/src/components/virtualTourV2/InteriorSelector.vue +90 -0
  80. package/src/components/virtualTourV2/ManualSlideShow.vue +198 -0
  81. package/src/components/virtualTourV2/ManualSlideShowPlayer.vue +159 -0
  82. package/src/components/virtualTourV2/PlayerV2.vue +300 -0
  83. package/src/components/virtualTourV2/ScrollHelper.vue +74 -0
  84. package/src/components/virtualTourV2/SettingsUI.vue +355 -0
  85. package/src/components/virtualTourV2/SingleImage.vue +36 -0
  86. package/src/components/virtualTourV2/SocialShare.vue +163 -0
  87. package/src/components/virtualTourV2/TimeOfDay.vue +50 -0
  88. package/src/components/virtualTourV2/Tutorial.vue +690 -0
  89. package/src/components/virtualTourV2/ViewModeToggle.vue +24 -0
  90. package/src/components/virtualTourV2/VirtualTourV2.vue +876 -0
  91. package/src/components/virtualTourV2/WaypointCarousel.vue +162 -0
  92. package/src/components/virtualTourV2/index.js +1 -0
  93. package/src/components/virtualTourV2/minimapv2/MiniMapMap.vue +262 -0
  94. package/src/components/virtualTourV2/minimapv2/MiniMapV2.vue +110 -0
  95. package/src/components/virtualTourV2/minimapv2/MinimapCompass.vue +39 -0
  96. package/src/components/virtualTourV2/minimapv2/Moveable.vue +208 -0
  97. package/src/components/virtualTourV2/minimapv2/RotationMarkerV2.vue +79 -0
  98. package/src/components/virtualTourV2/minimapv2/SunsimulationSlider.vue +203 -0
  99. package/src/components/virtualTourV2/minimapv2/index.js +1 -0
  100. package/src/entry.esm.js +17 -0
  101. package/src/entry.js +13 -0
  102. package/src/entry.ts_ +17 -0
  103. package/src/lib/apartmentChooser/BuildingViewerModel.js +60 -0
  104. package/src/lib/apartmentChooser/CircularSlideshow.js +66 -0
  105. package/src/lib/apartmentChooser/RotationStep.js +31 -0
  106. package/src/lib/apartmentChooser/SceneRotator.js +25 -0
  107. package/src/lib/apartmentChooser/index.js +3 -0
  108. package/src/lib/apartmentChooser/throttle.js +15 -0
  109. package/src/lib/buildingPicker/BuildingMap.js +24 -0
  110. package/src/lib/buildingPicker/BuildingPickerResourceProvider.js +97 -0
  111. package/src/lib/buildingPicker/CanvasRaster.js +29 -0
  112. package/src/lib/buildingPicker/DayOfYearSelector.js +36 -0
  113. package/src/lib/buildingPicker/SampleRaster.js +14 -0
  114. package/src/lib/buildingPicker/index.js +5 -0
  115. package/src/lib/index.js +4 -0
  116. package/src/lib/shared/BatchLoadTracker.js +52 -0
  117. package/src/lib/shared/I18N.js +65 -0
  118. package/src/lib/shared/ResourceLoader.js +33 -0
  119. package/src/lib/shared/index.js +3 -0
  120. package/src/lib/virtualTour/CameraSnapshot.js +42 -0
  121. package/src/lib/virtualTour/FullscreenModel.js +69 -0
  122. package/src/lib/virtualTour/textures/arrow.png +0 -0
  123. package/src/lib/virtualTour/textures/compass-bg.png +0 -0
  124. package/src/lib/virtualTour/textures/compass-needle.png +0 -0
  125. package/src/lib/virtualTour/textures/compass-north.png +0 -0
  126. package/src/lib/virtualTour/textures/floor-1.svg +4 -0
  127. package/src/lib/virtualTour/textures/floor-2.svg +4 -0
  128. package/src/lib/virtualTour/textures/marker.png +0 -0
  129. package/src/lib/virtualTour/textures/tod-sun.png +0 -0
  130. package/src/lib/virtualTour__/ApartmentConfig.ts +80 -0
  131. package/src/lib/virtualTour__/ApartmentFiles.ts +8 -0
  132. package/src/lib/virtualTour__/CameraNavigator.js_ +74 -0
  133. package/src/lib/virtualTour__/CameraSnapshot.js +42 -0
  134. package/src/lib/virtualTour__/CoordConversions.js +43 -0
  135. package/src/lib/virtualTour__/FullscreenModel.js +69 -0
  136. package/src/lib/virtualTour__/MinimapConfig.ts +46 -0
  137. package/src/lib/virtualTour__/PlayerViewModel.js +423 -0
  138. package/src/lib/virtualTour__/config/ApartmentConfig.js +92 -0
  139. package/src/lib/virtualTour__/config/CameraConfig.js +97 -0
  140. package/src/lib/virtualTour__/config/Interaction.js +393 -0
  141. package/src/lib/virtualTour__/config/Panorama.js +78 -0
  142. package/src/lib/virtualTour__/config/PlayerConfig.js +812 -0
  143. package/src/lib/virtualTour__/config/rawinflate.export.js +833 -0
  144. package/src/lib/virtualTour__/config/shaders.js +24 -0
  145. package/src/lib/virtualTour__/impl/HttpApartmentFiles.ts +57 -0
  146. package/src/lib/virtualTour__/index.js +1 -0
  147. package/src/lib/virtualTour__/textures/arrow.png +0 -0
  148. package/src/lib/virtualTour__/textures/compass-bg.png +0 -0
  149. package/src/lib/virtualTour__/textures/compass-needle.png +0 -0
  150. package/src/lib/virtualTour__/textures/compass-north.png +0 -0
  151. package/src/lib/virtualTour__/textures/floor-1.svg +4 -0
  152. package/src/lib/virtualTour__/textures/floor-2.svg +4 -0
  153. package/src/lib/virtualTour__/textures/marker.png +0 -0
  154. package/src/lib/virtualTour__/textures/tod-sun.png +0 -0
  155. package/src/main.ts_ +24 -0
  156. package/src/shims-png.d.ts +4 -0
  157. package/src/shims-tsx.d.ts +11 -0
  158. package/src/shims-vue.d.ts +4 -0
  159. package/src/style.css +0 -0
  160. package/src/vite-env.d.ts +5 -0
@@ -0,0 +1,74 @@
1
+ <template>
2
+ <div class="scroll-helper-wrapper" @click="scroll">
3
+ <div>See Details</div>
4
+ <span id="moving-arrow"></span>
5
+ </div>
6
+ </template>
7
+ <script>
8
+ export default {
9
+ name: 'ScrollHelper',
10
+ props: {
11
+ scrollTo: {
12
+ type: String,
13
+ default: () => {
14
+ return 'content'
15
+ },
16
+ },
17
+ },
18
+ methods: {
19
+ scroll() {
20
+ const scrollTo = document.getElementById(this.scrollTo).offsetTop
21
+ window.scrollTo({ top: scrollTo, behavior: 'smooth' })
22
+ },
23
+ },
24
+ }
25
+ </script>
26
+ <style scoped>
27
+ span#moving-arrow {
28
+ display: block;
29
+ animation-name: tween;
30
+ animation-duration: 1s;
31
+ animation-iteration-count: infinite;
32
+ background-image: url('data:image/svg+xml,\00003csvg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\00003cpath fill="%2370757a" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z">\00003c/path>\00003c/svg>');
33
+ display: inline-block;
34
+ height: 24px;
35
+ width: 24px;
36
+ }
37
+
38
+ @keyframes tween {
39
+ from {
40
+ background-position: 0px 0px;
41
+ }
42
+ to {
43
+ background-position: 0px 4px;
44
+ }
45
+ }
46
+
47
+ .scroll-helper-wrapper {
48
+ padding: 10px;
49
+ display: flex;
50
+ flex-direction: column;
51
+ align-items: center;
52
+ cursor: pointer;
53
+ color: #fff;
54
+ background: rgb(0, 0, 0);
55
+ background: linear-gradient(
56
+ 180deg,
57
+ rgba(0, 0, 0, 0) 10%,
58
+ rgba(0, 0, 0, 1) 50%,
59
+ rgba(0, 0, 0, 0) 100%
60
+ );
61
+ text-align: center;
62
+ visibility: hidden;
63
+ bottom: 0;
64
+ position: fixed;
65
+ bottom: 0;
66
+ right: 0;
67
+ }
68
+
69
+ @media only screen and (max-width: 600px) {
70
+ .scroll-helper-wrapper {
71
+ visibility: visible;
72
+ }
73
+ }
74
+ </style>
@@ -0,0 +1,355 @@
1
+ <template>
2
+ <div class="player-settings-ui">
3
+ <form id="settings-ui-form">
4
+ <div class="form-inputs">
5
+ <div v-for="(value, name, index) in allSettings" :key="index" d-block>
6
+ <v-slider
7
+ v-if="value.type === 'slider'"
8
+ v-model="allSettings[name].value"
9
+ @change="updateSettings"
10
+ :max="value.max"
11
+ :min="value.min"
12
+ :step="value.step"
13
+ >
14
+ <template v-slot:prepend>
15
+ <div class="setting-label">
16
+ {{ value.label }}
17
+ </div>
18
+ </template>
19
+ <template v-slot:append>
20
+ <div>
21
+ <v-text-field
22
+ v-model="allSettings[name].value"
23
+ hide-details
24
+ dense
25
+ outlined
26
+ type="number"
27
+ :max="value.max"
28
+ :min="value.min"
29
+ :step="value.step"
30
+ style="width: 90px"
31
+ @change="updateSettings"
32
+ ></v-text-field>
33
+ </div>
34
+ </template>
35
+ </v-slider>
36
+
37
+ <v-checkbox
38
+ v-if="value.type === 'boolean'"
39
+ v-model="allSettings[name].value"
40
+ @change="updateSettings"
41
+ >
42
+ <template v-slot:prepend>
43
+ <div class="setting-label">
44
+ {{ value.label }}
45
+ </div>
46
+ </template>
47
+ <template v-slot:append>
48
+ <div>
49
+ {{ value.value }}
50
+ </div>
51
+ </template>
52
+ </v-checkbox>
53
+ <div
54
+ class="d-flex"
55
+ v-if="value.type === 'color'"
56
+ :max="value.max"
57
+ :min="value.min"
58
+ :step="value.step"
59
+ >
60
+ <div class="setting-label">
61
+ {{ value.label }}
62
+ </div>
63
+ <div class="flex-grow-1 flex-shrink-0">
64
+ <input
65
+ v-model="allSettings[name].value"
66
+ type="color"
67
+ @change="updateSettings"
68
+ />
69
+ </div>
70
+ <div>
71
+ <v-text-field
72
+ v-model="allSettings[name].value"
73
+ hide-details
74
+ dense
75
+ outlined
76
+ readonly
77
+ type="text"
78
+ style="width: 90px"
79
+ @change="updateSettings"
80
+ ></v-text-field>
81
+ </div>
82
+ </div>
83
+ <div v-if="value.type === 'lut'" d-block class="mt-3">
84
+ <div class="d-flex justify-space-between">
85
+ <div class="setting-label">
86
+ {{ value.label }}
87
+ </div>
88
+ <div>
89
+ <v-btn
90
+ class="ml-2"
91
+ x-small
92
+ @click="allSettings[name].value = null"
93
+ >
94
+ Clear Lut
95
+ </v-btn>
96
+ </div>
97
+ </div>
98
+ <div>
99
+ <div class="mt-5 d-block" style="width: 300px">
100
+ <div>
101
+ <v-select
102
+ v-model="allSettings[name].value"
103
+ :items="value.items"
104
+ item-title="title"
105
+ item-value="value"
106
+ dense
107
+ label="Select Lut"
108
+ @change="updateSettings"
109
+ ></v-select>
110
+ </div>
111
+ </div>
112
+ <div>
113
+ <div class="setting-label">Enter Lut URL:</div>
114
+ <div class="d-block" style="width: 300px">
115
+ <div>
116
+ <v-text-field
117
+ v-model="allSettings[name].value"
118
+ hide-details
119
+ dense
120
+ type="url"
121
+ @change="updateSettings"
122
+ ></v-text-field>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ </div>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ <div class="form-buttons">
131
+ <v-btn @click="resetForm()">Reset</v-btn>
132
+ <v-btn class="ml-2" @click="downloadSettings()">
133
+ Download Json
134
+ <v-icon color="black darken-1">mdi-download</v-icon>
135
+ </v-btn>
136
+ <v-btn class="ml-2" @click="saveSettings()">
137
+ Save Settings
138
+ <v-icon color="black darken-1">mdi-save</v-icon>
139
+ </v-btn>
140
+ </div>
141
+ </form>
142
+ </div>
143
+ </template>
144
+
145
+ <script>
146
+ function Hex2Rgb(color) {
147
+ // Convert hex color to RGB and then normalize to 0-1 range
148
+ const r = parseInt(color.substr(1, 2), 16) / 255
149
+ const g = parseInt(color.substr(3, 2), 16) / 255
150
+ const b = parseInt(color.substr(5, 2), 16) / 255
151
+
152
+ return [r, g, b]
153
+ }
154
+
155
+ function ToHex(c) {
156
+ var hex = c.toString(16)
157
+ return hex.length == 1 ? '0' + hex : hex
158
+ }
159
+
160
+ function RGB2Hex([r, g, b]) {
161
+ return (
162
+ '#' +
163
+ ToHex(parseInt(r * 255)) +
164
+ ToHex(parseInt(g * 255)) +
165
+ ToHex(parseInt(b * 255))
166
+ )
167
+ }
168
+
169
+ function initialSettings(data) {
170
+ const PredefinedLuts = [
171
+ 'Cool 5',
172
+ 'Cool 10',
173
+ 'Cool 15',
174
+ 'Cool 20',
175
+ 'Cool 25',
176
+ 'Warm 20',
177
+ 'Warm 25',
178
+ 'Warm 10',
179
+ 'Warm 15',
180
+ 'Warm 5',
181
+ 'bw',
182
+ ]
183
+
184
+ let initData = {
185
+ temperature: 6500,
186
+ targetLuminance: 1,
187
+ exposureFovScale: 0.6,
188
+ UNREAL_BLOOM_ENABLED: true,
189
+ sharpenFilter_amount: 0.6,
190
+ UNREAL_BLOOOM_STRENGTH: 0.3,
191
+ TRANSITION_MOVEMENT_SCALE: 1.3,
192
+ whitePoint: [1, 1, 1],
193
+ lut: '',
194
+ ...data,
195
+ }
196
+
197
+ return {
198
+ exposureFovScale: {
199
+ label: 'Exposure Fov Scale',
200
+ type: 'slider',
201
+ min: 0,
202
+ max: 1,
203
+ step: 0.01,
204
+ value: initData.exposureFovScale,
205
+ },
206
+ targetLuminance: {
207
+ label: 'Target Luminance',
208
+ type: 'slider',
209
+ min: 0,
210
+ max: 15,
211
+ step: 0.1,
212
+ value: initData.targetLuminance,
213
+ },
214
+ sharpenFilter_amount: {
215
+ label: 'Sharpen Filter Amount',
216
+ type: 'slider',
217
+ min: 0,
218
+ max: 100,
219
+ step: 0.1,
220
+ value: initData.sharpenFilter_amount,
221
+ },
222
+ UNREAL_BLOOM_ENABLED: {
223
+ label: 'Enable Bloom?',
224
+ type: 'boolean',
225
+ value: initData.UNREAL_BLOOM_ENABLED,
226
+ },
227
+ UNREAL_BLOOOM_STRENGTH: {
228
+ label: 'Bloom Strength',
229
+ type: 'slider',
230
+ min: 0,
231
+ max: 1,
232
+ step: 0.01,
233
+ value: initData.UNREAL_BLOOOM_STRENGTH,
234
+ },
235
+ TRANSITION_MOVEMENT_SCALE: {
236
+ label: 'Transition Movement Speed',
237
+ type: 'slider',
238
+ min: 0.2,
239
+ max: 25,
240
+ step: 0.1,
241
+ value: initData.TRANSITION_MOVEMENT_SCALE,
242
+ },
243
+ temperature: {
244
+ label: 'Temperature / White Balance',
245
+ type: 'slider',
246
+ min: 1000,
247
+ max: 12000,
248
+ step: 1,
249
+ value: initData.temperature,
250
+ },
251
+ whitePoint: {
252
+ label: 'White Point',
253
+ type: 'color',
254
+ min: null,
255
+ max: null,
256
+ step: null,
257
+ value: RGB2Hex(initData.whitePoint),
258
+ },
259
+ lut: {
260
+ label: 'Lut',
261
+ type: 'lut',
262
+ items: PredefinedLuts.map((item) => {
263
+ return {
264
+ text: item,
265
+ value: `https://cdn.visuado.com/luts/${item}.png`,
266
+ }
267
+ }),
268
+ value: initData.lut,
269
+ },
270
+ }
271
+ }
272
+ export default {
273
+ name: 'SettingsUI',
274
+ emits: ['update-settings', 'save-settings'],
275
+ props: {
276
+ projectSlug: { type: String, required: true },
277
+ initialSettings: { type: Object, default: () => undefined },
278
+ },
279
+ data() {
280
+ return {
281
+ allSettings: initialSettings(this.initialSettings),
282
+ }
283
+ },
284
+ watch: {
285
+ allSettings: {
286
+ handler() {
287
+ this.updateSettings()
288
+ },
289
+ deep: true,
290
+ },
291
+ },
292
+ computed: {
293
+ settingsToUpdate() {
294
+ let settingsToUpdate = {}
295
+
296
+ for (const [key, value] of Object.entries(this.allSettings)) {
297
+ if (key === 'whitePoint') {
298
+ settingsToUpdate[key] = Hex2Rgb(value.value)
299
+ } else {
300
+ settingsToUpdate[key] = value.value
301
+ }
302
+ }
303
+
304
+ return settingsToUpdate
305
+ },
306
+ },
307
+ methods: {
308
+ updateSettings() {
309
+ this.$emit('update-settings', this.settingsToUpdate)
310
+ },
311
+ downloadSettings() {
312
+ const element = document.createElement('a')
313
+ element.href = URL.createObjectURL(
314
+ new Blob([JSON.stringify(this.settingsToUpdate, null, 2)])
315
+ )
316
+
317
+ const filename = `player-settings-${this.projectSlug}-${Date.now()}.json`
318
+ element.download = filename
319
+ element.style.display = 'none'
320
+ document.body.appendChild(element)
321
+ element.click()
322
+ document.body.removeChild(element)
323
+ },
324
+ saveSettings() {
325
+ this.$emit('save-settings', this.settingsToUpdate)
326
+ },
327
+ resetForm() {
328
+ this.allSettings = initialSettings()
329
+ this.$emit('update-settings', this.settingsToUpdate)
330
+ },
331
+ },
332
+ }
333
+ </script>
334
+ <style scoped>
335
+ .settings-panel {
336
+ min-width: 500px;
337
+ height: 500px;
338
+ overflow-y: scroll;
339
+ }
340
+
341
+ form#settings-ui-form {
342
+ background: rgb(255, 255, 255, 0.6);
343
+ border-radius: 5px;
344
+ padding: 10px;
345
+ }
346
+
347
+ #settings-ui-form .form-inputs {
348
+ height: 60vh;
349
+ overflow-y: scroll;
350
+ padding-bottom: 50px;
351
+ scrollbar-color: #0c0e4a transparent;
352
+ scrollbar-width: thin;
353
+ padding-right: 20px;
354
+ }
355
+ </style>
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <div class="static-image-wrapper">
3
+ <div class="img-div" :class="[aspectRatio]" :style="style"></div>
4
+ </div>
5
+ </template>
6
+ <script>
7
+ export default {
8
+ name: 'StaticImage',
9
+ props: {
10
+ image: { type: String, required: true },
11
+ aspectRatio: { type: String, default: () => 'wide' },
12
+ },
13
+ computed: {
14
+ style() {
15
+ return { 'background-image': `url("${encodeURI(this.image)}")` }
16
+ },
17
+ },
18
+ }
19
+ </script>
20
+ <style scoped>
21
+ .img-div {
22
+ position: absolute;
23
+ display: block;
24
+ height: 100%;
25
+ width: 100%;
26
+ background-size: cover;
27
+ background-position: center center;
28
+ z-index: 2;
29
+ left: 0;
30
+ top: 0;
31
+ }
32
+
33
+ .static-image-wrapper {
34
+ background: #fff;
35
+ }
36
+ </style>
@@ -0,0 +1,163 @@
1
+ <template>
2
+ <div>
3
+ <v-tooltip elevation="2" top attach>
4
+ <template #activator="{ on: tooltip }">
5
+ <v-btn
6
+ density="comfortable"
7
+ elevation="1"
8
+ icon="mdi-share-variant"
9
+ @click="showSocialShare = !showSocialShare"
10
+ v-on="{ ...tooltip }"
11
+ >
12
+ </v-btn>
13
+ </template>
14
+ <span>{{ i18n.getLabel("share") }}</span>
15
+ </v-tooltip>
16
+ <v-dialog id="share-box" width="400" v-model="showSocialShare">
17
+ <v-card>
18
+ <v-toolbar elevation="0">
19
+ <v-btn
20
+ size="x-small"
21
+ icon="mdi-close"
22
+ @click="showSocialShare = false"
23
+ >
24
+ </v-btn>
25
+ <v-toolbar-title>
26
+ {{ i18n.getLabel("share") }}
27
+ </v-toolbar-title>
28
+ <v-spacer></v-spacer>
29
+ </v-toolbar>
30
+ <v-card-text class="mt-5">
31
+ <p id="share-btns-wrapper" class="text-center">
32
+ <v-tooltip location="top">
33
+ <template v-slot:activator="{ props }">
34
+ <v-btn
35
+ depressed
36
+ fab
37
+ light
38
+ icon="mdi-facebook"
39
+ v-bind="props"
40
+ @click="shareToFacebook"
41
+ >
42
+ </v-btn>
43
+ </template>
44
+ <span>{{ i18n.getLabel("share-to-facebook") }}</span>
45
+ </v-tooltip>
46
+ <v-tooltip location="top">
47
+ <template v-slot:activator="{ props }">
48
+ <v-btn
49
+ depressed
50
+ fab
51
+ light
52
+ icon="mdi-linkedin"
53
+ v-bind="props"
54
+ @click="shareToLinkedin"
55
+ >
56
+ </v-btn>
57
+ </template>
58
+ <span>{{ i18n.getLabel("share-to-linkedin") }}</span>
59
+ </v-tooltip>
60
+ <v-tooltip location="top">
61
+ <template v-slot:activator="{ props }">
62
+ <v-btn
63
+ depressed
64
+ fab
65
+ light
66
+ icon="mdi-twitter"
67
+ v-bind="props"
68
+ @click="shareToTwitter"
69
+ >
70
+ </v-btn>
71
+ </template>
72
+ <span>{{ i18n.getLabel("share-to-twitter") }}</span>
73
+ </v-tooltip>
74
+ <v-tooltip location="top">
75
+ <template v-slot:activator="{ props }">
76
+ <v-btn
77
+ depressed
78
+ fab
79
+ light
80
+ icon="mdi-email"
81
+ link
82
+ :href="`mailto:?body=${currentURL}`"
83
+ v-bind="props"
84
+ >
85
+ </v-btn>
86
+ </template>
87
+ <span>{{ i18n.getLabel("share-via-email") }}</span>
88
+ </v-tooltip>
89
+ <v-tooltip location="top">
90
+ <template v-slot:activator="{ props }">
91
+ <v-btn
92
+ depressed
93
+ fab
94
+ light
95
+ icon="mdi-content-copy"
96
+ @click="copyLink"
97
+ v-bind="props"
98
+ >
99
+ </v-btn>
100
+ </template>
101
+ <span>{{ i18n.getLabel("copy-link") }}</span>
102
+ </v-tooltip>
103
+ <v-spacer></v-spacer>
104
+ </p>
105
+ </v-card-text>
106
+ </v-card>
107
+ </v-dialog>
108
+ </div>
109
+ </template>
110
+
111
+ <script>
112
+ export default {
113
+ name: "QiVirtualTourSocialShare",
114
+ inject: ["i18n"],
115
+ data() {
116
+ return {
117
+ showSocialShare: false,
118
+ currentURL: location.href,
119
+ };
120
+ },
121
+ methods: {
122
+ shareToFacebook() {
123
+ window.open(
124
+ "https://www.facebook.com/sharer/sharer.php?u=" +
125
+ encodeURIComponent(location.href),
126
+ "facebook-share-dialog",
127
+ "width=626,height=436"
128
+ );
129
+ return false;
130
+ },
131
+ shareToTwitter() {
132
+ window.open(
133
+ "https://twitter.com/intent/tweet?text=" +
134
+ encodeURIComponent(location.href),
135
+ "twiter-share-dialog",
136
+ "width=626,height=436"
137
+ );
138
+ return false;
139
+ },
140
+ shareToLinkedin() {
141
+ window.open(
142
+ "https://www.linkedin.com/sharing/share-offsite/?url=" +
143
+ encodeURIComponent(location.href),
144
+ "linkedin-share-dialog",
145
+ "width=626,height=736"
146
+ );
147
+ return false;
148
+ },
149
+ copyLink() {
150
+ navigator.clipboard.writeText(location.href);
151
+ },
152
+ },
153
+ };
154
+ </script>
155
+ <style scoped>
156
+ #share-btns-wrapper button {
157
+ margin: 0 8px;
158
+ }
159
+ .v-btn {
160
+ background-color: #fff;
161
+ pointer-events: all;
162
+ }
163
+ </style>
@@ -0,0 +1,50 @@
1
+ <template>
2
+ <div class="d-flex flex-column align-center justify-center clock-face">
3
+ <div class="clock-icon">
4
+ <v-img :src="sunIcon" aspect-ratio="1" />
5
+ </div>
6
+ <div class="clock-value grey--text text--darken-3">{{ displayValue }}</div>
7
+ </div>
8
+ </template>
9
+
10
+ <script>
11
+ import sunIcon from '@/lib/virtualTour/textures/tod-sun.png'
12
+
13
+ function padZeros(n) {
14
+ return ('0' + n).slice(-2)
15
+ }
16
+
17
+ export default {
18
+ name: 'TimeOfDay',
19
+ props: {
20
+ hours: { type: Number, default: 0 },
21
+ minutes: { type: Number, default: 0 },
22
+ },
23
+ data() {
24
+ return { sunIcon }
25
+ },
26
+ computed: {
27
+ displayValue() {
28
+ return [padZeros(this.hours), ':', padZeros(this.minutes)].join('')
29
+ },
30
+ },
31
+ }
32
+ </script>
33
+
34
+ <style scoped>
35
+ .clock-face {
36
+ margin-left: 10px;
37
+ height: 50px;
38
+ width: 50px;
39
+ background-color: white;
40
+ border-radius: 50%;
41
+ }
42
+
43
+ .clock-value {
44
+ font-size: 11px;
45
+ }
46
+
47
+ .clock-icon {
48
+ width: 18px;
49
+ }
50
+ </style>