@qispace/vue3-player 0.0.15 → 0.1.1

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 (154) hide show
  1. package/dist/vue-components/config/vite.config.d.ts +2 -0
  2. package/dist/vue-components/config/vite.config.dev.d.ts +2 -0
  3. package/dist/vue-components/config/vite.config.web-components.d.ts +2 -0
  4. package/dist/vue-components/src/components/apartmentChooser/VApartmentChooser.vue.d.ts +129 -0
  5. package/dist/vue-components/src/components/apartmentChooser/VApartmentChooserNavigation.vue.d.ts +46 -0
  6. package/dist/vue-components/src/components/apartmentChooser/VApartmentChooserRaster.vue.d.ts +77 -0
  7. package/dist/vue-components/src/components/apartmentChooser/VApartmentChooserRotator.vue.d.ts +43 -0
  8. package/dist/vue-components/src/components/apartmentChooser/VApartmentChooserSvg.vue.d.ts +77 -0
  9. package/dist/vue-components/src/components/apartmentChooser/index.d.ts +5 -0
  10. package/dist/vue-components/src/components/apartmentChooser/types.d.ts +13 -0
  11. package/dist/vue-components/src/components/buildingPicker/VBuildingChooser.vue.d.ts +93 -0
  12. package/dist/vue-components/src/components/buildingPicker/VBuildingChooserRaster.vue.d.ts +97 -0
  13. package/dist/vue-components/src/components/buildingPicker/VBuildingChooserRasterOverlay.vue.d.ts +46 -0
  14. package/dist/vue-components/src/components/buildingPicker/VBuildingChooserSceneImageStack.vue.d.ts +27 -0
  15. package/dist/vue-components/src/components/buildingPicker/VBuildingChooserSunSimControl.vue.d.ts +37 -0
  16. package/dist/vue-components/src/components/buildingPicker/VBuildingChooserSvg.vue.d.ts +102 -0
  17. package/dist/vue-components/src/components/buildingPicker/index.d.ts +6 -0
  18. package/dist/vue-components/src/components/buildingPicker/types.d.ts +11 -0
  19. package/dist/{components → vue-components/src/components}/index.d.ts +1 -1
  20. package/dist/vue-components/src/components/shared/VFloatingCard.vue.d.ts +30 -0
  21. package/dist/vue-components/src/components/shared/VHoverProbe.vue.d.ts +4 -0
  22. package/dist/vue-components/src/components/shared/VNorthDirection.vue.d.ts +15 -0
  23. package/dist/vue-components/src/components/shared/VZoomBox.vue.d.ts +60 -0
  24. package/dist/vue-components/src/components/shared/index.d.ts +4 -0
  25. package/dist/vue-components/src/components/virtualTour/VCompass.vue.d.ts +15 -0
  26. package/dist/vue-components/src/components/virtualTour/VDisclaimer.vue.d.ts +2 -0
  27. package/dist/vue-components/src/components/virtualTour/VFloorLevel.vue.d.ts +38 -0
  28. package/dist/vue-components/src/components/virtualTour/VFullScreenButton.vue.d.ts +19 -0
  29. package/dist/vue-components/src/components/virtualTour/VInteriorSelector.vue.d.ts +21 -0
  30. package/dist/vue-components/src/components/virtualTour/VPlayer.vue.d.ts +74 -0
  31. package/dist/vue-components/src/components/virtualTour/VSettingsUI.vue.d.ts +23 -0
  32. package/dist/vue-components/src/components/virtualTour/VSingleImage.vue.d.ts +31 -0
  33. package/dist/vue-components/src/components/virtualTour/VSocialShare.vue.d.ts +2 -0
  34. package/dist/vue-components/src/components/virtualTour/VTimeOfDay.vue.d.ts +34 -0
  35. package/dist/vue-components/src/components/virtualTour/VTutorial.vue.d.ts +19 -0
  36. package/dist/vue-components/src/components/virtualTour/VViewModeToggle.vue.d.ts +19 -0
  37. package/dist/vue-components/src/components/virtualTour/VVirtualTour.vue.d.ts +156 -0
  38. package/dist/vue-components/src/components/virtualTour/VWaypointCarousel.vue.d.ts +25 -0
  39. package/dist/vue-components/src/components/virtualTour/index.d.ts +1 -0
  40. package/dist/vue-components/src/components/virtualTour/minimap/VMiniMap.vue.d.ts +35 -0
  41. package/dist/vue-components/src/components/virtualTour/minimap/VMiniMapMap.vue.d.ts +25 -0
  42. package/dist/vue-components/src/components/virtualTour/minimap/VMinimapCompass.vue.d.ts +19 -0
  43. package/dist/vue-components/src/components/virtualTour/minimap/VMoveable.vue.d.ts +18 -0
  44. package/dist/vue-components/src/components/virtualTour/minimap/VRotationMarker.vue.d.ts +15 -0
  45. package/dist/vue-components/src/components/virtualTour/minimap/VSunSimulationSlider.vue.d.ts +23 -0
  46. package/dist/vue-components/src/components/virtualTour/minimap/index.d.ts +1 -0
  47. package/dist/vue-components/src/lib/apartmentChooser/BuildingViewerModel.d.ts +18 -0
  48. package/dist/vue-components/src/lib/apartmentChooser/RotationStep.d.ts +10 -0
  49. package/dist/vue-components/src/lib/apartmentChooser/SceneRotator.d.ts +10 -0
  50. package/dist/vue-components/src/lib/apartmentChooser/index.d.ts +3 -0
  51. package/dist/vue-components/src/lib/buildingPicker/BuildingMap.d.ts +7 -0
  52. package/dist/vue-components/src/lib/buildingPicker/BuildingPickerResourceProvider.d.ts +27 -0
  53. package/dist/vue-components/src/lib/buildingPicker/CanvasRaster.d.ts +8 -0
  54. package/dist/vue-components/src/lib/buildingPicker/DayOfYearSelector.d.ts +12 -0
  55. package/dist/vue-components/src/lib/buildingPicker/SampleRaster.d.ts +5 -0
  56. package/dist/vue-components/src/lib/buildingPicker/index.d.ts +5 -0
  57. package/dist/vue-components/src/lib/shared/BatchLoadTracker.d.ts +17 -0
  58. package/dist/vue-components/src/lib/shared/I18N.d.ts +7 -0
  59. package/dist/vue-components/src/lib/shared/ResourceLoader.d.ts +5 -0
  60. package/dist/vue-components/src/lib/shared/index.d.ts +3 -0
  61. package/dist/vue-components/src/lib/virtualTour/CameraSnapshot.d.ts +5 -0
  62. package/dist/vue-components/src/lib/virtualTour/FullscreenModel.d.ts +13 -0
  63. package/dist/vue-components/src/vue-components.d.ts +2 -0
  64. package/dist/vue-components/src/vue-components.esm.d.ts +4 -0
  65. package/dist/vue-components/src/web-components.d.ts +11 -0
  66. package/dist/vue-components/style.css +1 -0
  67. package/dist/vue-components/vue3-player.js +4744 -0
  68. package/dist/vue-components/vue3-player.umd.cjs +1 -0
  69. package/package.json +25 -15
  70. package/dist/components/apartmentChooser/QiApartmentChooser.vue.d.ts +0 -2
  71. package/dist/components/apartmentChooser/QiApartmentChooserNavigation.vue.d.ts +0 -51
  72. package/dist/components/apartmentChooser/QiApartmentChooserRaster.vue.d.ts +0 -2
  73. package/dist/components/apartmentChooser/QiApartmentChooserRotator.vue.d.ts +0 -65
  74. package/dist/components/apartmentChooser/QiApartmentChooserSvg.vue.d.ts +0 -2
  75. package/dist/components/buildingPicker/QiBuildingChooser.vue.d.ts +0 -121
  76. package/dist/components/buildingPicker/QiBuildingChooserRaster.vue.d.ts +0 -2
  77. package/dist/components/buildingPicker/QiBuildingChooserRasterOverlay.vue.d.ts +0 -53
  78. package/dist/components/buildingPicker/QiBuildingChooserSceneImageStack.vue.d.ts +0 -32
  79. package/dist/components/buildingPicker/QiBuildingChooserSunSimControl.vue.d.ts +0 -42
  80. package/dist/components/buildingPicker/QiBuildingChooserSvg.vue.d.ts +0 -2
  81. package/dist/components/shared/QiFloatingCard.vue.d.ts +0 -18
  82. package/dist/components/shared/QiHoverProbe.vue.d.ts +0 -4
  83. package/dist/components/shared/QiNorthDirection.vue.d.ts +0 -21
  84. package/dist/components/shared/QiZoomBox.vue.d.ts +0 -83
  85. package/dist/components/virtualTourV2/Compass.vue.d.ts +0 -22
  86. package/dist/components/virtualTourV2/Disclaimer.vue.d.ts +0 -4
  87. package/dist/components/virtualTourV2/FloorLevel.vue.d.ts +0 -27
  88. package/dist/components/virtualTourV2/FullScreenButton.vue.d.ts +0 -14
  89. package/dist/components/virtualTourV2/InteriorSelector.vue.d.ts +0 -24
  90. package/dist/components/virtualTourV2/Player.vue.d.ts +0 -82
  91. package/dist/components/virtualTourV2/SettingsUI.vue.d.ts +0 -105
  92. package/dist/components/virtualTourV2/SingleImage.vue.d.ts +0 -26
  93. package/dist/components/virtualTourV2/SocialShare.vue.d.ts +0 -10
  94. package/dist/components/virtualTourV2/TimeOfDay.vue.d.ts +0 -27
  95. package/dist/components/virtualTourV2/Tutorial.vue.d.ts +0 -23
  96. package/dist/components/virtualTourV2/ViewModeToggle.vue.d.ts +0 -16
  97. package/dist/components/virtualTourV2/VirtualTourV2.vue.d.ts +0 -322
  98. package/dist/components/virtualTourV2/WaypointCarousel.vue.d.ts +0 -31
  99. package/dist/components/virtualTourV2/index.d.ts +0 -1
  100. package/dist/components/virtualTourV2/minimapv2/MiniMapMap.vue.d.ts +0 -82
  101. package/dist/components/virtualTourV2/minimapv2/MiniMapV2.vue.d.ts +0 -78
  102. package/dist/components/virtualTourV2/minimapv2/MinimapCompass.vue.d.ts +0 -30
  103. package/dist/components/virtualTourV2/minimapv2/Moveable.vue.d.ts +0 -8
  104. package/dist/components/virtualTourV2/minimapv2/RotationMarkerV2.vue.d.ts +0 -12
  105. package/dist/components/virtualTourV2/minimapv2/SunsimulationSlider.vue.d.ts +0 -48
  106. package/dist/components/virtualTourV2/minimapv2/index.d.ts +0 -1
  107. package/dist/style.css +0 -1
  108. package/dist/vue3-player.js +0 -5414
  109. package/dist/vue3-player.umd.cjs +0 -1
  110. package/src/components/apartmentChooser/QiApartmentChooser.vue +0 -319
  111. package/src/components/apartmentChooser/QiApartmentChooserNavigation.vue +0 -88
  112. package/src/components/apartmentChooser/QiApartmentChooserRaster.vue +0 -408
  113. package/src/components/apartmentChooser/QiApartmentChooserRotator.vue +0 -202
  114. package/src/components/apartmentChooser/QiApartmentChooserSvg.vue +0 -257
  115. package/src/components/apartmentChooser/index.js +0 -5
  116. package/src/components/buildingPicker/QiBuildingChooser.vue +0 -61
  117. package/src/components/buildingPicker/QiBuildingChooserRaster.vue +0 -312
  118. package/src/components/buildingPicker/QiBuildingChooserRasterOverlay.vue +0 -96
  119. package/src/components/buildingPicker/QiBuildingChooserSceneImageStack.vue +0 -89
  120. package/src/components/buildingPicker/QiBuildingChooserSunSimControl.vue +0 -257
  121. package/src/components/buildingPicker/QiBuildingChooserSvg.vue +0 -414
  122. package/src/components/buildingPicker/index.js +0 -6
  123. package/src/components/index.ts +0 -4
  124. package/src/components/shared/QiFloatingCard.vue +0 -76
  125. package/src/components/shared/QiHoverProbe.vue +0 -22
  126. package/src/components/shared/QiNorthDirection.vue +0 -27
  127. package/src/components/shared/QiZoomBox.vue +0 -322
  128. package/src/components/shared/index.js +0 -4
  129. package/src/components/virtualTourV2/Compass.vue +0 -37
  130. package/src/components/virtualTourV2/Disclaimer.vue +0 -41
  131. package/src/components/virtualTourV2/FloorLevel.vue +0 -73
  132. package/src/components/virtualTourV2/FullScreenButton.vue +0 -23
  133. package/src/components/virtualTourV2/InteriorSelector.vue +0 -90
  134. package/src/components/virtualTourV2/ManualSlideShow.vue +0 -198
  135. package/src/components/virtualTourV2/ManualSlideShowPlayer.vue +0 -159
  136. package/src/components/virtualTourV2/Player.vue +0 -300
  137. package/src/components/virtualTourV2/ScrollHelper.vue +0 -74
  138. package/src/components/virtualTourV2/SettingsUI.vue +0 -355
  139. package/src/components/virtualTourV2/SingleImage.vue +0 -36
  140. package/src/components/virtualTourV2/SocialShare.vue +0 -163
  141. package/src/components/virtualTourV2/TimeOfDay.vue +0 -50
  142. package/src/components/virtualTourV2/Tutorial.vue +0 -690
  143. package/src/components/virtualTourV2/ViewModeToggle.vue +0 -24
  144. package/src/components/virtualTourV2/VirtualTourV2.vue +0 -875
  145. package/src/components/virtualTourV2/WaypointCarousel.vue +0 -162
  146. package/src/components/virtualTourV2/index.ts +0 -20
  147. package/src/components/virtualTourV2/minimapv2/MiniMapMap.vue +0 -262
  148. package/src/components/virtualTourV2/minimapv2/MiniMapV2.vue +0 -110
  149. package/src/components/virtualTourV2/minimapv2/MinimapCompass.vue +0 -39
  150. package/src/components/virtualTourV2/minimapv2/Moveable.vue +0 -208
  151. package/src/components/virtualTourV2/minimapv2/RotationMarkerV2.vue +0 -79
  152. package/src/components/virtualTourV2/minimapv2/SunsimulationSlider.vue +0 -203
  153. package/src/components/virtualTourV2/minimapv2/index.ts +0 -1
  154. /package/dist/{lib → vue-components/src/lib}/index.d.ts +0 -0
