@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,414 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-if="error"
|
|
4
|
-
style="height: 50vh"
|
|
5
|
-
class="d-flex justify-center align-center blue-grey lighten-5"
|
|
6
|
-
>
|
|
7
|
-
<v-icon x-large>mdi-alert-circle-outline</v-icon>
|
|
8
|
-
</div>
|
|
9
|
-
<div
|
|
10
|
-
v-else-if="pickerData"
|
|
11
|
-
:style="`height: ${canvasDimensions.height}px; position: relative`"
|
|
12
|
-
class="image-container"
|
|
13
|
-
>
|
|
14
|
-
<qi-zoom-box :desktop="interactiveDesktop" :mobile="interactiveMobile">
|
|
15
|
-
<div class="image-instances">
|
|
16
|
-
<qi-building-chooser-scene-image-stack
|
|
17
|
-
:image-urls="daysOfYear.imageUrls"
|
|
18
|
-
:active-index="halfHourMark"
|
|
19
|
-
@resize="resizeScene"
|
|
20
|
-
@preloaded="sceneState.preloaded = true"
|
|
21
|
-
@ready="sceneState.ready = true"
|
|
22
|
-
@reset="sceneReset"
|
|
23
|
-
/>
|
|
24
|
-
|
|
25
|
-
<div v-if="svgObjects" v-show="sceneState.preloaded">
|
|
26
|
-
<div class="svg-container">
|
|
27
|
-
<svg :viewBox="svgViewBox">
|
|
28
|
-
<g
|
|
29
|
-
v-for="({ id, svg }, index) of svgObjects"
|
|
30
|
-
:key="index"
|
|
31
|
-
v-html="svg"
|
|
32
|
-
:data-building-id="id"
|
|
33
|
-
:class="getGClass(id)"
|
|
34
|
-
:style="getGStyle(id)"
|
|
35
|
-
@mouseover="onBuildingMouseOver($event, id)"
|
|
36
|
-
@mouseout="onBuildingMouseOut($event, id)"
|
|
37
|
-
@mousemove="onBuildingMouseMove($event, id)"
|
|
38
|
-
@click="onBuildingClick(id)"
|
|
39
|
-
/>
|
|
40
|
-
</svg>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<div
|
|
44
|
-
v-show="sceneState.preloaded"
|
|
45
|
-
class="custom-overlay-layer"
|
|
46
|
-
v-html="customOverlayContent"
|
|
47
|
-
></div>
|
|
48
|
-
</div>
|
|
49
|
-
</qi-zoom-box>
|
|
50
|
-
<div v-show="sceneState.preloaded">
|
|
51
|
-
<qi-north-direction
|
|
52
|
-
v-if="pickerData.sceneLongitude"
|
|
53
|
-
class="north-indicator"
|
|
54
|
-
:longitude="pickerData.sceneLongitude"
|
|
55
|
-
/>
|
|
56
|
-
<qi-building-chooser-sun-sim-control
|
|
57
|
-
v-model="halfHourMark"
|
|
58
|
-
:date-selector="daysOfYear"
|
|
59
|
-
:is-loading="!sceneState.ready"
|
|
60
|
-
/>
|
|
61
|
-
</div>
|
|
62
|
-
<template v-if="showCards && hoverBuilding">
|
|
63
|
-
<qi-floating-card
|
|
64
|
-
:is-hoverable="isHoverable"
|
|
65
|
-
:pos="pos"
|
|
66
|
-
@outside="() => (hoverBuildingId = undefined)"
|
|
67
|
-
>
|
|
68
|
-
<slot
|
|
69
|
-
:building="hoverBuilding"
|
|
70
|
-
:can-go-to-building="canGoToBuildingCallback(hoverBuilding)"
|
|
71
|
-
:go-to-building="
|
|
72
|
-
() =>
|
|
73
|
-
canGoToBuildingCallback(hoverBuilding) &&
|
|
74
|
-
$emit('go-to-building', hoverBuilding)
|
|
75
|
-
"
|
|
76
|
-
:pos="pos"
|
|
77
|
-
:is-hoverable="isHoverable"
|
|
78
|
-
:close="() => (hoverBuildingId = undefined)"
|
|
79
|
-
/>
|
|
80
|
-
</qi-floating-card>
|
|
81
|
-
</template>
|
|
82
|
-
<qi-hover-probe ref="hoverProbe" />
|
|
83
|
-
</div>
|
|
84
|
-
</template>
|
|
85
|
-
|
|
86
|
-
<script>
|
|
87
|
-
import { defineComponent, ref } from "vue";
|
|
88
|
-
import QiNorthDirection from "@/components/shared/QiNorthDirection.vue";
|
|
89
|
-
import QiBuildingChooserSunSimControl from "./QiBuildingChooserSunSimControl.vue";
|
|
90
|
-
import QiBuildingChooserSceneImageStack from "./QiBuildingChooserSceneImageStack.vue";
|
|
91
|
-
import QiFloatingCard from "@/components/shared/QiFloatingCard.vue";
|
|
92
|
-
import QiHoverProbe from "@/components/shared/QiHoverProbe.vue";
|
|
93
|
-
import QiZoomBox from "@/components/shared/QiZoomBox.vue";
|
|
94
|
-
import { ResourceLoader } from "@/lib/shared/ResourceLoader.js";
|
|
95
|
-
import { BuildingPickerResourceProvider } from "@/lib/buildingPicker/BuildingPickerResourceProvider.js";
|
|
96
|
-
import { BuildingMap } from "@/lib/buildingPicker/BuildingMap.js";
|
|
97
|
-
import { CanvasRaster } from "@/lib/buildingPicker/CanvasRaster.js";
|
|
98
|
-
import { DayOfYearSelector } from "@/lib/buildingPicker/DayOfYearSelector.js";
|
|
99
|
-
import { I18N } from "@/lib/shared/I18N";
|
|
100
|
-
|
|
101
|
-
export default defineComponent({
|
|
102
|
-
setup() {
|
|
103
|
-
const daysOfYear = ref({});
|
|
104
|
-
},
|
|
105
|
-
name: "QiBuildingChooserSvg",
|
|
106
|
-
components: {
|
|
107
|
-
QiBuildingChooserSunSimControl,
|
|
108
|
-
QiBuildingChooserSceneImageStack,
|
|
109
|
-
QiNorthDirection,
|
|
110
|
-
QiFloatingCard,
|
|
111
|
-
QiHoverProbe,
|
|
112
|
-
QiZoomBox,
|
|
113
|
-
},
|
|
114
|
-
emits: ["go-to-building", "hover-over-building", "hover-out-building"],
|
|
115
|
-
provide() {
|
|
116
|
-
const localizer = this.i18n
|
|
117
|
-
? new I18N(this.i18n.labels, this.i18n.language)
|
|
118
|
-
: new I18N();
|
|
119
|
-
return {
|
|
120
|
-
i18n: localizer,
|
|
121
|
-
};
|
|
122
|
-
},
|
|
123
|
-
props: {
|
|
124
|
-
showCards: { type: Boolean, default: () => true },
|
|
125
|
-
colorCallback: {
|
|
126
|
-
type: Function,
|
|
127
|
-
default: () => ({ r: 108, g: 0, b: 108, a: 144, s: 2 }),
|
|
128
|
-
},
|
|
129
|
-
buildingCallback: { type: Function, default: (buildingId) => buildingId },
|
|
130
|
-
canGoToBuildingCallback: { type: Function, default: () => true },
|
|
131
|
-
buildingChooserTimeOfDay: { type: String, default: null },
|
|
132
|
-
cdnFileResolver: { type: Function, required: true },
|
|
133
|
-
i18n: { type: Object, default: undefined },
|
|
134
|
-
interactiveDesktop: { type: Boolean, default: true },
|
|
135
|
-
interactiveMobile: { type: Boolean, default: true },
|
|
136
|
-
customOverlayContent: { type: String, default: "" },
|
|
137
|
-
},
|
|
138
|
-
data() {
|
|
139
|
-
return {
|
|
140
|
-
sceneState: { preloaded: false, ready: false },
|
|
141
|
-
canvasDimensions: { width: 0, height: 0 },
|
|
142
|
-
pos: { x: 0, y: 0, width: 0, height: 0 },
|
|
143
|
-
pickerData: undefined,
|
|
144
|
-
hoverBuildingId: undefined,
|
|
145
|
-
halfHourMark:
|
|
146
|
-
new Date().getHours() * 2 + (new Date().getMinutes() < 30 ? 0 : 1),
|
|
147
|
-
error: false,
|
|
148
|
-
resourceLoader: new ResourceLoader(),
|
|
149
|
-
svgObjects: undefined,
|
|
150
|
-
svgViewBox: "0 0 0 0",
|
|
151
|
-
};
|
|
152
|
-
},
|
|
153
|
-
computed: {
|
|
154
|
-
isHoverable() {
|
|
155
|
-
return this.$refs.hoverProbe.isHoverEnabled;
|
|
156
|
-
},
|
|
157
|
-
hoverBuilding() {
|
|
158
|
-
return this.getBuildingData(this.hoverBuildingId);
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
watch: {
|
|
162
|
-
buildingChooserTimeOfDay: {
|
|
163
|
-
handler() {
|
|
164
|
-
if (this.buildingChooserTimeOfDay) {
|
|
165
|
-
const [_, hour, minutes] = /^(\d\d):(\d\d)$/.exec(
|
|
166
|
-
this.buildingChooserTimeOfDay
|
|
167
|
-
);
|
|
168
|
-
const ms = parseInt(minutes);
|
|
169
|
-
this.halfHourMark =
|
|
170
|
-
parseInt(hour) * 2 + (ms < 15 ? 0 : ms > 45 ? 2 : 1);
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
immediate: true,
|
|
174
|
-
},
|
|
175
|
-
hoverBuildingId(current, prev) {
|
|
176
|
-
if (current) {
|
|
177
|
-
this.$emit("hover-over-building", this.getBuildingData(current));
|
|
178
|
-
} else {
|
|
179
|
-
this.$emit("hover-out-building", this.getBuildingData(prev));
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
async mounted() {
|
|
184
|
-
const resourceProvider = new BuildingPickerResourceProvider(
|
|
185
|
-
this.cdnFileResolver
|
|
186
|
-
);
|
|
187
|
-
const configData = await resourceProvider.loadBuildingChooser();
|
|
188
|
-
|
|
189
|
-
if (configData) {
|
|
190
|
-
this.canvasRaster = new CanvasRaster(configData.mapImage);
|
|
191
|
-
this.buildingMap = new BuildingMap(configData.buildingIds);
|
|
192
|
-
this.daysOfYear = new DayOfYearSelector(configData.backgrounds);
|
|
193
|
-
this.pickerData = {
|
|
194
|
-
buildingOverlays: configData.buildingOverlays,
|
|
195
|
-
sceneLongitude: configData.viewLongitude,
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
const svgObjects = [];
|
|
199
|
-
for (let { id, url } of configData.buildingOverlays) {
|
|
200
|
-
this.resourceLoader
|
|
201
|
-
.loadJson(url.replace(".png", ".svg"))
|
|
202
|
-
.then((markup) => {
|
|
203
|
-
const parser = new DOMParser();
|
|
204
|
-
const dom = parser
|
|
205
|
-
.parseFromString(markup, "image/svg+xml")
|
|
206
|
-
.getElementsByTagName("svg")[0];
|
|
207
|
-
this.svgViewBox = dom.getAttribute("viewBox");
|
|
208
|
-
svgObjects.push({
|
|
209
|
-
id,
|
|
210
|
-
svg: dom.innerHTML,
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
this.svgObjects = svgObjects;
|
|
215
|
-
} else {
|
|
216
|
-
this.error = true;
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
methods: {
|
|
220
|
-
resizeScene({ width, height }) {
|
|
221
|
-
this.canvasDimensions.width = width;
|
|
222
|
-
this.canvasDimensions.height = height;
|
|
223
|
-
},
|
|
224
|
-
sceneReset() {
|
|
225
|
-
this.sceneState = { preloaded: false, ready: false };
|
|
226
|
-
},
|
|
227
|
-
getBuildingData(buildingId) {
|
|
228
|
-
return this.buildingCallback
|
|
229
|
-
? this.buildingCallback(buildingId)
|
|
230
|
-
: buildingId;
|
|
231
|
-
},
|
|
232
|
-
getColor(buildingId) {
|
|
233
|
-
return this.colorCallback(
|
|
234
|
-
this.getBuildingData(buildingId),
|
|
235
|
-
buildingId === this.hoverBuildingId ? "hover" : "idle"
|
|
236
|
-
);
|
|
237
|
-
},
|
|
238
|
-
getGClass(buildingId) {
|
|
239
|
-
const building = this.getBuildingData(buildingId);
|
|
240
|
-
const color = this.colorCallback(
|
|
241
|
-
building,
|
|
242
|
-
buildingId === this.hoverBuildingId ? "hover" : "idle"
|
|
243
|
-
);
|
|
244
|
-
const classes = [];
|
|
245
|
-
if (buildingId === this.hoverBuildingId) {
|
|
246
|
-
classes.push("hover");
|
|
247
|
-
} else {
|
|
248
|
-
classes.push("idle");
|
|
249
|
-
}
|
|
250
|
-
if (color && this.canGoToBuildingCallback(building)) {
|
|
251
|
-
classes.push("clickable");
|
|
252
|
-
} else {
|
|
253
|
-
classes.push("restricted");
|
|
254
|
-
}
|
|
255
|
-
return classes.join(" ");
|
|
256
|
-
},
|
|
257
|
-
getGStyle(buildingId) {
|
|
258
|
-
const building = this.getBuildingData(buildingId);
|
|
259
|
-
const color = this.colorCallback(
|
|
260
|
-
building,
|
|
261
|
-
buildingId === this.hoverBuildingId ? "hover" : "idle"
|
|
262
|
-
);
|
|
263
|
-
if (color) {
|
|
264
|
-
const { r, g, b, a, s } = color;
|
|
265
|
-
return {
|
|
266
|
-
strokeWidth: s !== undefined ? s : 2,
|
|
267
|
-
stroke: `rgb(${r}, ${g}, ${b})`,
|
|
268
|
-
strokeOpacity: 1,
|
|
269
|
-
fill: `rgb(${r}, ${g}, ${b})`,
|
|
270
|
-
fillOpacity: a / 255,
|
|
271
|
-
cursor: `${
|
|
272
|
-
this.canGoToBuildingCallback(building) ? "cursor" : "default"
|
|
273
|
-
} !important`,
|
|
274
|
-
};
|
|
275
|
-
} else {
|
|
276
|
-
return {
|
|
277
|
-
strokeWidth: 0,
|
|
278
|
-
stroke: "white",
|
|
279
|
-
strokeOpacity: 0,
|
|
280
|
-
fill: "white",
|
|
281
|
-
fillOpacity: 0,
|
|
282
|
-
cursor: "default !important",
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
},
|
|
286
|
-
onBuildingMouseOver(event, id) {
|
|
287
|
-
if (this.isHoverable) {
|
|
288
|
-
this.pos = {
|
|
289
|
-
x: event.layerX,
|
|
290
|
-
y: event.layerY,
|
|
291
|
-
width: this.canvasDimensions.width,
|
|
292
|
-
height: this.canvasDimensions.height,
|
|
293
|
-
};
|
|
294
|
-
this.hoverBuildingId = id;
|
|
295
|
-
this.$emit("hover-over-building", this.getBuildingData(id));
|
|
296
|
-
}
|
|
297
|
-
},
|
|
298
|
-
onBuildingMouseOut(event, id) {
|
|
299
|
-
if (this.isHoverable) {
|
|
300
|
-
this.pos = {
|
|
301
|
-
x: event.layerX,
|
|
302
|
-
y: event.layerY,
|
|
303
|
-
width: this.canvasDimensions.width,
|
|
304
|
-
height: this.canvasDimensions.height,
|
|
305
|
-
};
|
|
306
|
-
this.hoverBuildingId = undefined;
|
|
307
|
-
this.$emit("hover-out-building", this.getBuildingData(id));
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
onBuildingMouseMove(event) {
|
|
311
|
-
if (this.isHoverable) {
|
|
312
|
-
this.pos = {
|
|
313
|
-
x: event.layerX,
|
|
314
|
-
y: event.layerY,
|
|
315
|
-
width: this.canvasDimensions.width,
|
|
316
|
-
height: this.canvasDimensions.height,
|
|
317
|
-
};
|
|
318
|
-
}
|
|
319
|
-
},
|
|
320
|
-
onBuildingClick(id) {
|
|
321
|
-
this.hoverBuildingId = id;
|
|
322
|
-
if (
|
|
323
|
-
this.isHoverable &&
|
|
324
|
-
this.hoverBuilding &&
|
|
325
|
-
this.canGoToBuildingCallback(this.hoverBuilding)
|
|
326
|
-
) {
|
|
327
|
-
this.$emit("go-to-building", this.hoverBuilding);
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
|
-
},
|
|
331
|
-
});
|
|
332
|
-
</script>
|
|
333
|
-
|
|
334
|
-
<style scoped>
|
|
335
|
-
.north-indicator {
|
|
336
|
-
position: absolute;
|
|
337
|
-
right: 0;
|
|
338
|
-
top: 0;
|
|
339
|
-
height: 42px;
|
|
340
|
-
width: 42px;
|
|
341
|
-
margin-top: 12px;
|
|
342
|
-
margin-right: 8px;
|
|
343
|
-
}
|
|
344
|
-
.image-container {
|
|
345
|
-
position: relative;
|
|
346
|
-
}
|
|
347
|
-
.image-instances {
|
|
348
|
-
position: relative;
|
|
349
|
-
width: 100%;
|
|
350
|
-
height: 100%;
|
|
351
|
-
}
|
|
352
|
-
canvas {
|
|
353
|
-
position: absolute;
|
|
354
|
-
left: 0;
|
|
355
|
-
top: 0;
|
|
356
|
-
z-index: 2;
|
|
357
|
-
opacity: 0;
|
|
358
|
-
}
|
|
359
|
-
.fill-parent {
|
|
360
|
-
position: absolute;
|
|
361
|
-
top: 0;
|
|
362
|
-
bottom: 0;
|
|
363
|
-
left: 0;
|
|
364
|
-
right: 0;
|
|
365
|
-
}
|
|
366
|
-
.svg-container {
|
|
367
|
-
transition-property: opacity;
|
|
368
|
-
transition-duration: 250ms;
|
|
369
|
-
transition-timing-function: ease-in-out;
|
|
370
|
-
}
|
|
371
|
-
.svg-container,
|
|
372
|
-
svg {
|
|
373
|
-
position: absolute;
|
|
374
|
-
left: 0;
|
|
375
|
-
top: 0;
|
|
376
|
-
width: 100%;
|
|
377
|
-
height: 100%;
|
|
378
|
-
z-index: 10000;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
svg g :deep(path) {
|
|
382
|
-
cursor: pointer;
|
|
383
|
-
stroke-width: inherit !important;
|
|
384
|
-
stroke-opacity: inherit !important;
|
|
385
|
-
stroke: inherit !important;
|
|
386
|
-
fill: inherit !important;
|
|
387
|
-
fill-opacity: inherit !important;
|
|
388
|
-
transition-property: fill-opacity, fill;
|
|
389
|
-
transition-duration: 250ms;
|
|
390
|
-
transition-timing-function: ease-in-out;
|
|
391
|
-
}
|
|
392
|
-
svg g.restricted :deep(path) {
|
|
393
|
-
cursor: default !important;
|
|
394
|
-
}
|
|
395
|
-
@media only screen and (max-width: 980px) and (min-width: 500px) and (orientation: landscape) {
|
|
396
|
-
div.image-container {
|
|
397
|
-
margin-top: 44px;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
@media only screen and (max-width: 500px) {
|
|
401
|
-
div.image-container {
|
|
402
|
-
margin-top: 44px;
|
|
403
|
-
margin-bottom: 44px;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
/* .custom-overlay-layer {
|
|
408
|
-
position: absolute;
|
|
409
|
-
top: 0;
|
|
410
|
-
left: 0;
|
|
411
|
-
width: 100%;
|
|
412
|
-
height: 100%;
|
|
413
|
-
} */
|
|
414
|
-
</style>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as QiBuildingChooser } from './QiBuildingChooser.vue'
|
|
2
|
-
export { default as QiBuildingChooserRasterOverlay } from './QiBuildingChooserRasterOverlay.vue'
|
|
3
|
-
export { default as QiBuildingChooserRaster } from './QiBuildingChooserRaster.vue'
|
|
4
|
-
export { default as QiBuildingChooserSceneImageStack } from './QiBuildingChooserSceneImageStack.vue'
|
|
5
|
-
export { default as QiBuildingChooserSunSimControl } from './QiBuildingChooserSunSimControl.vue'
|
|
6
|
-
export { default as QiBuildingChooserSvg } from './QiBuildingChooserSvg.vue'
|
package/src/components/index.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-fade-transition :origin="q.replace('-', ' ') + ' ' + pos.x + ' ' + pos.y">
|
|
3
|
-
<div
|
|
4
|
-
v-if="isHoverable"
|
|
5
|
-
:class="['floating-card', q]"
|
|
6
|
-
:style="{ left: `${pos.x}px`, top: `${pos.y}px`, pointerEvents: 'none' }"
|
|
7
|
-
>
|
|
8
|
-
<slot :is-hoverable="isHoverable" />
|
|
9
|
-
</div>
|
|
10
|
-
<v-dialog
|
|
11
|
-
v-else
|
|
12
|
-
:value="true"
|
|
13
|
-
width="auto"
|
|
14
|
-
@click:outside="$emit('outside', $event)"
|
|
15
|
-
>
|
|
16
|
-
<slot :is-hoverable="isHoverable" />
|
|
17
|
-
</v-dialog>
|
|
18
|
-
</v-fade-transition>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script>
|
|
22
|
-
export default {
|
|
23
|
-
name: 'FloatingCard',
|
|
24
|
-
props: {
|
|
25
|
-
pos: { type: Object, required: true },
|
|
26
|
-
isHoverable: Boolean,
|
|
27
|
-
},
|
|
28
|
-
computed: {
|
|
29
|
-
q() {
|
|
30
|
-
const qh = this.pos.x <= this.pos.width / 2 ? 'left' : 'right'
|
|
31
|
-
const qv = this.pos.y <= this.pos.height / 2 ? 'top' : 'bottom'
|
|
32
|
-
return `${qv}-${qh}`
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
}
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<style scoped>
|
|
39
|
-
.floating-card {
|
|
40
|
-
position: absolute;
|
|
41
|
-
left: 0;
|
|
42
|
-
top: 0;
|
|
43
|
-
z-index: 10;
|
|
44
|
-
display: flex;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.is-not-hoverable {
|
|
48
|
-
position: relative;
|
|
49
|
-
width: 100%;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.top-left {
|
|
53
|
-
transform-origin: top left;
|
|
54
|
-
transform: translateX(8px) translateY(8px) scale(0.9);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.top-right {
|
|
58
|
-
transform-origin: top right;
|
|
59
|
-
transform: translateX(-100%) translateX(-8px) translateY(8px) scale(0.9);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.bottom-left {
|
|
63
|
-
transform-origin: bottom left;
|
|
64
|
-
transform: translateY(-100%) translateX(8px) translateY(-8px) scale(0.9);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.bottom-right {
|
|
68
|
-
transform-origin: bottom right;
|
|
69
|
-
transform: translateY(-100%) translateX(-100%) translateX(-8px)
|
|
70
|
-
translateY(-8px) scale(0.9);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.v-dialog__content {
|
|
74
|
-
align-items: flex-start;
|
|
75
|
-
}
|
|
76
|
-
</style>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div ref="hoverCheck" class="hover-check" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
export default {
|
|
7
|
-
name: 'QiHoverProbe',
|
|
8
|
-
computed: {
|
|
9
|
-
isHoverEnabled() {
|
|
10
|
-
return window.getComputedStyle(this.$refs.hoverCheck).display === 'none'
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
}
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<style scoped>
|
|
17
|
-
@media (hover: hover) {
|
|
18
|
-
.hover-check {
|
|
19
|
-
display: none;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
</style>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-img :src="compassNeedle" :style="needleRotation" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
import compassNeedle from '@/lib/virtualTour/textures/compass-north.png'
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
name: 'QiNorthDirection',
|
|
10
|
-
props: {
|
|
11
|
-
longitude: { type: Number, default: () => 0 },
|
|
12
|
-
},
|
|
13
|
-
data() {
|
|
14
|
-
return {
|
|
15
|
-
compassNeedle: compassNeedle,
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
computed: {
|
|
19
|
-
needleRotation() {
|
|
20
|
-
return {
|
|
21
|
-
transform: `rotate(${90 - this.longitude}deg)`,
|
|
22
|
-
transition: ` transform 0.5s ease-in`,
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
}
|
|
27
|
-
</script>
|