|
@@ -455,49 +455,33 @@ export function uwbMain(domId, modelWidth, modelHeight, finalMode, callback) {
|
|
|
vrBgContainer.style.height = modelHeight + 'px'
|
|
|
vrBgContainer.style.backgroundColor = 'transparent'
|
|
|
|
|
|
-<<<<<<< HEAD
|
|
|
window.sdkInstance.emit("endLoading", finalMode);
|
|
|
window.sdkInstance.emit("modeChange", null, finalMode);
|
|
|
if (!sessionStorage.getItem('3dMode') || sessionStorage.getItem('3dMode') == 0) {
|
|
|
window.sdkInstance.changeMode(finalMode);
|
|
|
setTimeout(() => {
|
|
|
+ var element = document.getElementById('house-player');
|
|
|
var container = document.getElementById("ordinary-map")
|
|
|
container.style.opacity = 1;
|
|
|
+ let mapDom = document.getElementsByClassName("ordinary-map-container")[0];
|
|
|
+ let style = getComputedStyle(mapDom);
|
|
|
+ let width = parseFloat(style.width);
|
|
|
+ let height = parseFloat(style.height);
|
|
|
+
|
|
|
+ let ratio = 1.8;
|
|
|
+ window.renderWidth = width * ratio;
|
|
|
+ window.renderHeight = height * ratio;
|
|
|
+ window.sdkInstance.sceneRenderer.updateScreenSize(width * ratio, height * ratio);
|
|
|
+ element.style.marginLeft = ((width - (width * ratio)) / 2) + 'px';
|
|
|
+ element.style.marginTop = ((height - (height * ratio)) / 2) + 'px';
|
|
|
+ let playersmall = document.getElementById('playersmall')
|
|
|
+ playersmall.appendChild(element)
|
|
|
+ setTimeout(() => {
|
|
|
+ window.sdkInstance.changeMode('floorplan');
|
|
|
+ })
|
|
|
}, 500)
|
|
|
}
|
|
|
|
|
|
-=======
|
|
|
- // sdkInstance.player.mode = finalMode;
|
|
|
- setTimeout(() => {
|
|
|
- window.sdkInstance.emit("endLoading", finalMode);
|
|
|
- window.sdkInstance.emit("modeChange", null, finalMode);
|
|
|
- if (!sessionStorage.getItem('3dMode') || sessionStorage.getItem('3dMode') == 0) {
|
|
|
- window.sdkInstance.changeMode(finalMode);
|
|
|
- setTimeout(() => {
|
|
|
- var element = document.getElementById('house-player');
|
|
|
- var container = document.getElementById("ordinary-map")
|
|
|
- container.style.opacity = 1;
|
|
|
- let mapDom = document.getElementsByClassName("ordinary-map-container")[0];
|
|
|
- let style = getComputedStyle(mapDom);
|
|
|
- let width = parseFloat(style.width);
|
|
|
- let height = parseFloat(style.height);
|
|
|
-
|
|
|
- let ratio = 1.8;
|
|
|
- window.renderWidth = width * ratio;
|
|
|
- window.renderHeight = height * ratio;
|
|
|
- window.sdkInstance.sceneRenderer.updateScreenSize(width * ratio, height * ratio);
|
|
|
- element.style.marginLeft = ((width - (width * ratio)) / 2) + 'px';
|
|
|
- element.style.marginTop = ((height - (height * ratio)) / 2) + 'px';
|
|
|
- let playersmall = document.getElementById('playersmall')
|
|
|
- playersmall.appendChild(element)
|
|
|
- setTimeout(() => {
|
|
|
- window.sdkInstance.changeMode('floorplan');
|
|
|
- })
|
|
|
- }, 500)
|
|
|
- }
|
|
|
-
|
|
|
- }, 3000)
|
|
|
->>>>>>> 5e321e415e04717de1820b79f7a666b7787daac5
|
|
|
sdkInstance.on("endLoading", (mode) => {
|
|
|
console.log(mode, '-----+++++-----')
|
|
|
vrBgContainer.style.display = "none";
|