@@ -1,162 +0,0 @@
1
- <template>
2
- <div class="waypoint-carousel">
3
- <v-slide-group
4
- v-model="activeIndex"
5
- active-class="active-apt"
6
- selected-class="active-apt"
7
- show-arrows
8
- center-active
9
- mandatory
10
- >
11
- <template #prev>
12
- <v-hover v-slot="{ hover }">
13
- <v-btn
14
- elevation="0"
15
- class="carousel-button"
16
- :class="{ mobile: isMobile }"
17
- @click="$emit('previous')"
18
- >
19
- <v-icon :color="hover ? '#999' : '#d2d2d2'" x-large>
20
- mdi-chevron-left
21
- </v-icon>
22
- </v-btn>
23
- </v-hover>
24
- </template>
25
- <template #next>
26
- <v-hover v-slot="{ hover }">
27
- <v-btn
28
- elevation="0"
29
- class="carousel-button"
30
- :class="{ mobile: isMobile }"
31
- @click="$emit('next')"
32
- >
33
- <v-icon :color="hover ? '#999' : '#d2d2d2'" x-large>
34
- mdi-chevron-right
35
- </v-icon>
36
- </v-btn>
37
- </v-hover>
38
- </template>
39
- <v-slide-group-item
40
- v-for="thumb in thumbnails"
41
- :key="thumb.id"
42
- v-slot="{ toggle, selectedClass }"
43
- >
44
- <v-card
45
- :class="['ma-2', selectedClass]"
46
- align="center"
47
- justify="center"
48
- :height="isMobile ? 50 : 100"
49
- :width="isMobile ? 80 : 160"
50
- elevation="0"
51
- style="overflow: hidden"
52
- @click="goToCamera(thumb.id, toggle)"
53
- >
54
- <v-img max-height="100" max-width="160" :src="thumb.thumbnailUrl" />
55
- </v-card>
56
- </v-slide-group-item>
57
- </v-slide-group>
58
- </div>
59
- </template>
60
-
61
- <script>
62
- const KEY_ARROW_LEFT = 37;
63
- const KEY_ARROW_RIGHT = 39;
64
-
65
- export default {
66
- name: "WaypointCarousel",
67
- props: {
68
- thumbnails: { type: Array, required: true },
69
- active: { type: Number, required: true },
70
- },
71
- data() {
72
- return {
73
- activeThumb: 0,
74
- };
75
- },
76
- computed: {
77
- activeIndex: {
78
- get() {
79
- return this.active;
80
- },
81
- set(value) {
82
- this.activeThumb = value;
83
- },
84
- },
85
- isMobile() {
86
- return /Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(
87
- window.navigator.userAgent
88
- );
89
- },
90
- },
91
- mounted() {
92
- window.addEventListener("keydown", this.keyNavigate);
93
- },
94
- beforeUnmount() {
95
- window.removeEventListener("keydown", this.keyNavigate);
96
- },
97
- methods: {
98
- keyNavigate(e) {
99
- switch (e.keyCode) {
100
- case e.keyCode === KEY_ARROW_LEFT:
101
- this.$emit("previous");
102
- case e.keyCode === KEY_ARROW_RIGHT:
103
- this.$emit("next");
104
- default:
105
- return;
106
- }
107
- },
108
- goToCamera(cameraId, toggleEvent) {
109
- toggleEvent();
110
- this.$emit("goto", cameraId);
111
- },
112
- },
113
- };
114
- </script>
115
-
116
- <style scoped>
117
- .v-card {
118
- transition: box-shadow 0.3s ease-in-out;
119
- border: 2px solid transparent;
120
- }
121
- :deep(.v-slide-group__content) {
122
- justify-content: center;
123
- }
124
- :deep(.v-slide-group__next--disabled) {
125
- pointer-events: all !important;
126
- }
127
-
128
- :deep(.v-slide-group__prev--disabled) {
129
- pointer-events: all !important;
130
- }
131
-
132
- .carousel-button {
133
- height: 108px !important;
134
- min-width: 54px !important;
135
- padding: 0 !important;
136
- z-index: 2;
137
- background-color: #fff !important;
138
- border: 2px solid #d2d2d2;
139
- color: #d2d2d2 !important;
140
- }
141
- .carousel-button.mobile {
142
- height: 58px !important;
143
- min-width: 38px !important;
144
- }
145
- .carousel-button:hover {
146
- border: 2px solid #999 !important;
147
- color: #999 !important;
148
- }
149
- .carousel-button:hover:before,
150
- .carousel-button:hover:after {
151
- background-color: #fff !important;
152
- }
153
- .align-baseline {
154
- align-items: baseline;
155
- }
156
- .active-apt {
157
- border: 4px solid #4caf50 !important;
158
- }
159
- .v-image {
160
- border-radius: 0 !important;
161
- }
162
- </style>
@@ -1,20 +0,0 @@
1
- // // export {default as Compass } from './Compass.vue'
2
- // export {default as Disclaimer } from './Disclaimer.vue'
3
- // export {default as FloorLevel } from './FloorLevel.vue'
4
- // export {default as FullScreenButton } from './FullScreenButton.vue'
5
- // export {default as InteriorSelector } from './InteriorSelector.vue'
6
- // export {default as ManualSlideShow } from './ManualSlideShow.vue'
7
- // export {default as ManualSlideShowPlayer } from './ManualSlideShowPlayer.vue'
8
- // export {default as Player } from './Player.vue'
9
- // export {default as ScrollHelper } from './ScrollHelper.vue'
10
- // export {default as SettingsUI } from './SettingsUI.vue'
11
- // export {default as SingleImage } from './SingleImage.vue'
12
- // export {default as SocialShare } from './SocialShare.vue'
13
- // export {default as TimeOfDay } from './TimeOfDay.vue'
14
- // export {default as Tutorial } from './Tutorial.vue'
15
- // export {default as ViewModeToggle } from './ViewModeToggle.vue'
16
-
17
- // export {default as WaypointCarousel } from './WaypointCarousel.vue'
18
-
19
- export { default as VirtualTourV2 } from './VirtualTourV2.vue'
20
- // export {default as ManualSlideShow } from './ManualSlideShow.vue'
@@ -1,262 +0,0 @@
1
- <template>
2
- <div class="minimap-wrapper d-flex align-stretch justify-space-between">
3
- <div class="minimap-container">
4
- <div class="web-minimap" :style="transformStyle">
5
- <div class="minimap-background-image" :style="backgroundStyle"></div>
6
- <div class="center-pivot" :style="centerPivotStyle">
7
- <div
8
- v-for="oneCamera in camerasWithRelativePosition"
9
- :key="oneCamera.id"
10
- >
11
- <div
12
- v-if="currentCameraObject.floorLevel === oneCamera.floorLevel"
13
- class="single-camera-marker"
14
- :style="cameraPositionStyle(oneCamera)"
15
- ></div>
16
- <rotation-marker-v2
17
- v-if="currentCameraObject.id === oneCamera.id"
18
- class="rotation-marker-component"
19
- :rotation="rotationAngle"
20
- :style="{ ...cameraPositionStyle(oneCamera) }"
21
- />
22
- </div>
23
- </div>
24
- </div>
25
- </div>
26
- </div>
27
- </template>
28
-
29
- <script>
30
- import * as THREE from "three";
31
- import RotationMarkerV2 from "./RotationMarkerV2.vue";
32
-
33
- function _rad(n) {
34
- return THREE.MathUtils.degToRad(n);
35
- }
36
-
37
- export default {
38
- name: "MiniMapMap",
39
- components: { RotationMarkerV2 },
40
- props: {
41
- backgroundImage: {
42
- type: String,
43
- required: true,
44
- },
45
- allCameras: {
46
- type: Array,
47
- required: true,
48
- },
49
- minimapCamera: {
50
- type: Object,
51
- required: true,
52
- },
53
- currentCamera: {
54
- type: String,
55
- required: true,
56
- },
57
- rotation: {
58
- type: Number,
59
- required: true,
60
- },
61
- transformAngle: {
62
- type: Number,
63
- required: true,
64
- },
65
- },
66
- data() {
67
- return {
68
- planeWidth: 512,
69
- planeHeight: 384,
70
- topLeftCorner: new THREE.Vector3(),
71
- centerPivot: new THREE.Object3D(),
72
- centerPivotStyle: {},
73
- scale: 1,
74
- resizeOverver: undefined,
75
- };
76
- },
77
- computed: {
78
- apartmentCameras() {
79
- return this.allCameras;
80
- },
81
- currentCameraObject() {
82
- return this.allCameras.find((item) => {
83
- return item.id === this.currentCamera;
84
- });
85
- },
86
- rotationAngle() {
87
- return this.rotation;
88
- },
89
- minimapCameraPositionVector() {
90
- return new THREE.Vector3(
91
- this.minimapCamera.position.x,
92
- this.minimapCamera.position.y,
93
- this.minimapCamera.position.z
94
- );
95
- },
96
- floorVerticalPosition() {
97
- return parseFloat(this.currentCameraObject.floor_vertical_position);
98
- },
99
- camerasWithRelativePosition() {
100
- return this.apartmentCameras.map((oneCamera) => {
101
- const cameraPosition = oneCamera.uposition.split(",");
102
-
103
- const position = new THREE.Vector3(
104
- cameraPosition[0] - this.minimapCameraPositionVector.x,
105
- 0,
106
- cameraPosition[2] - this.minimapCameraPositionVector.z
107
- );
108
-
109
- const toReturn = {
110
- ...oneCamera,
111
- ...this.relativePosition(this.topLeftCorner, position),
112
- };
113
-
114
- return toReturn;
115
- });
116
- },
117
- backgroundStyle() {
118
- return `background-image: url(${this.backgroundImage});`;
119
- },
120
- transformStyle() {
121
- let actualScale = this.scale > 1 ? 1 : this.scale;
122
- if (actualScale < 0.8) actualScale = 0.4;
123
-
124
- return `scale: ${actualScale > 1 ? 1 : actualScale}; transform: rotate(${
125
- this.transformAngle
126
- }deg);`;
127
- },
128
- },
129
- mounted() {
130
- this.calculateRelativeValues();
131
- this.upadteCenterPivot();
132
- this.calcualteScale();
133
-
134
- const element = document.getElementById("moveableDiv");
135
- if (element)
136
- this.resizeOverver = new ResizeObserver(this.calcualteScale).observe(
137
- element
138
- );
139
- },
140
- beforeUpdate() {
141
- this.calculateRelativeValues();
142
- this.upadteCenterPivot();
143
- },
144
- beforeUnmount() {
145
- if (this.resizeOverver) {
146
- this.resizeOverver.unobserve(document.getElementById("moveableDiv"));
147
- }
148
- },
149
- methods: {
150
- upadteCenterPivot() {
151
- this.centerPivot.rotation.x = 180;
152
- this.centerPivot.rotation.y = this.minimapCamera.rotation.y * -1;
153
-
154
- this.centerPivotStyle = {
155
- transform: `rotateZ(${this.centerPivot.rotation.y}deg) rotateX(${this.centerPivot.rotation.x}deg)`,
156
- };
157
- },
158
- cameraPositionStyle(camera) {
159
- return {
160
- top: `${Math.abs(camera.top)}%`,
161
- left: `${Math.abs(camera.left)}%`,
162
- };
163
- },
164
- relativePosition(topLeftCorner, position) {
165
- var direction = new THREE.Vector3();
166
- const relativePosition = direction.subVectors(topLeftCorner, position);
167
-
168
- return {
169
- relativePosition,
170
- left: (relativePosition.x / this.planeWidth) * 100,
171
- top: (relativePosition.z / this.planeHeight) * 100,
172
- };
173
- },
174
- calculateRelativeValues() {
175
- const cameraHeight =
176
- this.minimapCamera.position.y - this.floorVerticalPosition;
177
- this.planeHeight =
178
- 2 * (cameraHeight * Math.tan(_rad(this.minimapCamera.fovY / 2)));
179
- this.planeWidth = (512 / 384) * this.planeHeight;
180
-
181
- const halfHeight = this.planeHeight / 2;
182
- const halfWidth = this.planeWidth / 2;
183
- const topLeftCorner = new THREE.Vector3(
184
- halfWidth * -1,
185
- 0,
186
- halfHeight * -1
187
- );
188
- this.topLeftCorner = topLeftCorner;
189
- },
190
- calcualteScale() {
191
- const parentElement = document.getElementById("moveableDiv");
192
-
193
- if (!parentElement) return;
194
-
195
- const heightScale = (parentElement.offsetHeight / 384) * 0.8;
196
- const widthScale = (parentElement.offsetWidth / 512) * 0.8;
197
-
198
- if (parentElement.offsetHeight > parentElement.offsetWidth) {
199
- this.scale = widthScale * 0.5;
200
- } else {
201
- this.scale = heightScale * 0.9;
202
- }
203
- },
204
- },
205
- };
206
- </script>
207
- <style scoped>
208
- .minimap-container {
209
- position: relative;
210
- }
211
-
212
- .web-minimap {
213
- position: relative;
214
- width: 512px;
215
- height: 385px;
216
- overflow: hidden;
217
- transition: transform 0.5s ease-in;
218
- }
219
-
220
- @media (max-width: 650px) {
221
- .web-minimap {
222
- scale: 0.7;
223
- }
224
- }
225
-
226
- @media (max-width: 480px) {
227
- .web-minimap {
228
- scale: 0.5;
229
- }
230
- }
231
-
232
- .minimap-background-image {
233
- position: absolute;
234
- width: 100%;
235
- height: 100%;
236
- }
237
-
238
- .single-camera-marker {
239
- position: absolute;
240
- width: 7px;
241
- height: 7px;
242
- background: #fff;
243
- border-radius: 50%;
244
- z-index: 2;
245
- transform: translate(-50%, -50%);
246
- border: 0px;
247
- }
248
-
249
- .rotation-marker-component {
250
- z-index: 3;
251
- position: absolute;
252
- width: 80px;
253
- height: 80px;
254
- transform: translate(-50%, -50%);
255
- }
256
-
257
- .center-pivot {
258
- position: absolute;
259
- width: 100%;
260
- height: 100%;
261
- }
262
- </style>
@@ -1,110 +0,0 @@
1
- <template>
2
- <moveable @close="$emit('close')" @transform="transform">
3
- <template v-slot:body>
4
- <minimap-compass
5
- :scale="scale"
6
- :minimapCamera="minimapCamera"
7
- :transformAngle="transformAngle"
8
- />
9
- <div>
10
- <mini-map-map
11
- :transformAngle="transformAngle"
12
- :allCameras="allCameras"
13
- :backgroundImage="backgroundImage"
14
- :rotation="rotation"
15
- :currentCamera="currentCamera"
16
- :minimapCamera="minimapCamera"
17
- />
18
- </div>
19
- </template>
20
- <template v-slot:footer>
21
- <sunsimulation-slider
22
- :minimapJSON="minimapJSON"
23
- :root="`${rootUrl}/minimap/`"
24
- :level="level"
25
- @set-background-image="setBackgroundImage"
26
- />
27
- </template>
28
- </moveable>
29
- </template>
30
- <script>
31
- import MiniMapMap from "./MiniMapMap.vue";
32
- import Moveable from "./Moveable.vue";
33
- import MinimapCompass from "./MinimapCompass.vue";
34
- import SunsimulationSlider from "./SunsimulationSlider.vue";
35
-
36
- export default {
37
- components: { MiniMapMap, Moveable, MinimapCompass, SunsimulationSlider },
38
- name: "MiniMapV2",
39
- emits: ["close", "set-background-image"],
40
- props: {
41
- minimapJSON: {
42
- type: Array,
43
- required: true,
44
- },
45
- rootUrl: {
46
- type: String,
47
- required: true,
48
- },
49
- backgroundImage: {
50
- type: String,
51
- required: true,
52
- },
53
- allCameras: {
54
- type: Array,
55
- required: true,
56
- },
57
- minimapCamera: {
58
- type: Object,
59
- required: true,
60
- },
61
- currentCamera: {
62
- type: String,
63
- required: true,
64
- },
65
- level: {
66
- type: Number,
67
- required: true,
68
- },
69
- rotation: {
70
- type: Number,
71
- required: true,
72
- },
73
- },
74
- data() {
75
- return {
76
- transformAngle: 0,
77
- };
78
- },
79
- computed: {
80
- scale() {
81
- let scale = 1;
82
- if (this.transformAngle !== 0) {
83
- if (Math.abs(this.transformAngle) % 180 === 0) {
84
- scale = 1;
85
- } else {
86
- scale = -1;
87
- }
88
- }
89
-
90
- return scale;
91
- },
92
- },
93
- methods: {
94
- setBackgroundImage(image) {
95
- this.$emit("set-background-image", image);
96
- },
97
- transform() {
98
- this.transformAngle = this.transformAngle + 90;
99
- },
100
- },
101
- };
102
- </script>
103
- <style scoped>
104
- .minimap-compass {
105
- position: absolute;
106
- right: 5px;
107
- top: 50px;
108
- z-index: 11;
109
- }
110
- </style>
@@ -1,39 +0,0 @@
1
- <template>
2
- <div class="minimap-compass" :style="{ scale: scale }">
3
- <qi-north-direction class="north-indicator" :longitude="northDirection" />
4
- </div>
5
- </template>
6
- <script>
7
- import QiNorthDirection from '../../shared/QiNorthDirection.vue'
8
-
9
- export default {
10
- name: 'MinimapCompass',
11
- components: { QiNorthDirection },
12
- props: {
13
- scale: {
14
- type: Number,
15
- required: true,
16
- },
17
- minimapCamera: {
18
- type: Object,
19
- required: true,
20
- },
21
- transformAngle: {
22
- type: Number,
23
- required: true,
24
- },
25
- },
26
- computed: {
27
- northDirection() {
28
- return this.minimapCamera.rotation
29
- ? this.minimapCamera.rotation.y + this.transformAngle - 90
30
- : 0
31
- },
32
- },
33
- }
34
- </script>
35
- <style scoped>
36
- .minimap-compass {
37
- width: 50px;
38
- }
39
- </style>