@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,322 @@
1
+ <template>
2
+ <div ref="box" class="zoom-box-container">
3
+ <div
4
+ :style="{ 'transform-origin': 'top left', transform }"
5
+ class="zoom-box"
6
+ >
7
+ <slot />
8
+ </div>
9
+ </div>
10
+ </template>
11
+
12
+ <script>
13
+ export default {
14
+ name: "QiZoomBox",
15
+ props: {
16
+ desktop: {
17
+ type: Boolean,
18
+ default: true,
19
+ },
20
+ mobile: {
21
+ type: Boolean,
22
+ default: true,
23
+ },
24
+ maxScale: {
25
+ type: Number,
26
+ default: 10,
27
+ },
28
+ consumeMouseClickWhenMoved: {
29
+ type: Boolean,
30
+ default: true,
31
+ },
32
+ consumeMouseUpWhenMoved: {
33
+ type: Boolean,
34
+ default: true,
35
+ },
36
+ },
37
+ data() {
38
+ return {
39
+ zoom: 100,
40
+ originX: 0,
41
+ originY: 0,
42
+ moving: false,
43
+ scaling: false,
44
+ lastEvent: undefined,
45
+ moved: false,
46
+ };
47
+ },
48
+ computed: {
49
+ transform() {
50
+ return `translateX(${this.originX}px) translateY(${this.originY}px) scale(${this.scale})`;
51
+ },
52
+ scale() {
53
+ return this.zoom / 100;
54
+ },
55
+ actualMaxScale() {
56
+ return this.maxScale * 100;
57
+ },
58
+ },
59
+ watch: {
60
+ scale() {
61
+ this.emitUpdate();
62
+ },
63
+ originX() {
64
+ this.emitUpdate();
65
+ },
66
+ originY() {
67
+ this.emitUpdate();
68
+ },
69
+ desktop() {
70
+ if (this.desktop) {
71
+ this.addDesktopHandlers();
72
+ } else {
73
+ this.removeDesktopHandlers();
74
+ }
75
+ },
76
+ mobile() {
77
+ if (this.mobile) {
78
+ this.addMobileHandlers();
79
+ } else {
80
+ this.removeMobileHandlers();
81
+ }
82
+ },
83
+ },
84
+ mounted() {
85
+ if (this.desktop) {
86
+ this.addDesktopHandlers();
87
+ }
88
+ if (this.mobile) {
89
+ this.addMobileHandlers();
90
+ }
91
+ },
92
+ beforeUnmount() {
93
+ if (this.desktop) {
94
+ this.removeDesktopHandlers();
95
+ }
96
+ if (this.mobile) {
97
+ this.removeMobileHandlers();
98
+ }
99
+ },
100
+ methods: {
101
+ addDesktopHandlers() {
102
+ this.$refs.box.addEventListener("wheel", this.wheelHandler, {
103
+ capture: true,
104
+ });
105
+ this.$refs.box.addEventListener("mousedown", this.mouseDownHandler, {
106
+ capture: true,
107
+ });
108
+ this.$refs.box.addEventListener("mousemove", this.mouseMoveHandler, {
109
+ capture: true,
110
+ });
111
+ window.addEventListener("mouseup", this.mouseUpHandler, {
112
+ capture: true,
113
+ });
114
+ window.addEventListener("click", this.mouseClickHandler, {
115
+ capture: true,
116
+ });
117
+ },
118
+ addMobileHandlers() {
119
+ this.$refs.box.addEventListener("touchstart", this.touchStartHandler, {
120
+ capture: true,
121
+ });
122
+ this.$refs.box.addEventListener("touchmove", this.touchMoveHandler, {
123
+ capture: true,
124
+ });
125
+ window.addEventListener("touchend", this.touchEndHandler, {
126
+ capture: true,
127
+ });
128
+ window.addEventListener("touchcancel", this.touchEndHandler, {
129
+ capture: true,
130
+ });
131
+ },
132
+ removeDesktopHandlers() {
133
+ this.$refs.box.removeEventListener("wheel", this.wheelHandler, {
134
+ capture: true,
135
+ });
136
+ this.$refs.box.removeEventListener("mousedown", this.mouseDownHandler, {
137
+ capture: true,
138
+ });
139
+ this.$refs.box.removeEventListener("mousemove", this.mouseMoveHandler, {
140
+ capture: true,
141
+ });
142
+ window.removeEventListener("mouseup", this.mouseUpHandler, {
143
+ capture: true,
144
+ });
145
+ window.removeEventListener("click", this.mouseClickHandler, {
146
+ capture: true,
147
+ });
148
+ },
149
+ removeMobileHandlers() {
150
+ this.$refs.box.removeEventListener("touchstart", this.touchStartHandler, {
151
+ capture: true,
152
+ });
153
+ this.$refs.box.removeEventListener("touchmove", this.touchMoveHandler, {
154
+ capture: true,
155
+ });
156
+ window.removeEventListener("touchend", this.touchEndHandler, {
157
+ capture: true,
158
+ });
159
+ window.removeEventListener("touchcancel", this.touchEndHandler, {
160
+ capture: true,
161
+ });
162
+ },
163
+ wheelHandler(e) {
164
+ const { x, y } = this.getOffsetCoordinates(e);
165
+ this.adjustZoom(-e.deltaY / 10, x, y);
166
+ e.preventDefault();
167
+ },
168
+ mouseDownHandler(e) {
169
+ this.moving = true;
170
+ this.moved = false;
171
+ this.lastEvent = e;
172
+ },
173
+ mouseMoveHandler(e) {
174
+ if (this.moving) {
175
+ const { x, y } = this.getOffsetCoordinates(e);
176
+ const { x: pX, y: pY } = this.getOffsetCoordinates(this.lastEvent);
177
+ const delta = {
178
+ x: x - pX,
179
+ y: y - pY,
180
+ };
181
+ this.adjustTranslateX(delta.x);
182
+ this.adjustTranslateY(delta.y);
183
+ this.moved = true;
184
+ this.lastEvent = e;
185
+ }
186
+ },
187
+ mouseUpHandler(e) {
188
+ if (this.moving) {
189
+ if (this.moved && this.consumeMouseUpWhenMoved) {
190
+ e.preventDefault();
191
+ e.stopImmediatePropagation();
192
+ }
193
+ }
194
+ },
195
+ mouseClickHandler(e) {
196
+ if (this.moving) {
197
+ if (this.moved && this.consumeMouseClickWhenMoved) {
198
+ e.preventDefault();
199
+ e.stopImmediatePropagation();
200
+ }
201
+ this.moving = false;
202
+ }
203
+ },
204
+ touchStartHandler(e) {
205
+ this.moving = e.touches.length === 1;
206
+ this.scaling = e.touches.length === 2;
207
+ this.lastEvent = e;
208
+ },
209
+ touchMoveHandler(e) {
210
+ if (this.moving) {
211
+ const { x, y } = this.getOffsetCoordinates(e.touches[0]);
212
+ const { x: pX, y: pY } = this.getOffsetCoordinates(
213
+ this.lastEvent.touches[0]
214
+ );
215
+ const delta = {
216
+ x: x - pX,
217
+ y: y - pY,
218
+ };
219
+ this.adjustTranslateX(delta.x);
220
+ this.adjustTranslateY(delta.y);
221
+ } else if (this.scaling && e.touches.length === 2) {
222
+ const { x: x0, y: y0 } = this.getOffsetCoordinates(e.touches[0]);
223
+ const { x: pX0, y: pY0 } = this.getOffsetCoordinates(
224
+ this.lastEvent.touches[0]
225
+ );
226
+ const { x: x1, y: y1 } = this.getOffsetCoordinates(e.touches[1]);
227
+ const { x: pX1, y: pY1 } = this.getOffsetCoordinates(
228
+ this.lastEvent.touches[1]
229
+ );
230
+ const prevDist = Math.hypot(pX0 - pX1, pY0 - pY1);
231
+ const currentDist = Math.hypot(x0 - x1, y0 - y1);
232
+ const centerX = (x1 + x0) / 2;
233
+ const centerY = (y1 + y0) / 2;
234
+ this.adjustZoom(currentDist - prevDist, centerX, centerY);
235
+ }
236
+ this.lastEvent = e;
237
+ },
238
+ touchEndHandler() {
239
+ this.moving = false;
240
+ this.scaling = false;
241
+ },
242
+ getOffsetCoordinates(e) {
243
+ const { left, top } = this.$refs.box.getBoundingClientRect();
244
+ return {
245
+ x: e.clientX - left,
246
+ y: e.clientY - top,
247
+ };
248
+ },
249
+ adjustTranslateX(delta) {
250
+ const bound = this.$refs.box.clientWidth;
251
+ const scaled = bound * this.scale;
252
+ this.originX = Math.max(
253
+ Math.min(0, this.originX + delta),
254
+ -(scaled - bound)
255
+ );
256
+ },
257
+ adjustTranslateY(delta) {
258
+ const bound = this.$refs.box.clientHeight;
259
+ const scaled = bound * this.scale;
260
+ this.originY = Math.max(
261
+ Math.min(0, this.originY + delta),
262
+ -(scaled - bound)
263
+ );
264
+ },
265
+ adjustZoom(delta, x, y) {
266
+ const boundX = this.$refs.box.clientWidth;
267
+ const boundY = this.$refs.box.clientHeight;
268
+ const scaledXBefore = boundX * this.scale;
269
+ const scaledYBefore = boundY * this.scale;
270
+ this.zoom = Math.min(
271
+ Math.max(100, this.zoom + delta),
272
+ this.actualMaxScale
273
+ );
274
+ const scaledXAfter = boundX * this.scale;
275
+ const scaledYAfter = boundY * this.scale;
276
+ const xDiff = scaledXAfter - scaledXBefore;
277
+ const yDiff = scaledYAfter - scaledYBefore;
278
+ this.originX -= (x / boundX) * xDiff;
279
+ this.originY -= (y / boundY) * yDiff;
280
+ this.adjustTranslateX(0);
281
+ this.adjustTranslateY(0);
282
+ },
283
+ emitUpdate() {
284
+ this.$emit("update", {
285
+ scale: this.scale,
286
+ x: this.originX,
287
+ y: this.originY,
288
+ resolve: (projectedX, projectedY) => {
289
+ const boundX = this.$refs.box.clientWidth;
290
+ const boundY = this.$refs.box.clientHeight;
291
+ const minX = this.originX / -this.scale;
292
+ const minY = this.originY / -this.scale;
293
+ const maxX = minX + boundX / this.scale;
294
+ const maxY = minY + boundY / this.scale;
295
+ const x = (projectedX / boundX) * (maxX - minX) + minX;
296
+ const y = (projectedY / boundY) * (maxY - minY) + minY;
297
+ return { x, y };
298
+ },
299
+ });
300
+ },
301
+ },
302
+ };
303
+ </script>
304
+
305
+ <style scoped>
306
+ .zoom-box-container {
307
+ position: absolute;
308
+ width: 100%;
309
+ height: 100%;
310
+ left: 0;
311
+ top: 0;
312
+ overflow: hidden;
313
+ user-select: none;
314
+ touch-action: none;
315
+ }
316
+ .zoom-box {
317
+ width: 100%;
318
+ height: 100%;
319
+ user-select: none;
320
+ touch-action: none;
321
+ }
322
+ </style>
@@ -0,0 +1,4 @@
1
+ export { default as QiFloatingCard } from './QiFloatingCard.vue'
2
+ export { default as QiHoverProbe } from './QiHoverProbe.vue'
3
+ export { default as QiNorthDirection } from './QiNorthDirection.vue'
4
+ export { default as QiZoomBox } from './QiZoomBox.vue'
@@ -0,0 +1,37 @@
1
+ <template>
2
+ <div :style="compassBackground">
3
+ <v-img class="compass-needle" :src="needle" :style="needleRotation"></v-img>
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ import compassBackground from '@/lib/virtualTour/textures/compass-bg.png'
9
+ import compassNeedle from '@/lib/virtualTour/textures/compass-needle.png'
10
+
11
+ export default {
12
+ name: 'Compass',
13
+ props: { rotation: { type: Number, required: true } },
14
+ data() {
15
+ return {
16
+ needle: compassNeedle,
17
+ compassBackground: {
18
+ backgroundImage: `url(${compassBackground})`,
19
+ backgroundSize: 'contain',
20
+ },
21
+ }
22
+ },
23
+ computed: {
24
+ needleRotation() {
25
+ return {
26
+ transform: `rotate(${-this.rotation + 180}deg)`,
27
+ }
28
+ },
29
+ },
30
+ }
31
+ </script>
32
+ <style>
33
+ .compass-needle {
34
+ transition: transform 0.5s;
35
+ transition-timing-function: ease-out;
36
+ }
37
+ </style>
@@ -0,0 +1,41 @@
1
+ <template>
2
+ <transition name="fade-transition">
3
+ <div v-if="isVisible" class="text-white disclaimer caption">
4
+ {{
5
+ i18n.getLabel("all-illustrations-are-indicative-deviations-may-occur")
6
+ }}
7
+ <span
8
+ @click="isVisible = false"
9
+ class="link-text text-decoration-underline"
10
+ >
11
+ {{ i18n.getLabel("i-understand") }}
12
+ </span>
13
+ </div>
14
+ </transition>
15
+ </template>
16
+ <script>
17
+ export default {
18
+ name: "Disclaimer",
19
+ inject: ["i18n"],
20
+ data() {
21
+ return {
22
+ isVisible: true,
23
+ };
24
+ },
25
+ };
26
+ </script>
27
+ <style scoped>
28
+ .disclaimer {
29
+ padding: 4px 10px;
30
+ text-align: center;
31
+ background-color: rgba(0, 0, 0, 0.25);
32
+ border-radius: 5px;
33
+ line-height: 20px;
34
+ }
35
+ .disclaimer span {
36
+ cursor: pointer;
37
+ color: white;
38
+ text-decoration: underline;
39
+ pointer-events: all;
40
+ }
41
+ </style>
@@ -0,0 +1,73 @@
1
+ <template>
2
+ <v-tooltip right attach>
3
+ <template #activator="{ on: tooltip }">
4
+ <v-btn density="comfortable" elevation="1" icon v-on="{ ...tooltip }">
5
+ <svg
6
+ style="width: 24px; height: 24px"
7
+ viewBox="0 0 18 16"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ >
10
+ <path
11
+ d="M8.98034 10.3472L1.54055 5.8855L8.98034 1.42384L16.4201 5.8855L8.98034 10.3472Z"
12
+ fill="white"
13
+ :stroke="upperActive ? 'black' : '#999999'"
14
+ stroke-width="1.5"
15
+ stroke-linejoin="round"
16
+ />
17
+ <path
18
+ d="M8.98034 14.7993L1.54055 10.3376L8.98034 5.87599L16.4201 10.3376L8.98034 14.7993Z"
19
+ fill="white"
20
+ :stroke="lowerActive ? 'black' : '#999999'"
21
+ stroke-width="1.5"
22
+ stroke-linejoin="round"
23
+ />
24
+ </svg>
25
+ </v-btn>
26
+ </template>
27
+ <span class="floor-level-label">
28
+ {{ i18n.getLabel(lowerOrUpper) }} {{ i18n.getLabel("floor") }}
29
+ </span>
30
+ </v-tooltip>
31
+ </template>
32
+ <script>
33
+ export default {
34
+ name: "FloorLevel",
35
+ inject: ["i18n"],
36
+ props: {
37
+ level: { type: Number, default: 0 },
38
+ floorLevels: { type: Array, default: [] },
39
+ },
40
+ computed: {
41
+ lowerOrUpper() {
42
+ const allFloorLevels = this.floorLevels;
43
+ allFloorLevels.sort();
44
+ if (allFloorLevels.indexOf(this.level) + 1 <= allFloorLevels.length / 2) {
45
+ return "Lower";
46
+ } else {
47
+ return "Upper";
48
+ }
49
+ },
50
+ lowerActive() {
51
+ return this.lowerOrUpper === "Lower";
52
+ },
53
+ upperActive() {
54
+ return this.lowerOrUpper === "Upper";
55
+ },
56
+ },
57
+ };
58
+ </script>
59
+ <style scoped>
60
+ .btn-placeholder {
61
+ width: 36px;
62
+ height: 36px;
63
+ }
64
+ .v-btn {
65
+ background-color: #fff;
66
+ pointer-events: all;
67
+ cursor: auto;
68
+ }
69
+
70
+ .floor-level-label {
71
+ text-transform: capitalize;
72
+ }
73
+ </style>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <div id="btn-fullscreen" class="btn-placeholder mr-2">
3
+ <v-btn
4
+ density="comfortable"
5
+ elevation="3"
6
+ :icon="isFullScreen ? 'mdi-fullscreen-exit' : 'mdi-fullscreen'"
7
+ @click="$emit('toggle-fullscreen')"
8
+ >
9
+ </v-btn>
10
+ </div>
11
+ </template>
12
+ <script>
13
+ export default {
14
+ props: {
15
+ isFullScreen: {
16
+ type: Boolean,
17
+ required: true,
18
+ },
19
+ },
20
+ emits: ["toggle-fullscreen"],
21
+ };
22
+ </script>
23
+ <style scoped></style>
@@ -0,0 +1,90 @@
1
+ <template>
2
+ <div>
3
+ <v-menu
4
+ transition="slide-x-reverse-transition"
5
+ location="top end"
6
+ origin="end bottom"
7
+ elevation="0"
8
+ >
9
+ <template v-slot:activator="{ props }">
10
+ <v-btn prepend-icon="mdi-palette-outline" rounded v-bind="props">
11
+ {{ i18n.getLabel("interior") }}
12
+ </v-btn>
13
+ </template>
14
+ <v-list class="interior-selector-list">
15
+ <v-list-item
16
+ density="compact"
17
+ v-for="(at, i) in availableArchetypes"
18
+ :key="`at-menuitem-${i}`"
19
+ @click="$emit('select-interior', at.archetypeID)"
20
+ :active="i === selectedIndex"
21
+ class="interior-selector-list-item"
22
+ >
23
+ <template v-slot:prepend>
24
+ <v-img
25
+ width="100"
26
+ max-width="100"
27
+ height="66"
28
+ :src="getUrl(at.url)"
29
+ />
30
+ </template>
31
+ <v-list-item-title class="text-caption py-2 px-4">
32
+ {{ i18n.get(at.title) }}
33
+ </v-list-item-title>
34
+ </v-list-item>
35
+ </v-list>
36
+ </v-menu>
37
+ </div>
38
+ </template>
39
+
40
+ <script>
41
+ export default {
42
+ name: "InteriorSelector",
43
+ emits: ["select-interior"],
44
+ props: {
45
+ availableArchetypes: { type: Array, required: true },
46
+ selectedIndex: { type: Number, required: true },
47
+ },
48
+ inject: ["i18n", "localMode", "fileLoader"],
49
+ methods: {
50
+ getUrl(url) {
51
+ let actualUrl = url;
52
+
53
+ if (this.localMode) {
54
+ actualUrl = `${this.fileLoader.getURL(url)}`;
55
+ }
56
+
57
+ return actualUrl;
58
+ },
59
+ },
60
+ };
61
+ </script>
62
+
63
+ <style scoped>
64
+ .v-image {
65
+ background-color: #aaa;
66
+ }
67
+
68
+ .interior-selector-list {
69
+ box-shadow: none !important;
70
+ padding: 10px;
71
+ background: transparent !important;
72
+ }
73
+ .interior-selector-list-item {
74
+ padding: 0;
75
+ padding-inline-start: 0 !important;
76
+ background-color: #fff;
77
+ border: 2px solid #fff;
78
+ transition: transform 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67);
79
+ margin-top: 10px;
80
+ }
81
+
82
+ .interior-selector-list-item:hover {
83
+ transform: translateX(-5px);
84
+ border: 2px solid #4caf50;
85
+ }
86
+
87
+ .interior-selector-list-item .v-list-item-title {
88
+ word-break: break-word;
89
+ }
90
+ </style>