@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.
- package/dist/vue-components/config/vite.config.d.ts +2 -0
- package/dist/vue-components/config/vite.config.dev.d.ts +2 -0
- package/dist/vue-components/config/vite.config.web-components.d.ts +2 -0
- package/dist/vue-components/src/components/apartmentChooser/VApartmentChooser.vue.d.ts +129 -0
- package/dist/vue-components/src/components/apartmentChooser/VApartmentChooserNavigation.vue.d.ts +46 -0
- package/dist/vue-components/src/components/apartmentChooser/VApartmentChooserRaster.vue.d.ts +77 -0
- package/dist/vue-components/src/components/apartmentChooser/VApartmentChooserRotator.vue.d.ts +43 -0
- package/dist/vue-components/src/components/apartmentChooser/VApartmentChooserSvg.vue.d.ts +77 -0
- package/dist/vue-components/src/components/apartmentChooser/index.d.ts +5 -0
- package/dist/vue-components/src/components/apartmentChooser/types.d.ts +13 -0
- package/dist/vue-components/src/components/buildingPicker/VBuildingChooser.vue.d.ts +93 -0
- package/dist/vue-components/src/components/buildingPicker/VBuildingChooserRaster.vue.d.ts +97 -0
- package/dist/vue-components/src/components/buildingPicker/VBuildingChooserRasterOverlay.vue.d.ts +46 -0
- package/dist/vue-components/src/components/buildingPicker/VBuildingChooserSceneImageStack.vue.d.ts +27 -0
- package/dist/vue-components/src/components/buildingPicker/VBuildingChooserSunSimControl.vue.d.ts +37 -0
- package/dist/vue-components/src/components/buildingPicker/VBuildingChooserSvg.vue.d.ts +102 -0
- package/dist/vue-components/src/components/buildingPicker/index.d.ts +6 -0
- package/dist/vue-components/src/components/buildingPicker/types.d.ts +11 -0
- package/dist/{components → vue-components/src/components}/index.d.ts +1 -1
- package/dist/vue-components/src/components/shared/VFloatingCard.vue.d.ts +30 -0
- package/dist/vue-components/src/components/shared/VHoverProbe.vue.d.ts +4 -0
- package/dist/vue-components/src/components/shared/VNorthDirection.vue.d.ts +15 -0
- package/dist/vue-components/src/components/shared/VZoomBox.vue.d.ts +60 -0
- package/dist/vue-components/src/components/shared/index.d.ts +4 -0
- package/dist/vue-components/src/components/virtualTour/VCompass.vue.d.ts +15 -0
- package/dist/vue-components/src/components/virtualTour/VDisclaimer.vue.d.ts +2 -0
- package/dist/vue-components/src/components/virtualTour/VFloorLevel.vue.d.ts +38 -0
- package/dist/vue-components/src/components/virtualTour/VFullScreenButton.vue.d.ts +19 -0
- package/dist/vue-components/src/components/virtualTour/VInteriorSelector.vue.d.ts +21 -0
- package/dist/vue-components/src/components/virtualTour/VPlayer.vue.d.ts +74 -0
- package/dist/vue-components/src/components/virtualTour/VSettingsUI.vue.d.ts +23 -0
- package/dist/vue-components/src/components/virtualTour/VSingleImage.vue.d.ts +31 -0
- package/dist/vue-components/src/components/virtualTour/VSocialShare.vue.d.ts +2 -0
- package/dist/vue-components/src/components/virtualTour/VTimeOfDay.vue.d.ts +34 -0
- package/dist/vue-components/src/components/virtualTour/VTutorial.vue.d.ts +19 -0
- package/dist/vue-components/src/components/virtualTour/VViewModeToggle.vue.d.ts +19 -0
- package/dist/vue-components/src/components/virtualTour/VVirtualTour.vue.d.ts +156 -0
- package/dist/vue-components/src/components/virtualTour/VWaypointCarousel.vue.d.ts +25 -0
- package/dist/vue-components/src/components/virtualTour/index.d.ts +1 -0
- package/dist/vue-components/src/components/virtualTour/minimap/VMiniMap.vue.d.ts +35 -0
- package/dist/vue-components/src/components/virtualTour/minimap/VMiniMapMap.vue.d.ts +25 -0
- package/dist/vue-components/src/components/virtualTour/minimap/VMinimapCompass.vue.d.ts +19 -0
- package/dist/vue-components/src/components/virtualTour/minimap/VMoveable.vue.d.ts +18 -0
- package/dist/vue-components/src/components/virtualTour/minimap/VRotationMarker.vue.d.ts +15 -0
- package/dist/vue-components/src/components/virtualTour/minimap/VSunSimulationSlider.vue.d.ts +23 -0
- package/dist/vue-components/src/components/virtualTour/minimap/index.d.ts +1 -0
- package/dist/vue-components/src/lib/apartmentChooser/BuildingViewerModel.d.ts +18 -0
- package/dist/vue-components/src/lib/apartmentChooser/RotationStep.d.ts +10 -0
- package/dist/vue-components/src/lib/apartmentChooser/SceneRotator.d.ts +10 -0
- package/dist/vue-components/src/lib/apartmentChooser/index.d.ts +3 -0
- package/dist/vue-components/src/lib/buildingPicker/BuildingMap.d.ts +7 -0
- package/dist/vue-components/src/lib/buildingPicker/BuildingPickerResourceProvider.d.ts +27 -0
- package/dist/vue-components/src/lib/buildingPicker/CanvasRaster.d.ts +8 -0
- package/dist/vue-components/src/lib/buildingPicker/DayOfYearSelector.d.ts +12 -0
- package/dist/vue-components/src/lib/buildingPicker/SampleRaster.d.ts +5 -0
- package/dist/vue-components/src/lib/buildingPicker/index.d.ts +5 -0
- package/dist/vue-components/src/lib/shared/BatchLoadTracker.d.ts +17 -0
- package/dist/vue-components/src/lib/shared/I18N.d.ts +7 -0
- package/dist/vue-components/src/lib/shared/ResourceLoader.d.ts +5 -0
- package/dist/vue-components/src/lib/shared/index.d.ts +3 -0
- package/dist/vue-components/src/lib/virtualTour/CameraSnapshot.d.ts +5 -0
- package/dist/vue-components/src/lib/virtualTour/FullscreenModel.d.ts +13 -0
- package/dist/vue-components/src/vue-components.d.ts +2 -0
- package/dist/vue-components/src/vue-components.esm.d.ts +4 -0
- package/dist/vue-components/src/web-components.d.ts +11 -0
- package/dist/vue-components/style.css +1 -0
- package/dist/vue-components/vue3-player.js +4744 -0
- package/dist/vue-components/vue3-player.umd.cjs +1 -0
- package/package.json +25 -15
- package/dist/components/apartmentChooser/QiApartmentChooser.vue.d.ts +0 -2
- package/dist/components/apartmentChooser/QiApartmentChooserNavigation.vue.d.ts +0 -51
- package/dist/components/apartmentChooser/QiApartmentChooserRaster.vue.d.ts +0 -2
- package/dist/components/apartmentChooser/QiApartmentChooserRotator.vue.d.ts +0 -65
- package/dist/components/apartmentChooser/QiApartmentChooserSvg.vue.d.ts +0 -2
- package/dist/components/buildingPicker/QiBuildingChooser.vue.d.ts +0 -121
- package/dist/components/buildingPicker/QiBuildingChooserRaster.vue.d.ts +0 -2
- package/dist/components/buildingPicker/QiBuildingChooserRasterOverlay.vue.d.ts +0 -53
- package/dist/components/buildingPicker/QiBuildingChooserSceneImageStack.vue.d.ts +0 -32
- package/dist/components/buildingPicker/QiBuildingChooserSunSimControl.vue.d.ts +0 -42
- package/dist/components/buildingPicker/QiBuildingChooserSvg.vue.d.ts +0 -2
- package/dist/components/shared/QiFloatingCard.vue.d.ts +0 -18
- package/dist/components/shared/QiHoverProbe.vue.d.ts +0 -4
- package/dist/components/shared/QiNorthDirection.vue.d.ts +0 -21
- package/dist/components/shared/QiZoomBox.vue.d.ts +0 -83
- package/dist/components/virtualTourV2/Compass.vue.d.ts +0 -22
- package/dist/components/virtualTourV2/Disclaimer.vue.d.ts +0 -4
- package/dist/components/virtualTourV2/FloorLevel.vue.d.ts +0 -27
- package/dist/components/virtualTourV2/FullScreenButton.vue.d.ts +0 -14
- package/dist/components/virtualTourV2/InteriorSelector.vue.d.ts +0 -24
- package/dist/components/virtualTourV2/Player.vue.d.ts +0 -82
- package/dist/components/virtualTourV2/SettingsUI.vue.d.ts +0 -105
- package/dist/components/virtualTourV2/SingleImage.vue.d.ts +0 -26
- package/dist/components/virtualTourV2/SocialShare.vue.d.ts +0 -10
- package/dist/components/virtualTourV2/TimeOfDay.vue.d.ts +0 -27
- package/dist/components/virtualTourV2/Tutorial.vue.d.ts +0 -23
- package/dist/components/virtualTourV2/ViewModeToggle.vue.d.ts +0 -16
- package/dist/components/virtualTourV2/VirtualTourV2.vue.d.ts +0 -322
- package/dist/components/virtualTourV2/WaypointCarousel.vue.d.ts +0 -31
- package/dist/components/virtualTourV2/index.d.ts +0 -1
- package/dist/components/virtualTourV2/minimapv2/MiniMapMap.vue.d.ts +0 -82
- package/dist/components/virtualTourV2/minimapv2/MiniMapV2.vue.d.ts +0 -78
- package/dist/components/virtualTourV2/minimapv2/MinimapCompass.vue.d.ts +0 -30
- package/dist/components/virtualTourV2/minimapv2/Moveable.vue.d.ts +0 -8
- package/dist/components/virtualTourV2/minimapv2/RotationMarkerV2.vue.d.ts +0 -12
- package/dist/components/virtualTourV2/minimapv2/SunsimulationSlider.vue.d.ts +0 -48
- package/dist/components/virtualTourV2/minimapv2/index.d.ts +0 -1
- package/dist/style.css +0 -1
- package/dist/vue3-player.js +0 -5414
- package/dist/vue3-player.umd.cjs +0 -1
- package/src/components/apartmentChooser/QiApartmentChooser.vue +0 -319
- package/src/components/apartmentChooser/QiApartmentChooserNavigation.vue +0 -88
- package/src/components/apartmentChooser/QiApartmentChooserRaster.vue +0 -408
- package/src/components/apartmentChooser/QiApartmentChooserRotator.vue +0 -202
- package/src/components/apartmentChooser/QiApartmentChooserSvg.vue +0 -257
- package/src/components/apartmentChooser/index.js +0 -5
- package/src/components/buildingPicker/QiBuildingChooser.vue +0 -61
- package/src/components/buildingPicker/QiBuildingChooserRaster.vue +0 -312
- package/src/components/buildingPicker/QiBuildingChooserRasterOverlay.vue +0 -96
- package/src/components/buildingPicker/QiBuildingChooserSceneImageStack.vue +0 -89
- package/src/components/buildingPicker/QiBuildingChooserSunSimControl.vue +0 -257
- package/src/components/buildingPicker/QiBuildingChooserSvg.vue +0 -414
- package/src/components/buildingPicker/index.js +0 -6
- package/src/components/index.ts +0 -4
- package/src/components/shared/QiFloatingCard.vue +0 -76
- package/src/components/shared/QiHoverProbe.vue +0 -22
- package/src/components/shared/QiNorthDirection.vue +0 -27
- package/src/components/shared/QiZoomBox.vue +0 -322
- package/src/components/shared/index.js +0 -4
- package/src/components/virtualTourV2/Compass.vue +0 -37
- package/src/components/virtualTourV2/Disclaimer.vue +0 -41
- package/src/components/virtualTourV2/FloorLevel.vue +0 -73
- package/src/components/virtualTourV2/FullScreenButton.vue +0 -23
- package/src/components/virtualTourV2/InteriorSelector.vue +0 -90
- package/src/components/virtualTourV2/ManualSlideShow.vue +0 -198
- package/src/components/virtualTourV2/ManualSlideShowPlayer.vue +0 -159
- package/src/components/virtualTourV2/Player.vue +0 -300
- package/src/components/virtualTourV2/ScrollHelper.vue +0 -74
- package/src/components/virtualTourV2/SettingsUI.vue +0 -355
- package/src/components/virtualTourV2/SingleImage.vue +0 -36
- package/src/components/virtualTourV2/SocialShare.vue +0 -163
- package/src/components/virtualTourV2/TimeOfDay.vue +0 -50
- package/src/components/virtualTourV2/Tutorial.vue +0 -690
- package/src/components/virtualTourV2/ViewModeToggle.vue +0 -24
- package/src/components/virtualTourV2/VirtualTourV2.vue +0 -875
- package/src/components/virtualTourV2/WaypointCarousel.vue +0 -162
- package/src/components/virtualTourV2/index.ts +0 -20
- package/src/components/virtualTourV2/minimapv2/MiniMapMap.vue +0 -262
- package/src/components/virtualTourV2/minimapv2/MiniMapV2.vue +0 -110
- package/src/components/virtualTourV2/minimapv2/MinimapCompass.vue +0 -39
- package/src/components/virtualTourV2/minimapv2/Moveable.vue +0 -208
- package/src/components/virtualTourV2/minimapv2/RotationMarkerV2.vue +0 -79
- package/src/components/virtualTourV2/minimapv2/SunsimulationSlider.vue +0 -203
- package/src/components/virtualTourV2/minimapv2/index.ts +0 -1
- /package/dist/{lib → vue-components/src/lib}/index.d.ts +0 -0
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="virtual-tour-v2-wrapper">
|
|
3
|
-
<div class="player-and-components-wrapper">
|
|
4
|
-
<div>
|
|
5
|
-
<manual-slide-show-player :isFullScreen="fullScreen.isActive">
|
|
6
|
-
<template v-slot:slideshow-image>
|
|
7
|
-
<single-image :image="currentImage" />
|
|
8
|
-
</template>
|
|
9
|
-
<template v-slot:top-left></template>
|
|
10
|
-
<template v-slot:top-center>
|
|
11
|
-
<disclaimer :return-url="websiteUrl" />
|
|
12
|
-
</template>
|
|
13
|
-
<template v-slot:top-right></template>
|
|
14
|
-
<template v-slot:center-left>
|
|
15
|
-
<transition name="slide-x-transition">
|
|
16
|
-
<v-btn elevation="1" rounded plain icon @click="previousImage">
|
|
17
|
-
<v-icon color="black darken-1">mdi-chevron-left</v-icon>
|
|
18
|
-
</v-btn>
|
|
19
|
-
</transition>
|
|
20
|
-
</template>
|
|
21
|
-
<template v-slot:center-center></template>
|
|
22
|
-
<template v-slot:center-right>
|
|
23
|
-
<transition name="slide-x-reverse-transition">
|
|
24
|
-
<v-btn elevation="1" rounded plain icon @click="nextImage">
|
|
25
|
-
<v-icon color="black darken-1">mdi-chevron-right</v-icon>
|
|
26
|
-
</v-btn>
|
|
27
|
-
</transition>
|
|
28
|
-
</template>
|
|
29
|
-
<template v-slot:bottom-left>
|
|
30
|
-
<full-screen-button
|
|
31
|
-
v-if="showFullScreen"
|
|
32
|
-
:isFullScreen="fullScreen.isActive"
|
|
33
|
-
class="btn-fullscreen"
|
|
34
|
-
@toggle-fullscreen="toggleFullscreen"
|
|
35
|
-
/>
|
|
36
|
-
<div v-if="showShare" class="btn-placeholder">
|
|
37
|
-
<social-share />
|
|
38
|
-
</div>
|
|
39
|
-
</template>
|
|
40
|
-
<template v-slot:bottom-center>
|
|
41
|
-
<div>
|
|
42
|
-
<waypoint-carousel
|
|
43
|
-
v-if="fullScreen.isActive"
|
|
44
|
-
:class="[fullScreen.isActive ? 'full-screen' : '']"
|
|
45
|
-
:thumbnails="imagesWithThumbnails"
|
|
46
|
-
:active="currentIndex"
|
|
47
|
-
@next="nextImage"
|
|
48
|
-
@previous="previousImage"
|
|
49
|
-
@goto="goToImage"
|
|
50
|
-
/>
|
|
51
|
-
</div>
|
|
52
|
-
</template>
|
|
53
|
-
<template v-slot:bottom-right></template>
|
|
54
|
-
</manual-slide-show-player>
|
|
55
|
-
<waypoint-carousel
|
|
56
|
-
:thumbnails="imagesWithThumbnails"
|
|
57
|
-
:active="currentIndex"
|
|
58
|
-
@next="nextImage"
|
|
59
|
-
@previous="previousImage"
|
|
60
|
-
@goto="goToImage"
|
|
61
|
-
/>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
</template>
|
|
66
|
-
<script>
|
|
67
|
-
import WaypointCarousel from './WaypointCarousel.vue'
|
|
68
|
-
import SocialShare from './SocialShare.vue'
|
|
69
|
-
import { I18N } from '@/lib/shared/I18N'
|
|
70
|
-
import { FullscreenModel } from '@/lib/virtualTour/FullscreenModel'
|
|
71
|
-
import FullScreenButton from './FullScreenButton.vue'
|
|
72
|
-
import Disclaimer from './Disclaimer.vue'
|
|
73
|
-
import ManualSlideShowPlayer from './ManualSlideShowPlayer.vue'
|
|
74
|
-
import SingleImage from './SingleImage.vue'
|
|
75
|
-
|
|
76
|
-
export default {
|
|
77
|
-
name: 'ManualSlideShow',
|
|
78
|
-
components: {
|
|
79
|
-
WaypointCarousel,
|
|
80
|
-
SingleImage,
|
|
81
|
-
SocialShare,
|
|
82
|
-
FullScreenButton,
|
|
83
|
-
Disclaimer,
|
|
84
|
-
ManualSlideShowPlayer,
|
|
85
|
-
},
|
|
86
|
-
provide() {
|
|
87
|
-
const localizer = this.i18n
|
|
88
|
-
? new I18N(this.i18n.labels, this.i18n.language)
|
|
89
|
-
: new I18N()
|
|
90
|
-
return {
|
|
91
|
-
i18n: localizer,
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
props: {
|
|
95
|
-
images: { type: Array, required: true },
|
|
96
|
-
websiteUrl: { type: String, default: () => undefined },
|
|
97
|
-
i18n: { type: Object, default: undefined },
|
|
98
|
-
showFullScreen: { type: Boolean, default: () => true },
|
|
99
|
-
showShare: { type: Boolean, default: () => true },
|
|
100
|
-
defaultWaypointIndex: { type: Number, default: () => 0 },
|
|
101
|
-
},
|
|
102
|
-
data() {
|
|
103
|
-
return {
|
|
104
|
-
loading: true,
|
|
105
|
-
error: false,
|
|
106
|
-
currentIndex: 0,
|
|
107
|
-
currentImageId: undefined,
|
|
108
|
-
fullScreen: new FullscreenModel(document, 'player-wrapper'),
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
computed: {
|
|
112
|
-
imagesWithThumbnails() {
|
|
113
|
-
return this.images.map((item) => {
|
|
114
|
-
return { ...item, thumbnailUrl: item.url }
|
|
115
|
-
})
|
|
116
|
-
},
|
|
117
|
-
currentImage() {
|
|
118
|
-
return this.images[this.currentIndex].url
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
mounted() {
|
|
122
|
-
this.fullScreen.setup()
|
|
123
|
-
},
|
|
124
|
-
methods: {
|
|
125
|
-
toggleFullscreen() {
|
|
126
|
-
this.fullScreen.toggle()
|
|
127
|
-
window.scrollTo({ top: 150, behavior: 'smooth' })
|
|
128
|
-
},
|
|
129
|
-
nextImage() {
|
|
130
|
-
let newIndex = this.currentIndex + 1
|
|
131
|
-
if (newIndex >= this.images.length) newIndex = 0
|
|
132
|
-
this.currentIndex = newIndex
|
|
133
|
-
},
|
|
134
|
-
previousImage() {
|
|
135
|
-
let newIndex = this.currentIndex - 1
|
|
136
|
-
if (newIndex < 0) newIndex = this.images.length - 1
|
|
137
|
-
this.currentIndex = newIndex
|
|
138
|
-
},
|
|
139
|
-
goToImage(imageId, updatePlayerImage = true) {
|
|
140
|
-
let newIndex = this.images.findIndex((item) => item.id === imageId)
|
|
141
|
-
|
|
142
|
-
if (newIndex != -1) {
|
|
143
|
-
this.currentIndex = newIndex
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
}
|
|
148
|
-
</script>
|
|
149
|
-
<style scoped>
|
|
150
|
-
.compass-wrapper {
|
|
151
|
-
width: 50px;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.player-and-components-wrapper {
|
|
155
|
-
position: relative;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.static-image {
|
|
159
|
-
position: absolute;
|
|
160
|
-
top: 0;
|
|
161
|
-
left: 0;
|
|
162
|
-
width: 100%;
|
|
163
|
-
height: auto;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
button.v-btn {
|
|
167
|
-
background: #fff;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.waypoint-carousel.full-screen {
|
|
171
|
-
scale: 0.5;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
div#controls-bottom-center > div {
|
|
175
|
-
display: flex;
|
|
176
|
-
flex-direction: column;
|
|
177
|
-
align-items: center;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.player-error {
|
|
181
|
-
min-height: 400px;
|
|
182
|
-
display: flex;
|
|
183
|
-
align-items: center;
|
|
184
|
-
justify-content: space-around;
|
|
185
|
-
background: #ededed;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
@media only screen and (max-width: 600px) {
|
|
189
|
-
#btn-fullscreen {
|
|
190
|
-
display: none;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
@media all and (orientation: landscape) and (max-height: 499px) {
|
|
194
|
-
#btn-fullscreen {
|
|
195
|
-
display: none;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
</style>
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="player-wrapper">
|
|
3
|
-
<div id="player-sizer">
|
|
4
|
-
<slot name="slideshow-image"></slot>
|
|
5
|
-
<div class="player-control" id="controls-top-left">
|
|
6
|
-
<slot name="top-left"></slot>
|
|
7
|
-
</div>
|
|
8
|
-
<div class="player-control" id="controls-top-center">
|
|
9
|
-
<slot name="top-center"></slot>
|
|
10
|
-
</div>
|
|
11
|
-
<div class="player-control" id="controls-top-right">
|
|
12
|
-
<slot name="top-right"></slot>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="player-control" id="controls-center-left">
|
|
15
|
-
<slot name="center-left"></slot>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="player-control" id="controls-center-center">
|
|
18
|
-
<slot name="center-center"></slot>
|
|
19
|
-
</div>
|
|
20
|
-
<div class="player-control" id="controls-center-right">
|
|
21
|
-
<slot name="center-right"></slot>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="player-control" id="controls-bottom-left">
|
|
24
|
-
<slot name="bottom-left"></slot>
|
|
25
|
-
</div>
|
|
26
|
-
<div class="player-control" id="controls-bottom-center">
|
|
27
|
-
<slot name="bottom-center"></slot>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="player-control" id="controls-bottom-right">
|
|
30
|
-
<slot name="bottom-right"></slot>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|
|
35
|
-
<script>
|
|
36
|
-
export default {
|
|
37
|
-
name: 'ManualSlideShowImage',
|
|
38
|
-
props: {
|
|
39
|
-
isFullScreen: { type: Boolean, required: true },
|
|
40
|
-
},
|
|
41
|
-
data() {
|
|
42
|
-
return {}
|
|
43
|
-
},
|
|
44
|
-
watch: {},
|
|
45
|
-
mounted() {
|
|
46
|
-
window.addEventListener('resize', this.setPlayerSize)
|
|
47
|
-
this.setPlayerSize()
|
|
48
|
-
},
|
|
49
|
-
methods: {
|
|
50
|
-
findClosestAncestor(element, className) {
|
|
51
|
-
let el = element
|
|
52
|
-
let returnElement = element
|
|
53
|
-
while ((el = el.parentNode) && el.className.indexOf(className) < 0);
|
|
54
|
-
returnElement = el
|
|
55
|
-
|
|
56
|
-
return returnElement
|
|
57
|
-
},
|
|
58
|
-
setPlayerSize() {
|
|
59
|
-
let AR = 16 / 9
|
|
60
|
-
let element = document.querySelector('#player-sizer')
|
|
61
|
-
if (!element) return
|
|
62
|
-
|
|
63
|
-
let width = element.offsetWidth
|
|
64
|
-
let height = width * (1 / AR)
|
|
65
|
-
|
|
66
|
-
if (window.innerWidth <= 600 || width <= 600) {
|
|
67
|
-
height = window.innerHeight * 0.75
|
|
68
|
-
width = height * (1 / AR)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
element.style.height = height + 'px'
|
|
72
|
-
element.style.width = width + 'px'
|
|
73
|
-
this.$emit('new-size-callback', width, height)
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
}
|
|
77
|
-
</script>
|
|
78
|
-
<style scoped>
|
|
79
|
-
#player-wrapper {
|
|
80
|
-
position: relative;
|
|
81
|
-
overflow: hidden;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
#player-sizer {
|
|
85
|
-
display: flex;
|
|
86
|
-
justify-content: center;
|
|
87
|
-
align-items: center;
|
|
88
|
-
overflow: hidden;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.player-control {
|
|
92
|
-
display: flex;
|
|
93
|
-
position: absolute;
|
|
94
|
-
z-index: 3;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
#controls-top-left {
|
|
98
|
-
top: 10px;
|
|
99
|
-
left: 10px;
|
|
100
|
-
}
|
|
101
|
-
#controls-top-center {
|
|
102
|
-
top: 10px;
|
|
103
|
-
left: 50%;
|
|
104
|
-
transform: translateX(-50%);
|
|
105
|
-
z-index: 4;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
#controls-top-right {
|
|
109
|
-
top: 10px;
|
|
110
|
-
right: 10px;
|
|
111
|
-
justify-content: flex-end;
|
|
112
|
-
align-content: flex-end;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
#controls-center-left {
|
|
116
|
-
left: 10px;
|
|
117
|
-
top: 50%;
|
|
118
|
-
transform: translateY(-50%);
|
|
119
|
-
}
|
|
120
|
-
#controls-center-center {
|
|
121
|
-
top: 50%;
|
|
122
|
-
left: 50%;
|
|
123
|
-
transform: translate(-50%, -50%);
|
|
124
|
-
align-items: center;
|
|
125
|
-
justify-content: space-around;
|
|
126
|
-
z-index: 20;
|
|
127
|
-
}
|
|
128
|
-
#controls-center-right {
|
|
129
|
-
top: 50%;
|
|
130
|
-
right: 10px;
|
|
131
|
-
transform: translateY(-50%);
|
|
132
|
-
justify-content: flex-end;
|
|
133
|
-
align-items: center;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
#controls-bottom-left {
|
|
137
|
-
bottom: 10px;
|
|
138
|
-
left: 10px;
|
|
139
|
-
z-index: 5;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
#controls-bottom-center {
|
|
143
|
-
bottom: 10px;
|
|
144
|
-
left: 50%;
|
|
145
|
-
transform: translateX(-50%);
|
|
146
|
-
align-items: flex-end;
|
|
147
|
-
justify-content: space-around;
|
|
148
|
-
z-index: 4;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
#controls-bottom-right {
|
|
152
|
-
bottom: 10px;
|
|
153
|
-
right: 10px;
|
|
154
|
-
justify-content: flex-end;
|
|
155
|
-
align-content: flex-end;
|
|
156
|
-
align-items: flex-end;
|
|
157
|
-
z-index: 5;
|
|
158
|
-
}
|
|
159
|
-
</style>
|
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="player-wrapper">
|
|
3
|
-
<div id="player-sizer">
|
|
4
|
-
<slot name="slideshow-image"></slot>
|
|
5
|
-
<div class="player-control" id="controls-top-left">
|
|
6
|
-
<slot name="top-left"></slot>
|
|
7
|
-
</div>
|
|
8
|
-
<div class="player-control" id="controls-top-center">
|
|
9
|
-
<slot name="top-center"></slot>
|
|
10
|
-
</div>
|
|
11
|
-
<div class="player-control" id="controls-top-right">
|
|
12
|
-
<slot name="top-right"></slot>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="player-control" id="controls-center-left">
|
|
15
|
-
<slot name="center-left"></slot>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="player-control" id="controls-center-center">
|
|
18
|
-
<slot name="center-center"></slot>
|
|
19
|
-
</div>
|
|
20
|
-
<div class="player-control" id="controls-center-right">
|
|
21
|
-
<slot name="center-right"></slot>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="player-control" id="controls-bottom-left">
|
|
24
|
-
<slot name="bottom-left"></slot>
|
|
25
|
-
</div>
|
|
26
|
-
<div class="player-control" id="controls-bottom-center">
|
|
27
|
-
<slot name="bottom-center"></slot>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="player-control" id="controls-bottom-right">
|
|
30
|
-
<slot name="bottom-right"></slot>
|
|
31
|
-
</div>
|
|
32
|
-
<div id="main-canvas">
|
|
33
|
-
<canvas
|
|
34
|
-
id="qpc"
|
|
35
|
-
:style="showStaticImage ? 'visibility:hidden' : 'visibility:visible'"
|
|
36
|
-
></canvas>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</template>
|
|
41
|
-
<script>
|
|
42
|
-
import { PlayerV2 } from '@qispace/player-core'
|
|
43
|
-
import { isBrowser } from 'browser-or-node'
|
|
44
|
-
|
|
45
|
-
export default {
|
|
46
|
-
name: 'Player',
|
|
47
|
-
emits: [
|
|
48
|
-
'new-camera-callback',
|
|
49
|
-
'new-rotation-callback',
|
|
50
|
-
'new-floor-callback',
|
|
51
|
-
'new-fov-callback',
|
|
52
|
-
'playerApi-callback',
|
|
53
|
-
'new-size-callback',
|
|
54
|
-
],
|
|
55
|
-
props: {
|
|
56
|
-
fileLoader: {
|
|
57
|
-
type: Object,
|
|
58
|
-
default: undefined,
|
|
59
|
-
},
|
|
60
|
-
rootUrl: { type: String, required: true },
|
|
61
|
-
currentCameraId: { type: String, default: () => undefined },
|
|
62
|
-
showStaticImage: { type: Boolean, required: true },
|
|
63
|
-
isFullScreen: { type: Boolean, required: true },
|
|
64
|
-
mouseSensitivity: { type: Number, default: () => 1 },
|
|
65
|
-
isInIframe: { type: Boolean, default: () => false },
|
|
66
|
-
},
|
|
67
|
-
data() {
|
|
68
|
-
return {
|
|
69
|
-
playerAPI: undefined,
|
|
70
|
-
playerCamera: undefined,
|
|
71
|
-
playerRotation: 0,
|
|
72
|
-
playerFoV: 0,
|
|
73
|
-
playerWidth: 0,
|
|
74
|
-
playerHeight: 0,
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
watch: {
|
|
78
|
-
async rootUrl(newValue) {
|
|
79
|
-
if (this.playerAPI) {
|
|
80
|
-
await this.playerAPI.loadInterior(newValue, this.playerCamera, false)
|
|
81
|
-
this.setPlayerSize()
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
fileLoader: {
|
|
85
|
-
async handler(newValue) {
|
|
86
|
-
if (this.playerAPI) {
|
|
87
|
-
await this.playerAPI.loadInterior(this.rootUrl, undefined, false)
|
|
88
|
-
this.setPlayerSize()
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
deep: true,
|
|
92
|
-
},
|
|
93
|
-
currentCameraId(newCameraId) {
|
|
94
|
-
if (this.playerAPI) {
|
|
95
|
-
this.playerCamera = newCameraId
|
|
96
|
-
this.playerAPI.goToCamera(newCameraId, true)
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
playerAPI(playerAPI) {
|
|
100
|
-
this.$emit('playerApi-callback', playerAPI)
|
|
101
|
-
const firstCamera = playerAPI.getCurrentCamera()
|
|
102
|
-
if (firstCamera) {
|
|
103
|
-
this.playerCamera = firstCamera.id
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
async mounted() {
|
|
108
|
-
window.addEventListener('resize', this.setPlayerSize)
|
|
109
|
-
this.setPlayerSize()
|
|
110
|
-
|
|
111
|
-
const newRotation = (newRotation) => {
|
|
112
|
-
const rot = newRotation + 0
|
|
113
|
-
|
|
114
|
-
this.$emit('new-rotation-callback', rot)
|
|
115
|
-
this.playerRotation = rot
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const newFOV = (newFov) => {
|
|
119
|
-
this.$emit('new-fov-callback', newFov)
|
|
120
|
-
this.playerFoV = newFov
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
const newCamera = (newCamera) => {
|
|
124
|
-
this.$emit('new-camera-callback', newCamera.id)
|
|
125
|
-
this.$emit('new-floor-callback', newCamera.floorLevel)
|
|
126
|
-
|
|
127
|
-
if (this.playerAPI) {
|
|
128
|
-
this.playerAPI.resetMarkerBehaviour(0)
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
this.playerCamera = newCamera.id
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const callbacks = {
|
|
135
|
-
initialized: () => {
|
|
136
|
-
this.playerAPI = PlayerV2.Main.getPlayerAPI()
|
|
137
|
-
const firstCamera = this.playerAPI.getCurrentCamera()
|
|
138
|
-
if (firstCamera) this.playerCamera = firstCamera.id
|
|
139
|
-
this.$emit('new-camera-callback', this.playerCamera)
|
|
140
|
-
},
|
|
141
|
-
newCamera,
|
|
142
|
-
newFOV,
|
|
143
|
-
newRotation,
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// constructor(public rootUrl: string, public target:string = 'qiplayerCanvas', events:EventManager, apartmentJson: string = undefined, startCameraId:string=undefined, fileLoader: LocalFileLoader | undefined) {
|
|
147
|
-
if (!isBrowser) return
|
|
148
|
-
|
|
149
|
-
const mainScene = await new PlayerV2.Main(
|
|
150
|
-
this.rootUrl,
|
|
151
|
-
'qpc',
|
|
152
|
-
callbacks,
|
|
153
|
-
undefined,
|
|
154
|
-
this.currentCameraId,
|
|
155
|
-
this.fileLoader
|
|
156
|
-
)
|
|
157
|
-
|
|
158
|
-
if (mainScene) {
|
|
159
|
-
mainScene.handleWindowResize()
|
|
160
|
-
window.addEventListener(
|
|
161
|
-
'resize',
|
|
162
|
-
mainScene.handleWindowResize.bind(mainScene)
|
|
163
|
-
)
|
|
164
|
-
mainScene.animate()
|
|
165
|
-
|
|
166
|
-
this.playerAPI = PlayerV2.Main.getPlayerAPI()
|
|
167
|
-
|
|
168
|
-
if (this.playerAPI)
|
|
169
|
-
this.playerAPI.setLookSensitivity(this.mouseSensitivity)
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
beforeUnmount() {
|
|
173
|
-
if (this.playerAPI) {
|
|
174
|
-
this.playerAPI.destroy()
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
methods: {
|
|
178
|
-
findClosestAncestor(element, className) {
|
|
179
|
-
let el = element
|
|
180
|
-
let returnElement = element
|
|
181
|
-
while ((el = el.parentNode) && el.className.indexOf(className) < 0);
|
|
182
|
-
returnElement = el
|
|
183
|
-
|
|
184
|
-
return returnElement
|
|
185
|
-
},
|
|
186
|
-
setPlayerSize() {
|
|
187
|
-
let AR = 16 / 9
|
|
188
|
-
let element = document.querySelector('#player-sizer')
|
|
189
|
-
if (!element) return
|
|
190
|
-
|
|
191
|
-
let width = element.offsetWidth
|
|
192
|
-
let height = width * (1 / AR)
|
|
193
|
-
|
|
194
|
-
if (window.innerWidth <= 600 || width <= 600) {
|
|
195
|
-
height = window.innerHeight * 0.75
|
|
196
|
-
|
|
197
|
-
if (this.isInIframe) {
|
|
198
|
-
height = screen.height * 0.65
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
width = height * (1 / AR)
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
element.style.height = height + 'px'
|
|
205
|
-
element.style.width = width + 'px'
|
|
206
|
-
this.$emit('new-size-callback', width, height)
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
}
|
|
210
|
-
</script>
|
|
211
|
-
<style scoped>
|
|
212
|
-
#player-wrapper {
|
|
213
|
-
position: relative;
|
|
214
|
-
overflow: hidden;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
#player-sizer {
|
|
218
|
-
display: flex;
|
|
219
|
-
justify-content: center;
|
|
220
|
-
align-items: center;
|
|
221
|
-
overflow: hidden;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
div#main-canvas {
|
|
225
|
-
top: 50%;
|
|
226
|
-
left: 50%;
|
|
227
|
-
position: absolute;
|
|
228
|
-
transform: translate(-50%, -50%);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.player-control {
|
|
232
|
-
display: flex;
|
|
233
|
-
position: absolute;
|
|
234
|
-
z-index: 3;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
#controls-top-left {
|
|
238
|
-
top: 10px;
|
|
239
|
-
left: 10px;
|
|
240
|
-
}
|
|
241
|
-
#controls-top-center {
|
|
242
|
-
top: 10px;
|
|
243
|
-
left: 50%;
|
|
244
|
-
transform: translateX(-50%);
|
|
245
|
-
z-index: 4;
|
|
246
|
-
flex-direction: column;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
#controls-top-right {
|
|
250
|
-
top: 10px;
|
|
251
|
-
right: 10px;
|
|
252
|
-
justify-content: flex-end;
|
|
253
|
-
align-content: flex-end;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
#controls-center-left {
|
|
257
|
-
left: 10px;
|
|
258
|
-
top: 50%;
|
|
259
|
-
transform: translateY(-50%);
|
|
260
|
-
}
|
|
261
|
-
#controls-center-center {
|
|
262
|
-
top: 50%;
|
|
263
|
-
left: 50%;
|
|
264
|
-
transform: translate(-50%, -50%);
|
|
265
|
-
align-items: center;
|
|
266
|
-
justify-content: space-around;
|
|
267
|
-
z-index: 20;
|
|
268
|
-
}
|
|
269
|
-
#controls-center-right {
|
|
270
|
-
top: 50%;
|
|
271
|
-
right: 10px;
|
|
272
|
-
transform: translateY(-50%);
|
|
273
|
-
justify-content: flex-end;
|
|
274
|
-
align-items: center;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
#controls-bottom-left {
|
|
278
|
-
bottom: 10px;
|
|
279
|
-
left: 10px;
|
|
280
|
-
z-index: 5;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
#controls-bottom-center {
|
|
284
|
-
bottom: 10px;
|
|
285
|
-
left: 50%;
|
|
286
|
-
transform: translateX(-50%);
|
|
287
|
-
align-items: flex-end;
|
|
288
|
-
justify-content: space-around;
|
|
289
|
-
z-index: 4;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
#controls-bottom-right {
|
|
293
|
-
bottom: 10px;
|
|
294
|
-
right: 10px;
|
|
295
|
-
justify-content: flex-end;
|
|
296
|
-
align-content: flex-end;
|
|
297
|
-
align-items: flex-end;
|
|
298
|
-
z-index: 5;
|
|
299
|
-
}
|
|
300
|
-
</style>
|