Version Description
(26-07-2022) = * New: VR Glass Support for virtual tours.
Download this release
Release Info
Developer | rextheme |
Plugin | WP VR – 360 Panorama and virtual tour creator for WordPress |
Version | 8.1.0 |
Comparing to | |
See all releases |
Code changes from version 8.0.2 to 8.1.0
- README.txt +7 -2
- admin/class-wpvr-admin.php +2 -0
- admin/classes/class-wpvr-ajax.php +2 -0
- admin/classes/class-wpvr-scene.php +410 -13
- admin/css/wpvr-admin.css +1 -1
- admin/lib/pannellum/src/js/pannellum.js +0 -1
- admin/partials/wpvr_documentation.php +32 -3
- includes/class-wpvr.php +2 -1
- public/css/wpvr-public.css +198 -6
- public/js/wpvr-public.js +2 -0
- public/lib/pannellum/src/js/pannellum.js +14 -1
- uninstall.php +0 -31
- vendor/composer/autoload_classmap.php +2 -0
- vendor/composer/autoload_static.php +2 -0
- wpvr.php +438 -13
README.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: https://rextheme.com/wp-vr-360-panorama-and-virtual-tour-creator-fo
|
|
5 |
Requires at least: 5.0
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 7.0.0
|
8 |
-
Stable tag: 8.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -308,8 +308,13 @@ Admins can remove the access from Authors and Editors at any time.
|
|
308 |
|
309 |
|
310 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
311 |
= 8.0.2 (14-07-2022) =
|
312 |
-
* Fix: Undefined Variable
|
313 |
* Fix: Issue with Gutenberg Block.
|
314 |
* Fix: Missing Language Files.
|
315 |
* Update: Compatibility with PHP 8.1.7.
|
5 |
Requires at least: 5.0
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 7.0.0
|
8 |
+
Stable tag: 8.1.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
308 |
|
309 |
|
310 |
== Changelog ==
|
311 |
+
|
312 |
+
= 8.1.0 (26-07-2022) =
|
313 |
+
* New: VR Glass Support for virtual tours.
|
314 |
+
|
315 |
+
|
316 |
= 8.0.2 (14-07-2022) =
|
317 |
+
* Fix: Undefined Variable – PHP Error Notice.
|
318 |
* Fix: Issue with Gutenberg Block.
|
319 |
* Fix: Missing Language Files.
|
320 |
* Update: Compatibility with PHP 8.1.7.
|
admin/class-wpvr-admin.php
CHANGED
@@ -306,4 +306,6 @@ class Wpvr_Admin {
|
|
306 |
$rollback->run();
|
307 |
}
|
308 |
}
|
|
|
|
|
309 |
}
|
306 |
$rollback->run();
|
307 |
}
|
308 |
}
|
309 |
+
|
310 |
+
|
311 |
}
|
admin/classes/class-wpvr-ajax.php
CHANGED
@@ -158,6 +158,7 @@ class Wpvr_Ajax {
|
|
158 |
$editor = sanitize_text_field($_POST['editor']);
|
159 |
$author = sanitize_text_field($_POST['author']);
|
160 |
$fontawesome = sanitize_text_field($_POST['fontawesome']);
|
|
|
161 |
$mobile_media_resize = sanitize_text_field($_POST['mobile_media_resize']);
|
162 |
$high_res_image = sanitize_text_field($_POST['high_res_image']);
|
163 |
$dis_on_hover = sanitize_text_field($_POST['dis_on_hover']);
|
@@ -176,6 +177,7 @@ class Wpvr_Ajax {
|
|
176 |
update_option('wpvr_editor_active', $editor);
|
177 |
update_option('wpvr_author_active', $author);
|
178 |
update_option('wpvr_fontawesome_disable', $fontawesome);
|
|
|
179 |
update_option('mobile_media_resize', $mobile_media_resize);
|
180 |
update_option('high_res_image', $high_res_image);
|
181 |
update_option('dis_on_hover', $dis_on_hover);
|
158 |
$editor = sanitize_text_field($_POST['editor']);
|
159 |
$author = sanitize_text_field($_POST['author']);
|
160 |
$fontawesome = sanitize_text_field($_POST['fontawesome']);
|
161 |
+
$cardboard = sanitize_text_field($_POST['wpvr_cardboard_disable']);
|
162 |
$mobile_media_resize = sanitize_text_field($_POST['mobile_media_resize']);
|
163 |
$high_res_image = sanitize_text_field($_POST['high_res_image']);
|
164 |
$dis_on_hover = sanitize_text_field($_POST['dis_on_hover']);
|
177 |
update_option('wpvr_editor_active', $editor);
|
178 |
update_option('wpvr_author_active', $author);
|
179 |
update_option('wpvr_fontawesome_disable', $fontawesome);
|
180 |
+
update_option('wpvr_cardboard_disable', $cardboard);
|
181 |
update_option('mobile_media_resize', $mobile_media_resize);
|
182 |
update_option('high_res_image', $high_res_image);
|
183 |
update_option('dis_on_hover', $dis_on_hover);
|
admin/classes/class-wpvr-scene.php
CHANGED
@@ -578,6 +578,7 @@ class WPVR_Scene {
|
|
578 |
}
|
579 |
}
|
580 |
|
|
|
581 |
$compass = false;
|
582 |
$audio_right = "5px";
|
583 |
if (isset($postdata['compass'])) {
|
@@ -598,6 +599,31 @@ class WPVR_Scene {
|
|
598 |
$explainer_right = "30px";
|
599 |
}
|
600 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
601 |
//===explainer handle===//
|
602 |
|
603 |
$mouseZoom = true;
|
@@ -1023,6 +1049,7 @@ class WPVR_Scene {
|
|
1023 |
overflow: hidden;
|
1024 |
}';
|
1025 |
}
|
|
|
1026 |
$html .= '#' . $panoid . ' div.pnlm-hotspot-base.fas,
|
1027 |
#' . $panoid . ' div.pnlm-hotspot-base.fab,
|
1028 |
#' . $panoid . ' div.pnlm-hotspot-base.fa,
|
@@ -1035,6 +1062,19 @@ class WPVR_Scene {
|
|
1035 |
height: 30px;
|
1036 |
animation: icon-pulse' . $panoid . ' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
|
1037 |
}';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1038 |
if ($hotspotblink == 'on') {
|
1039 |
$html .= '@-webkit-keyframes icon-pulse' . $panoid . ' {
|
1040 |
0% {
|
@@ -1068,15 +1108,48 @@ class WPVR_Scene {
|
|
1068 |
}
|
1069 |
|
1070 |
$html .= '</style>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1071 |
|
1072 |
if ($width == 'fullwidth') {
|
1073 |
if (wpvr_isMobileDevice()) {
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
$html .= '<div id="pano' . $id . '" class="pano-wrap" style="text-align:center;">';
|
1078 |
-
}
|
1079 |
} else {
|
|
|
1080 |
if ($radius) {
|
1081 |
$html .= '<div id="pano' . $id . '" class="pano-wrap vrfullwidth" style=" text-align:center; height: ' . $height . '; border-radius:' . $radius . '; direction:ltr;" >';
|
1082 |
} else {
|
@@ -1084,25 +1157,31 @@ class WPVR_Scene {
|
|
1084 |
}
|
1085 |
}
|
1086 |
} elseif ($width == 'embed') {
|
1087 |
-
$html .= '<div
|
|
|
|
|
1088 |
} else {
|
1089 |
-
// $browser_width = "<script>document.write(screen.width);</script>";
|
1090 |
-
|
1091 |
if (wpvr_isMobileDevice()) {
|
|
|
1092 |
if ($radius) {
|
1093 |
-
$html .= '<div id="pano' . $id . '" class="pano-wrap" style="
|
1094 |
} else {
|
1095 |
-
$html .= '<div id="pano' . $id . '" class="pano-wrap" style="
|
1096 |
}
|
1097 |
} else {
|
|
|
|
|
1098 |
if ($radius) {
|
1099 |
-
$html .= '<div id="pano' . $id . '" class="pano-wrap" style="
|
1100 |
} else {
|
1101 |
-
$html .= '<div id="pano' . $id . '" class="pano-wrap" style="
|
1102 |
}
|
1103 |
}
|
1104 |
}
|
1105 |
-
|
|
|
|
|
|
|
1106 |
//===company logo===//
|
1107 |
if (isset($postdata['cpLogoSwitch'])) {
|
1108 |
$cpLogoImg = $postdata['cpLogoImg'];
|
@@ -1336,11 +1415,21 @@ class WPVR_Scene {
|
|
1336 |
$html .= '</div>';
|
1337 |
|
1338 |
$html .= '</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1339 |
|
1340 |
|
1341 |
|
1342 |
//script started
|
1343 |
$html .= '<script>';
|
|
|
|
|
|
|
1344 |
if (isset($postdata['bg_music'])) {
|
1345 |
if ($bg_music == 'on') {
|
1346 |
$html .= '
|
@@ -1411,7 +1500,315 @@ class WPVR_Scene {
|
|
1411 |
$html .= '}';
|
1412 |
$html .= '}';
|
1413 |
$html .= 'var panoshow' . $id . ' = pannellum.viewer(response[0]["panoid"], scenes);';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1414 |
$html .= 'panoshow' . $id . '.on("load", function (){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1415 |
setTimeout(() => {
|
1416 |
window.dispatchEvent(new Event("resize"));
|
1417 |
}, 200);
|
578 |
}
|
579 |
}
|
580 |
|
581 |
+
|
582 |
$compass = false;
|
583 |
$audio_right = "5px";
|
584 |
if (isset($postdata['compass'])) {
|
599 |
$explainer_right = "30px";
|
600 |
}
|
601 |
|
602 |
+
|
603 |
+
$enable_cardboard = '';
|
604 |
+
$is_cardboard = get_option('wpvr_cardboard_disable');
|
605 |
+
if(wpvr_isMobileDevice() && $is_cardboard == 'true' ){
|
606 |
+
$enable_cardboard = 'enable-cardboard';
|
607 |
+
$audio_right = "73px";
|
608 |
+
if (isset($postdata['compass'])) {
|
609 |
+
$compass = $postdata['compass'] == 'on' || $postdata['compass'] != null ? true : false;
|
610 |
+
if ($compass) {
|
611 |
+
$audio_right = "130px";
|
612 |
+
}
|
613 |
+
}
|
614 |
+
|
615 |
+
//===explainer handle===//
|
616 |
+
|
617 |
+
$explainer_right = "65px";
|
618 |
+
if ((isset($postdata['compass']) && $postdata['compass'] == true) && (isset($postdata['bg_music']) && $postdata['bg_music'] == 'on')) {
|
619 |
+
$explainer_right = "150px";
|
620 |
+
} elseif (isset($postdata['compass']) && $postdata['compass'] == true) {
|
621 |
+
$explainer_right = "130px";
|
622 |
+
} elseif (isset($postdata['bg_music']) && $postdata['bg_music'] == "on") {
|
623 |
+
$explainer_right = "90px";
|
624 |
+
}
|
625 |
+
}
|
626 |
+
|
627 |
//===explainer handle===//
|
628 |
|
629 |
$mouseZoom = true;
|
1049 |
overflow: hidden;
|
1050 |
}';
|
1051 |
}
|
1052 |
+
|
1053 |
$html .= '#' . $panoid . ' div.pnlm-hotspot-base.fas,
|
1054 |
#' . $panoid . ' div.pnlm-hotspot-base.fab,
|
1055 |
#' . $panoid . ' div.pnlm-hotspot-base.fa,
|
1062 |
height: 30px;
|
1063 |
animation: icon-pulse' . $panoid . ' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
|
1064 |
}';
|
1065 |
+
$panoid2 = 'pano2'.$id;
|
1066 |
+
$html .= '#' . $panoid2 . ' div.pnlm-hotspot-base.fas,
|
1067 |
+
#' . $panoid2 . ' div.pnlm-hotspot-base.fab,
|
1068 |
+
#' . $panoid2 . ' div.pnlm-hotspot-base.fa,
|
1069 |
+
#' . $panoid2 . ' div.pnlm-hotspot-base.far {
|
1070 |
+
display: block !important;
|
1071 |
+
background-color: ' . $hotspoticoncolor . ';
|
1072 |
+
color: ' . $foreground_color . ';
|
1073 |
+
border-radius: 100%;
|
1074 |
+
width: 30px;
|
1075 |
+
height: 30px;
|
1076 |
+
animation: icon-pulse' . $panoid2 . ' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
|
1077 |
+
}';
|
1078 |
if ($hotspotblink == 'on') {
|
1079 |
$html .= '@-webkit-keyframes icon-pulse' . $panoid . ' {
|
1080 |
0% {
|
1108 |
}
|
1109 |
|
1110 |
$html .= '</style>';
|
1111 |
+
if (wpvr_isMobileDevice()) {
|
1112 |
+
$html .= '<div id="master-container" class="wpvr-cardboard '.$enable_cardboard.'" style="max-width:' . $width . '; width: 100%; height: ' . $mobile_height . '; border-radius:' . $radius . '; direction:ltr; ">';
|
1113 |
+
} else {
|
1114 |
+
$html .= '<div id="master-container" class="wpvr-cardboard '.$enable_cardboard.'" style="max-width:' . $width . '; width: 100%; height: ' . $height . '; border-radius:' . $radius . '; direction:ltr; ">';
|
1115 |
+
}
|
1116 |
+
$is_pro = apply_filters('is_wpvr_pro_active',false);
|
1117 |
+
$status = get_option('wpvr_edd_license_status');
|
1118 |
+
$is_cardboard = get_option('wpvr_cardboard_disable');
|
1119 |
+
if ($status !== false && 'valid' == $status && $is_pro && wpvr_isMobileDevice() && $is_cardboard == 'true' ) {
|
1120 |
+
$html .= '<button class="fullscreen-button">';
|
1121 |
+
$html .= '<span class="expand">';
|
1122 |
+
$html .= '<i class="fa fa-expand" aria-hidden="true"></i>';
|
1123 |
+
$html .= '</span>';
|
1124 |
+
|
1125 |
+
$html .= '<span class="compress">';
|
1126 |
+
$html .= '<i class="fa fa-compress" aria-hidden="true"></i>';
|
1127 |
+
$html .= '</span>';
|
1128 |
+
$html .= '</button>';
|
1129 |
+
$embed_mode = '';
|
1130 |
+
if($width == "embed"){
|
1131 |
+
$embed_mode = "vr-embade-mode";
|
1132 |
+
}
|
1133 |
+
$html .= '<label class="wpvr-cardboard-switcher '.$embed_mode.'">
|
1134 |
+
<input type="checkbox" class="vr_mode_change' . $id . '" name="vr_mode_change" value="off">
|
1135 |
+
<span class="switcher-box">
|
1136 |
+
<span class="normal-mode-tooltip">Normal VR Mode</span>
|
1137 |
+
<span class="cardbord-mode-tooltip">Cardboard VR Mode</span>
|
1138 |
+
<svg width="78" height="60" viewBox="0 0 78 60" fill="none" xmlns="http://www.w3.org/2000/svg">
|
1139 |
+
<path d="M42.25 21.4286C42.25 22.2811 41.9076 23.0986 41.2981 23.7014C40.6886 24.3042 39.862 24.6429 39 24.6429C38.138 24.6429 37.3114 24.3042 36.7019 23.7014C36.0924 23.0986 35.75 22.2811 35.75 21.4286C35.75 20.5761 36.0924 19.7585 36.7019 19.1557C37.3114 18.5529 38.138 18.2143 39 18.2143C39.862 18.2143 40.6886 18.5529 41.2981 19.1557C41.9076 19.7585 42.25 20.5761 42.25 21.4286ZM19.5 30C18.9254 30 18.3743 30.2258 17.9679 30.6276C17.5616 31.0295 17.3333 31.5745 17.3333 32.1429C17.3333 32.7112 17.5616 33.2562 17.9679 33.6581C18.3743 34.06 18.9254 34.2857 19.5 34.2857H28.1667C28.7413 34.2857 29.2924 34.06 29.6987 33.6581C30.1051 33.2562 30.3333 32.7112 30.3333 32.1429C30.3333 31.5745 30.1051 31.0295 29.6987 30.6276C29.2924 30.2258 28.7413 30 28.1667 30H19.5ZM47.6667 32.1429C47.6667 31.5745 47.8949 31.0295 48.3013 30.6276C48.7076 30.2258 49.2587 30 49.8333 30H58.5C59.0746 30 59.6257 30.2258 60.0321 30.6276C60.4384 31.0295 60.6667 31.5745 60.6667 32.1429C60.6667 32.7112 60.4384 33.2562 60.0321 33.6581C59.6257 34.06 59.0746 34.2857 58.5 34.2857H49.8333C49.2587 34.2857 48.7076 34.06 48.3013 33.6581C47.8949 33.2562 47.6667 32.7112 47.6667 32.1429ZM32.5 0C31.9254 0 31.3743 0.225765 30.9679 0.627629C30.5616 1.02949 30.3333 1.57454 30.3333 2.14286V8.57143H18.4167C14.8693 8.57183 11.4528 9.89617 8.84994 12.2798C6.24706 14.6634 4.64954 17.9306 4.37667 21.4286H2.16667C1.59203 21.4286 1.04093 21.6543 0.634602 22.0562C0.228273 22.4581 0 23.0031 0 23.5714V36.4286C0 36.9969 0.228273 37.5419 0.634602 37.9438C1.04093 38.3457 1.59203 38.5714 2.16667 38.5714H4.33333V46.0714C4.33333 49.7655 5.81711 53.3083 8.45825 55.9204C11.0994 58.5325 14.6815 60 18.4167 60H25.3933C29.1269 59.9986 32.7071 58.5311 35.347 55.92L37.921 53.3786C38.0618 53.2393 38.229 53.1288 38.4131 53.0534C38.5971 52.978 38.7943 52.9392 38.9935 52.9392C39.1927 52.9392 39.3899 52.978 39.5739 53.0534C39.758 53.1288 39.9252 53.2393 40.066 53.3786L42.6357 55.92C45.2766 58.5322 48.8586 59.9998 52.5937 60H59.5833C63.3185 60 66.9006 58.5325 69.5418 55.9204C72.1829 53.3083 73.6667 49.7655 73.6667 46.0714V38.5714H75.8333C76.408 38.5714 76.9591 38.3457 77.3654 37.9438C77.7717 37.5419 78 36.9969 78 36.4286V23.5714C78 23.0031 77.7717 22.4581 77.3654 22.0562C76.9591 21.6543 76.408 21.4286 75.8333 21.4286H73.6233C73.3505 17.9306 71.753 14.6634 69.1501 12.2798C66.5472 9.89617 63.1307 8.57183 59.5833 8.57143H47.6667V2.14286C47.6667 1.57454 47.4384 1.02949 47.0321 0.627629C46.6257 0.225765 46.0746 0 45.5 0H32.5ZM69.3333 22.5V46.0714C69.3333 48.6289 68.3061 51.0816 66.4776 52.89C64.6491 54.6983 62.1692 55.7143 59.5833 55.7143H52.5937C50.0093 55.7132 47.5311 54.6973 45.7037 52.89L43.1297 50.3486C42.5864 49.8108 41.9413 49.3842 41.2312 49.0931C40.5211 48.8021 39.76 48.6522 38.9913 48.6522C38.2227 48.6522 37.4616 48.8021 36.7515 49.0931C36.0414 49.3842 35.3963 49.8108 34.853 50.3486L32.2833 52.89C30.4559 54.6973 27.9777 55.7132 25.3933 55.7143H18.4167C15.8308 55.7143 13.3509 54.6983 11.5224 52.89C9.6939 51.0816 8.66667 48.6289 8.66667 46.0714V22.5C8.66667 19.9426 9.6939 17.4899 11.5224 15.6815C13.3509 13.8731 15.8308 12.8571 18.4167 12.8571H59.5833C62.1692 12.8571 64.6491 13.8731 66.4776 15.6815C68.3061 17.4899 69.3333 19.9426 69.3333 22.5Z" fill="#216DF0"/>
|
1140 |
+
</svg>
|
1141 |
+
</span>
|
1142 |
+
</label>';
|
1143 |
+
|
1144 |
+
}
|
1145 |
|
1146 |
if ($width == 'fullwidth') {
|
1147 |
if (wpvr_isMobileDevice()) {
|
1148 |
+
$html .= '<div class="cardboard-vrfullwidth vrfullwidth">';
|
1149 |
+
$html .= '<div id="pano2' . $id . '" class="pano-wrap pano-left cardboard-half" style="width: 49%!important; border-radius:' . $radius . ' text-align:center; direction:ltr;" ><div id="center-pointer2' . $id . '" class="vr-pointer-container"><span class="center-pointer"></span></div></div>';
|
1150 |
+
$html .= '<div id="pano' . $id . '" class="pano-wrap pano-right" style="width: 100%; text-align:center; direction:ltr; border-radius:' . $radius . '" >';
|
|
|
|
|
1151 |
} else {
|
1152 |
+
$html .= '<div id="pano2' . $id . '" class="pano-wrap pano-left" style="width: 49%; border-radius:' . $radius . '"><div id="center-pointer2' . $id . '" class="vr-pointer-container"><span class="center-pointer"></span></div></div>';
|
1153 |
if ($radius) {
|
1154 |
$html .= '<div id="pano' . $id . '" class="pano-wrap vrfullwidth" style=" text-align:center; height: ' . $height . '; border-radius:' . $radius . '; direction:ltr;" >';
|
1155 |
} else {
|
1157 |
}
|
1158 |
}
|
1159 |
} elseif ($width == 'embed') {
|
1160 |
+
$html .= '<div class="cardboard-vrembed vrembed">';
|
1161 |
+
$html .= '<div id="pano2' . $id . '" class="pano-wrap pano-left" style=" width: 49%!important; text-align:center; direction:ltr;" ><div id="center-pointer2' . $id . '" class="vr-pointer-container"><span class="center-pointer"></span></div></div>';
|
1162 |
+
$html .= '<div id="pano' . $id . '" class="pano-wrap pano-right" style=" text-align:center; direction:ltr;" >';
|
1163 |
} else {
|
|
|
|
|
1164 |
if (wpvr_isMobileDevice()) {
|
1165 |
+
$html .= '<div id="pano2' . $id . '" class="pano-wrap pano-left cardboard-half" style="width: 49%; border-radius:' . $radius . '"><div id="center-pointer2' . $id . '" class="vr-pointer-container"><span class="center-pointer"></span></div></div>';
|
1166 |
if ($radius) {
|
1167 |
+
$html .= '<div id="pano' . $id . '" class="pano-wrap pano-right" style=" width: 100%; border-radius:' . $radius . ';">';
|
1168 |
} else {
|
1169 |
+
$html .= '<div id="pano' . $id . '" class="pano-wrap pano-right" style=" width: 100%; ">';
|
1170 |
}
|
1171 |
} else {
|
1172 |
+
$html .= '<div id="pano2' . $id . '" class="pano-wrap pano-left" style="width: 49%; border-radius:' . $radius . '"><div id="center-pointer2' . $id . '" class="vr-pointer-container"><span class="center-pointer"></span></div></div>';
|
1173 |
+
|
1174 |
if ($radius) {
|
1175 |
+
$html .= '<div id="pano' . $id . '" class="pano-wrap pano-right" style="width: 100%; border-radius:' . $radius . ';">';
|
1176 |
} else {
|
1177 |
+
$html .= '<div id="pano' . $id . '" class="pano-wrap pano-right" style="width: 100%;">';
|
1178 |
}
|
1179 |
}
|
1180 |
}
|
1181 |
+
// Vr mode transction scene to scene
|
1182 |
+
if ($status !== false && 'valid' == $status && $is_pro) {
|
1183 |
+
$html .= '<div id="center-pointer' . $id . '" class="vr-pointer-container" style="display:none"><span class="center-pointer"></span></div>';
|
1184 |
+
}
|
1185 |
//===company logo===//
|
1186 |
if (isset($postdata['cpLogoSwitch'])) {
|
1187 |
$cpLogoImg = $postdata['cpLogoImg'];
|
1415 |
$html .= '</div>';
|
1416 |
|
1417 |
$html .= '</div>';
|
1418 |
+
$html .= '</div>';
|
1419 |
+
if( "embed" == $width ){
|
1420 |
+
$html .= '</div>';
|
1421 |
+
}
|
1422 |
+
if( "fullwidth" == $width ){
|
1423 |
+
$html .= '</div>';
|
1424 |
+
}
|
1425 |
|
1426 |
|
1427 |
|
1428 |
//script started
|
1429 |
$html .= '<script>';
|
1430 |
+
|
1431 |
+
|
1432 |
+
|
1433 |
if (isset($postdata['bg_music'])) {
|
1434 |
if ($bg_music == 'on') {
|
1435 |
$html .= '
|
1500 |
$html .= '}';
|
1501 |
$html .= '}';
|
1502 |
$html .= 'var panoshow' . $id . ' = pannellum.viewer(response[0]["panoid"], scenes);';
|
1503 |
+
|
1504 |
+
//===Dplicate mode only for vr mode===//
|
1505 |
+
$html .= 'var response_duplicate = ' . $response . ';';
|
1506 |
+
$html .= 'var scenes_duplicate = response_duplicate[1];';
|
1507 |
+
|
1508 |
+
$html .= 'if(scenes_duplicate) {';
|
1509 |
+
$html .= 'var scenedata = scenes_duplicate.scenes;';
|
1510 |
+
$html .= 'for(var i in scenedata) {';
|
1511 |
+
$html .= 'var scenehotspot = scenedata[i].hotSpots;';
|
1512 |
+
$html .= 'for(var i = 0; i < scenehotspot.length; i++) {';
|
1513 |
+
$html .= 'if(scenehotspot[i]["clickHandlerArgs"] != "") {';
|
1514 |
+
$html .= 'scenehotspot[i]["clickHandlerFunc"] = wpvrhotspot;';
|
1515 |
+
$html .= '}';
|
1516 |
+
if (wpvr_isMobileDevice() && get_option('dis_on_hover') == "true") {
|
1517 |
+
} else {
|
1518 |
+
$html .= 'if(scenehotspot[i]["createTooltipArgs"] != "") {';
|
1519 |
+
$html .= 'scenehotspot[i]["createTooltipFunc"] = wpvrtooltip;';
|
1520 |
+
$html .= '}';
|
1521 |
+
}
|
1522 |
+
$html .= '}';
|
1523 |
+
$html .= '}';
|
1524 |
+
$html .= '}';
|
1525 |
+
|
1526 |
+
$is_pro = apply_filters('is_wpvr_pro_active',false);
|
1527 |
+
$status = get_option('wpvr_edd_license_status');
|
1528 |
+
if ($status !== false && 'valid' == $status && $is_pro) {
|
1529 |
+
$html .= 'var panoshow2' . $id . ' = pannellum.viewer("pano2' . $id . '", scenes_duplicate);';
|
1530 |
+
|
1531 |
+
|
1532 |
+
// Show Cardboard Mode in Tour
|
1533 |
+
$html .= '
|
1534 |
+
var tim;
|
1535 |
+
var im = 0;
|
1536 |
+
var active_scene = "'.$default_scene.'";
|
1537 |
+
var c_time;
|
1538 |
+
c_time = new Date();
|
1539 |
+
var timer = c_time.getTime() + 2000;
|
1540 |
+
function panoShowCardBoardOnTrigger(data){
|
1541 |
+
if(scenes_duplicate) {
|
1542 |
+
var scenedata = scenes_duplicate.scenes;
|
1543 |
+
for(var i in scenedata) {
|
1544 |
+
if(active_scene === i) {
|
1545 |
+
var scenehotspot = scenedata[i].hotSpots;
|
1546 |
+
for(var j in scenehotspot) {
|
1547 |
+
var plusFiveYaw = Math.round(scenehotspot[j].yaw) + 5;
|
1548 |
+
var minusFiveYaw = Math.round(scenehotspot[j].yaw) - 5;
|
1549 |
+
var plusFivePitch = Math.round(scenehotspot[j].pitch) + 5;
|
1550 |
+
var minusFivePitch = Math.round(scenehotspot[j].pitch) - 5;
|
1551 |
+
var firstCondition = ( Math.round(data.pitch) > minusFivePitch) && (Math.round(data.pitch) < plusFivePitch) ;
|
1552 |
+
var secCondition = (Math.round(data.yaw) > minusFiveYaw) && (Math.round(data.yaw) < plusFiveYaw);
|
1553 |
+
if(( Math.round(data.pitch) > minusFivePitch) && (Math.round(data.pitch) < plusFivePitch) ){
|
1554 |
+
if((Math.round(data.yaw) > minusFiveYaw) && (Math.round(data.yaw) < plusFiveYaw)){
|
1555 |
+
jQuery(".center-pointer").addClass("wpvr-pluse-effect")
|
1556 |
+
var getScene = scenehotspot[j].sceneId;
|
1557 |
+
if(scenehotspot[j].type == "scene"){
|
1558 |
+
panoshow' . $id . '.loadScene(getScene);
|
1559 |
+
panoshow2' . $id . '.loadScene(getScene);
|
1560 |
+
// var inside_current_time_object = new Date();
|
1561 |
+
// var inside_timer = inside_current_time_object.getTime();
|
1562 |
+
// if(inside_timer > timer) {
|
1563 |
+
// panoshow' . $id . '.loadScene(getScene);
|
1564 |
+
// panoshow2' . $id . '.loadScene(getScene);
|
1565 |
+
// jQuery(".center-pointer").removeClass("wpvr-pluse-effect")
|
1566 |
+
// }
|
1567 |
+
}else{
|
1568 |
+
jQuery(".center-pointer").removeClass("wpvr-pluse-effect")
|
1569 |
+
}
|
1570 |
+
}
|
1571 |
+
else {
|
1572 |
+
jQuery(".center-pointer").removeClass("wpvr-pluse-effect")
|
1573 |
+
c_time = new Date();
|
1574 |
+
timer = c_time.getTime() + 2000;
|
1575 |
+
}
|
1576 |
+
}
|
1577 |
+
else {
|
1578 |
+
c_time = new Date();
|
1579 |
+
timer = c_time.getTime() + 2000;
|
1580 |
+
}
|
1581 |
+
}
|
1582 |
+
}
|
1583 |
+
}
|
1584 |
+
}
|
1585 |
+
};
|
1586 |
+
';
|
1587 |
+
|
1588 |
+
$html .= '
|
1589 |
+
|
1590 |
+
function requestFullScreen(){
|
1591 |
+
var elem = document.getElementById("master-container");
|
1592 |
+
if (elem.requestFullscreen) {
|
1593 |
+
elem.requestFullscreen();
|
1594 |
+
} else if (elem.webkitRequestFullscreen) { /* Safari */
|
1595 |
+
elem.webkitRequestFullscreen();
|
1596 |
+
} else if (elem.msRequestFullscreen) { /* IE11 */
|
1597 |
+
elem.msRequestFullscreen();
|
1598 |
+
}
|
1599 |
+
}
|
1600 |
+
function requestExitFullscreen(){
|
1601 |
+
var elem = document.getElementById("master-container");
|
1602 |
+
if (document.exitFullscreen) {
|
1603 |
+
document.exitFullscreen();
|
1604 |
+
} else if (document.webkitExitFullscreen) { /* Safari */
|
1605 |
+
document.webkitExitFullscreen();
|
1606 |
+
} else if (document.msExitFullscreen) { /* IE11 */
|
1607 |
+
document.msExitFullscreen();
|
1608 |
+
}
|
1609 |
+
}
|
1610 |
+
jQuery(document).on("click",".fullscreen-button .expand",function() {
|
1611 |
+
jQuery(this).hide()
|
1612 |
+
jQuery(this).parent().find(".compress").show()
|
1613 |
+
requestFullScreen()
|
1614 |
+
});
|
1615 |
+
jQuery(document).on("click",".fullscreen-button .compress",function() {
|
1616 |
+
jQuery(this).hide()
|
1617 |
+
jQuery(this).parent().find(".expand").show()
|
1618 |
+
requestExitFullscreen()
|
1619 |
+
screen.orientation.unlock();
|
1620 |
+
|
1621 |
+
});
|
1622 |
+
';
|
1623 |
+
$html .= '
|
1624 |
+
panoshow' . $id . '.on("scenechange", function (scene){
|
1625 |
+
jQuery(".center-pointer").removeClass("wpvr-pluse-effect")
|
1626 |
+
active_scene = scene;
|
1627 |
+
if(localStorage.getItem("vr_mode") == "on") {
|
1628 |
+
jQuery("#pano2' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").css("display","none");
|
1629 |
+
jQuery("#pano' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").css("display","none");
|
1630 |
+
}
|
1631 |
+
});
|
1632 |
+
var compassBlock = "";
|
1633 |
+
var infoBlock = "";
|
1634 |
+
jQuery(document).on("click",".vr_mode_change' . $id . '",function (){
|
1635 |
+
|
1636 |
+
var getValue = jQuery(this).val();
|
1637 |
+
var getParent = jQuery(this).parent().parent();
|
1638 |
+
var compass = getParent.find("#pano2' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").css("display");
|
1639 |
+
var panoInfo = getParent.find("#pano' . $id . ' .pnlm-panorama-info").css("display");
|
1640 |
+
if(compass == "block"){
|
1641 |
+
compassBlock = "block";
|
1642 |
+
}
|
1643 |
+
if(panoInfo == "block"){
|
1644 |
+
infoBlock = "block";
|
1645 |
+
}
|
1646 |
+
|
1647 |
+
if (getValue == "off") {
|
1648 |
+
requestFullScreen()
|
1649 |
+
screen.orientation.lock("landscape-primary").then(function() {
|
1650 |
+
}).catch(function(error) {
|
1651 |
+
alert("VR Glass Mode not supported in this device");
|
1652 |
+
});
|
1653 |
+
localStorage.setItem("vr_mode", "on");
|
1654 |
+
jQuery(".vr-mode-title").show();
|
1655 |
+
jQuery(this).val("on");
|
1656 |
+
getParent.find("#pano2' . $id . '").css({
|
1657 |
+
"opacity": "1",
|
1658 |
+
"visibility": "visible",
|
1659 |
+
"position": "relative",
|
1660 |
+
});
|
1661 |
+
panoshow' . $id . '.startOrientation();
|
1662 |
+
panoshow2' . $id . '.startOrientation();
|
1663 |
+
getParent.find("#pano' .$id. ' #zoom-in-out-controls'.$id.'").hide();
|
1664 |
+
getParent.find("#pano' .$id. ' #controls'.$id.'").hide();
|
1665 |
+
getParent.find("#pano' .$id. ' #explainer_button_'.$id.'").hide();
|
1666 |
+
getParent.find("#pano' .$id. ' #vrgcontrols'.$id.'").hide();
|
1667 |
+
getParent.find("#pano' .$id. ' #sccontrols'.$id.'").hide();
|
1668 |
+
getParent.find("#pano' .$id. ' #adcontrol'.$id.'").hide();
|
1669 |
+
getParent.find("#pano' .$id. ' .owl-nav.wpvr_slider_nav").hide();
|
1670 |
+
getParent.find("#pano' .$id. ' #cp-logo-controls").hide();
|
1671 |
+
|
1672 |
+
getParent.find("#pano2' . $id . ' .pnlm-controls-container").hide();
|
1673 |
+
getParent.find("#pano' . $id . ' .pnlm-controls-container").hide();
|
1674 |
+
|
1675 |
+
getParent.find("#pano2' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").hide();
|
1676 |
+
getParent.find("#pano' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").hide();
|
1677 |
+
|
1678 |
+
getParent.find("#pano2' . $id . ' .pnlm-panorama-info").hide();
|
1679 |
+
getParent.find("#pano' . $id . ' .pnlm-panorama-info").hide();
|
1680 |
+
getParent.find("#pano' . $id . '").addClass("cardboard-half");
|
1681 |
+
getParent.find("#center-pointer' . $id . '").show();
|
1682 |
+
getParent.find(".fullscreen-button").hide();
|
1683 |
+
|
1684 |
+
if (window.DeviceOrientationEvent) {
|
1685 |
+
window.addEventListener("deviceorientation", function () {
|
1686 |
+
var data = {
|
1687 |
+
pitch: panoshow' . $id . '.getPitch(),
|
1688 |
+
yaw: panoshow' . $id . '.getYaw(),
|
1689 |
+
};
|
1690 |
+
panoShowCardBoardOnTrigger(data);
|
1691 |
+
});
|
1692 |
+
}
|
1693 |
+
|
1694 |
+
panoshow' . $id . '.on("zoomchange", function (data){
|
1695 |
+
panoshow2' . $id . '.setHfov(data, 0);
|
1696 |
+
});
|
1697 |
+
|
1698 |
+
panoshow2' . $id . '.on("zoomchange", function (data){
|
1699 |
+
panoshow' . $id . '.setHfov(data, 0);
|
1700 |
+
});
|
1701 |
+
|
1702 |
+
jQuery(document).on("click","#pano2' . $id . '",function(event) {
|
1703 |
+
panoshow' . $id . '.startOrientation();
|
1704 |
+
panoshow2' . $id . '.startOrientation();
|
1705 |
+
|
1706 |
+
});
|
1707 |
+
|
1708 |
+
jQuery(document).on("click","#pano' . $id . '",function(event) {
|
1709 |
+
panoshow' . $id . '.startOrientation();
|
1710 |
+
panoshow2' . $id . '.startOrientation();
|
1711 |
+
});
|
1712 |
+
|
1713 |
+
panoshow' . $id . '.on("mousemove", function (data){
|
1714 |
+
panoshow2' . $id . '.setPitch(data.pitch, 0);
|
1715 |
+
panoshow2' . $id . '.setYaw(data.yaw, 0);
|
1716 |
+
panoShowCardBoardOnTrigger(data);
|
1717 |
+
|
1718 |
+
});
|
1719 |
+
panoshow2' . $id . '.on("mousemove", function (data){
|
1720 |
+
panoshow' . $id . '.setPitch(data.pitch, 0);
|
1721 |
+
panoshow' . $id . '.setYaw(data.yaw, 0);
|
1722 |
+
panoShowCardBoardOnTrigger(data);
|
1723 |
+
|
1724 |
+
});
|
1725 |
+
|
1726 |
+
|
1727 |
+
panoshow' . $id . '.on("touchmove", function (data){
|
1728 |
+
panoshow' . $id . '.stopOrientation();
|
1729 |
+
panoshow2' . $id . '.stopOrientation();
|
1730 |
+
panoshow2' . $id . '.setPitch(data.pitch, 0);
|
1731 |
+
panoshow2' . $id . '.setYaw(data.yaw, 0);
|
1732 |
+
panoShowCardBoardOnTrigger(data);
|
1733 |
+
|
1734 |
+
});
|
1735 |
+
|
1736 |
+
panoshow2' . $id . '.on("touchmove", function (data){
|
1737 |
+
panoshow' . $id . '.stopOrientation();
|
1738 |
+
panoshow2' . $id . '.stopOrientation();
|
1739 |
+
panoshow' . $id . '.setPitch(data.pitch, 0);
|
1740 |
+
panoshow' . $id . '.setYaw(data.yaw, 0);
|
1741 |
+
panoShowCardBoardOnTrigger(data);
|
1742 |
+
|
1743 |
+
});
|
1744 |
+
|
1745 |
+
}
|
1746 |
+
else if(getValue == "on") {
|
1747 |
+
screen.orientation.unlock();
|
1748 |
+
requestExitFullscreen();
|
1749 |
+
localStorage.setItem("vr_mode", "off");
|
1750 |
+
jQuery(".vr-mode-title").hide();
|
1751 |
+
jQuery(this).val("off");
|
1752 |
+
getParent.find("#pano2' . $id . '").css({
|
1753 |
+
"opacity": "0",
|
1754 |
+
"visibility": "hidden",
|
1755 |
+
"position": "absolute",
|
1756 |
+
});
|
1757 |
+
getParent.find("#pano' .$id. ' #zoom-in-out-controls'.$id.'").show();
|
1758 |
+
getParent.find("#pano' .$id. ' #controls'.$id.'").show();
|
1759 |
+
getParent.find("#pano' .$id. ' #explainer_button_'.$id.'").show();
|
1760 |
+
|
1761 |
+
getParent.find("#pano2' . $id . ' .pnlm-controls-container").show();
|
1762 |
+
getParent.find("#pano' . $id . ' .pnlm-controls-container").show();
|
1763 |
+
getParent.find("#pano' .$id. ' #vrgcontrols'.$id.'").show();
|
1764 |
+
getParent.find("#pano' .$id. ' #sccontrols'.$id.'").hide();
|
1765 |
+
getParent.find("#pano' .$id. ' #adcontrol'.$id.'").show();
|
1766 |
+
getParent.find("#pano' .$id. ' .owl-nav.wpvr_slider_nav").hide();
|
1767 |
+
getParent.find("#pano' .$id. ' #cp-logo-controls").show();
|
1768 |
+
|
1769 |
+
if(compassBlock == "block"){
|
1770 |
+
getParent.find("#pano2' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").show();
|
1771 |
+
getParent.find("#pano' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").show();
|
1772 |
+
}
|
1773 |
+
if(infoBlock == "block"){
|
1774 |
+
getParent.find("#pano2' . $id . ' .pnlm-panorama-info").show();
|
1775 |
+
getParent.find("#pano' . $id . ' .pnlm-panorama-info").show();
|
1776 |
+
}
|
1777 |
+
getParent.find("#pano' . $id . '").removeClass("cardboard-half");
|
1778 |
+
getParent.find("#center-pointer' . $id . '").hide();
|
1779 |
+
getParent.find(".fullscreen-button").hide();
|
1780 |
+
panoshow' . $id . '.off("mousemove");
|
1781 |
+
panoshow2' . $id . '.off("mousemove");
|
1782 |
+
}
|
1783 |
+
});';
|
1784 |
+
|
1785 |
+
$html .= 'panoshow2' . $id . '.on("load", function (){
|
1786 |
+
if(localStorage.getItem("vr_mode") == "off") {
|
1787 |
+
jQuery(".vr-mode-title").hide();
|
1788 |
+
}
|
1789 |
+
else {
|
1790 |
+
jQuery("#pano2' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").css("display","none");
|
1791 |
+
jQuery("#pano' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").css("display","none");
|
1792 |
+
jQuery("#pano2' . $id . ' .pnlm-panorama-info").hide();
|
1793 |
+
jQuery("#pano' . $id . ' .pnlm-panorama-info").hide();
|
1794 |
+
jQuery(".vr-mode-title").show();
|
1795 |
+
}
|
1796 |
+
});';
|
1797 |
+
}
|
1798 |
+
|
1799 |
+
//=== end Dplicate mode only for vr mode===//
|
1800 |
+
|
1801 |
$html .= 'panoshow' . $id . '.on("load", function (){
|
1802 |
+
if(localStorage.getItem("vr_mode") == "off") {
|
1803 |
+
jQuery(".vr-mode-title").hide();
|
1804 |
+
}
|
1805 |
+
else {
|
1806 |
+
jQuery("#pano2' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").css("display","none");
|
1807 |
+
jQuery("#pano' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").css("display","none");
|
1808 |
+
jQuery("#pano2' . $id . ' .pnlm-panorama-info").hide();
|
1809 |
+
jQuery("#pano' . $id . ' .pnlm-panorama-info").hide();
|
1810 |
+
jQuery(".vr-mode-title").show();
|
1811 |
+
}
|
1812 |
setTimeout(() => {
|
1813 |
window.dispatchEvent(new Event("resize"));
|
1814 |
}, 200);
|
admin/css/wpvr-admin.css
CHANGED
@@ -3494,7 +3494,7 @@ button.delete-scene {
|
|
3494 |
width: calc(100% - 91px);
|
3495 |
}
|
3496 |
|
3497 |
-
.rex-onboarding .wpvr-settings .wpvr_role-container ul li.enqueue-script textarea
|
3498 |
border: 1px solid #ddd;
|
3499 |
margin: 10px 0 0 0;
|
3500 |
padding: 10px 15px;
|
3494 |
width: calc(100% - 91px);
|
3495 |
}
|
3496 |
|
3497 |
+
.rex-onboarding .wpvr-settings .wpvr_role-container ul li.enqueue-script textarea {
|
3498 |
border: 1px solid #ddd;
|
3499 |
margin: 10px 0 0 0;
|
3500 |
padding: 10px 15px;
|
admin/lib/pannellum/src/js/pannellum.js
CHANGED
@@ -1778,7 +1778,6 @@ function createHotSpot(hs) {
|
|
1778 |
}
|
1779 |
} else {
|
1780 |
//wpvr edit by sakib for in tab url open// -- handling from here
|
1781 |
-
console.log(hs);
|
1782 |
if (hs.wpvr_url_open == 'on') {
|
1783 |
a.target = '_self';
|
1784 |
}
|
1778 |
}
|
1779 |
} else {
|
1780 |
//wpvr edit by sakib for in tab url open// -- handling from here
|
|
|
1781 |
if (hs.wpvr_url_open == 'on') {
|
1782 |
a.target = '_self';
|
1783 |
}
|
admin/partials/wpvr_documentation.php
CHANGED
@@ -792,6 +792,7 @@ $rollback_versions = function_exists( 'rex_wpvr_get_roll_back_versions' ) ?
|
|
792 |
$editor_active = get_option('wpvr_editor_active');
|
793 |
$author_active = get_option('wpvr_author_active');
|
794 |
$fontawesome_disable = get_option('wpvr_fontawesome_disable');
|
|
|
795 |
$mobile_media_resize = get_option('mobile_media_resize');
|
796 |
$wpvr_script_control = get_option('wpvr_script_control');
|
797 |
$wpvr_script_list = get_option('wpvr_script_list');
|
@@ -874,7 +875,7 @@ $rollback_versions = function_exists( 'rex_wpvr_get_roll_back_versions' ) ?
|
|
874 |
<span class="icon">
|
875 |
<img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
|
876 |
</span>
|
877 |
-
<p><?php echo __('
|
878 |
</span>
|
879 |
</li>
|
880 |
|
@@ -900,7 +901,7 @@ $rollback_versions = function_exists( 'rex_wpvr_get_roll_back_versions' ) ?
|
|
900 |
<span class="icon">
|
901 |
<img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
|
902 |
</span>
|
903 |
-
<p><?php echo __('
|
904 |
</span>
|
905 |
</li>
|
906 |
|
@@ -1023,7 +1024,7 @@ $rollback_versions = function_exists( 'rex_wpvr_get_roll_back_versions' ) ?
|
|
1023 |
</span>
|
1024 |
</li>
|
1025 |
|
1026 |
-
<li class="enqueue-video-script wpvr_enqueue_video_script_list">
|
1027 |
<h6><?php echo __('List of allowed pages to load WP VR Video JS library (The URLs of the pages on your site, You want to load Video JS):', 'wpvr'); ?> </h6>
|
1028 |
|
1029 |
<span class="wpvr-tooltip">
|
@@ -1073,6 +1074,33 @@ $rollback_versions = function_exists( 'rex_wpvr_get_roll_back_versions' ) ?
|
|
1073 |
<textarea id="wpvr_frontend_notice_area" class="materialize-textarea" placeholder="Add your notice here"><?php echo $wpvr_frontend_notice_area; ?></textarea>
|
1074 |
</li>
|
1075 |
<!-- WPVR front-end notice -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1076 |
|
1077 |
<li>
|
1078 |
<form class="wpvr-version">
|
@@ -1089,6 +1117,7 @@ $rollback_versions = function_exists( 'rex_wpvr_get_roll_back_versions' ) ?
|
|
1089 |
<input class="wpvr-btn" type="submit" value="Rollback">
|
1090 |
</form>
|
1091 |
</li>
|
|
|
1092 |
</ul>
|
1093 |
|
1094 |
<div class="save-progress-bar">
|
792 |
$editor_active = get_option('wpvr_editor_active');
|
793 |
$author_active = get_option('wpvr_author_active');
|
794 |
$fontawesome_disable = get_option('wpvr_fontawesome_disable');
|
795 |
+
$cardboard_disable = get_option('wpvr_cardboard_disable');
|
796 |
$mobile_media_resize = get_option('mobile_media_resize');
|
797 |
$wpvr_script_control = get_option('wpvr_script_control');
|
798 |
$wpvr_script_list = get_option('wpvr_script_list');
|
875 |
<span class="icon">
|
876 |
<img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
|
877 |
</span>
|
878 |
+
<p><?php echo __('WP VR will not load Font Awesome library.', 'wpvr'); ?></p>
|
879 |
</span>
|
880 |
</li>
|
881 |
|
901 |
<span class="icon">
|
902 |
<img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
|
903 |
</span>
|
904 |
+
<p><?php echo __('WP VR will resize each scenes for mobile devices.', 'wpvr'); ?></p>
|
905 |
</span>
|
906 |
</li>
|
907 |
|
1024 |
</span>
|
1025 |
</li>
|
1026 |
|
1027 |
+
<li class="enqueue-video-script enqueue-script wpvr_enqueue_video_script_list">
|
1028 |
<h6><?php echo __('List of allowed pages to load WP VR Video JS library (The URLs of the pages on your site, You want to load Video JS):', 'wpvr'); ?> </h6>
|
1029 |
|
1030 |
<span class="wpvr-tooltip">
|
1074 |
<textarea id="wpvr_frontend_notice_area" class="materialize-textarea" placeholder="Add your notice here"><?php echo $wpvr_frontend_notice_area; ?></textarea>
|
1075 |
</li>
|
1076 |
<!-- WPVR front-end notice -->
|
1077 |
+
<?php if (is_plugin_active('wpvr-pro/wpvr-pro.php')) { ?>
|
1078 |
+
<li>
|
1079 |
+
<h6><?php echo __("VR GLass Support (Beta):", "wpvr"); ?></h6>
|
1080 |
+
|
1081 |
+
<span class="wpvr-switcher">
|
1082 |
+
<?php
|
1083 |
+
if ($cardboard_disable == 'true') {
|
1084 |
+
?>
|
1085 |
+
<input id="wpvr_cardboard_disable" type="checkbox" checked>
|
1086 |
+
<?php
|
1087 |
+
} else {
|
1088 |
+
?>
|
1089 |
+
<input id="wpvr_cardboard_disable" type="checkbox" >
|
1090 |
+
<?php
|
1091 |
+
}
|
1092 |
+
?>
|
1093 |
+
<label for="wpvr_cardboard_disable"></label>
|
1094 |
+
</span>
|
1095 |
+
|
1096 |
+
<span class="wpvr-tooltip">
|
1097 |
+
<span class="icon">
|
1098 |
+
<img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png' ?>" alt="check">
|
1099 |
+
</span>
|
1100 |
+
<p><?php echo __('Will activate the VR Glass support on mobile devices. This is the Beta release. So, if you face any issues with it, please contact us at support@rextheme.com', 'wpvr'); ?></p>
|
1101 |
+
</span>
|
1102 |
+
</li>
|
1103 |
+
<?php } ?>
|
1104 |
|
1105 |
<li>
|
1106 |
<form class="wpvr-version">
|
1117 |
<input class="wpvr-btn" type="submit" value="Rollback">
|
1118 |
</form>
|
1119 |
</li>
|
1120 |
+
|
1121 |
</ul>
|
1122 |
|
1123 |
<div class="save-progress-bar">
|
includes/class-wpvr.php
CHANGED
@@ -181,7 +181,8 @@ class Wpvr {
|
|
181 |
add_filter( 'big_image_size_threshold', '__return_false' );
|
182 |
}
|
183 |
$this->loader->add_action( 'admin_init', $this->plugin_admin, 'trigger_rollback' );
|
184 |
-
|
|
|
185 |
|
186 |
|
187 |
/**
|
181 |
add_filter( 'big_image_size_threshold', '__return_false' );
|
182 |
}
|
183 |
$this->loader->add_action( 'admin_init', $this->plugin_admin, 'trigger_rollback' );
|
184 |
+
|
185 |
+
}
|
186 |
|
187 |
|
188 |
/**
|
public/css/wpvr-public.css
CHANGED
@@ -3,6 +3,23 @@
|
|
3 |
* included in this file.
|
4 |
*/
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
.explainer {
|
7 |
position: absolute;
|
8 |
bottom: 40px;
|
@@ -22,8 +39,8 @@
|
|
22 |
|
23 |
.explainer_button {
|
24 |
position: absolute;
|
25 |
-
bottom:
|
26 |
-
right:
|
27 |
z-index: 9999;
|
28 |
text-align: center;
|
29 |
width: 50px;
|
@@ -199,7 +216,7 @@
|
|
199 |
|
200 |
.adcontrol {
|
201 |
position: absolute;
|
202 |
-
bottom:
|
203 |
z-index: 2;
|
204 |
}
|
205 |
|
@@ -326,6 +343,21 @@ div.pnlm-hotspot-base.far:before {
|
|
326 |
color: 000;
|
327 |
}
|
328 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
@-webkit-keyframes vrbounce {
|
330 |
0% {
|
331 |
top: 0;
|
@@ -542,7 +574,12 @@ div.pnlm-hotspot-base.far:before {
|
|
542 |
max-width: 100% !important;
|
543 |
margin: 0 !important;
|
544 |
}
|
545 |
-
|
|
|
|
|
|
|
|
|
|
|
546 |
|
547 |
.pnlm-container iframe {
|
548 |
max-width: inherit;
|
@@ -578,6 +615,7 @@ div.custom-tooltip span {
|
|
578 |
cursor: default;
|
579 |
margin: 0 !important;
|
580 |
bottom: 40px !important;
|
|
|
581 |
transform: translateX(-50%);
|
582 |
min-width: 300px;
|
583 |
font-weight: 400;
|
@@ -606,6 +644,7 @@ div.custom-tooltip:hover span {
|
|
606 |
visibility: visible;
|
607 |
}
|
608 |
|
|
|
609 |
div.custom-tooltip:hover span:after {
|
610 |
content: '';
|
611 |
position: absolute;
|
@@ -629,6 +668,17 @@ div.custom-tooltip:hover span:after {
|
|
629 |
width: 80%;
|
630 |
max-width: 980px;
|
631 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
632 |
|
633 |
.custom-ifram-flex {
|
634 |
height: 100%;
|
@@ -837,6 +887,135 @@ div.custom-ifram {
|
|
837 |
}
|
838 |
|
839 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
840 |
/* ---------responsive style--------- */
|
841 |
@media only screen and (min-width: 1921px) {
|
842 |
.wpvr-home-title {
|
@@ -857,7 +1036,9 @@ div.custom-ifram {
|
|
857 |
.pnlm-container.vrembed {
|
858 |
height: 100% !important;
|
859 |
}
|
860 |
-
|
|
|
|
|
861 |
.custom-ifram iframe {
|
862 |
height: 300px;
|
863 |
}
|
@@ -908,10 +1089,18 @@ div.custom-ifram {
|
|
908 |
height: 320px;
|
909 |
width: 100%;
|
910 |
}
|
911 |
-
|
|
|
|
|
912 |
.custom-tooltip p {
|
913 |
width: 430px;
|
914 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
915 |
|
916 |
}
|
917 |
|
@@ -940,6 +1129,9 @@ div.custom-ifram {
|
|
940 |
width: 100% !important;
|
941 |
height: 300px !important;
|
942 |
}
|
|
|
|
|
|
|
943 |
|
944 |
.pnlm-container.vrembed {
|
945 |
height: 100% !important;
|
3 |
* included in this file.
|
4 |
*/
|
5 |
|
6 |
+
.vr-pointer-container {
|
7 |
+
position: absolute;
|
8 |
+
top: 50%;
|
9 |
+
z-index: 2;
|
10 |
+
left: 50%;
|
11 |
+
transform: translate(-50%, -50%);
|
12 |
+
}
|
13 |
+
.center-pointer {
|
14 |
+
height: 10px;
|
15 |
+
width: 10px;
|
16 |
+
text-align: center;
|
17 |
+
background: #fff;
|
18 |
+
display: block;
|
19 |
+
cursor: pointer;
|
20 |
+
border-radius: 100%;
|
21 |
+
}
|
22 |
+
|
23 |
.explainer {
|
24 |
position: absolute;
|
25 |
bottom: 40px;
|
39 |
|
40 |
.explainer_button {
|
41 |
position: absolute;
|
42 |
+
bottom: 15px;
|
43 |
+
right: 45px;
|
44 |
z-index: 9999;
|
45 |
text-align: center;
|
46 |
width: 50px;
|
216 |
|
217 |
.adcontrol {
|
218 |
position: absolute;
|
219 |
+
bottom: 15px;
|
220 |
z-index: 2;
|
221 |
}
|
222 |
|
343 |
color: 000;
|
344 |
}
|
345 |
|
346 |
+
|
347 |
+
.wpvr-pluse-effect {
|
348 |
+
animation: icon-pulse-pointer 1.5s infinite cubic-bezier(.25, 0, 0, 1);
|
349 |
+
}
|
350 |
+
@keyframes icon-pulse-pointer {
|
351 |
+
0% {
|
352 |
+
box-shadow: 0 0 0 0px #ffffff;
|
353 |
+
}
|
354 |
+
|
355 |
+
100% {
|
356 |
+
box-shadow: 0 0 0 10px #ffffff00;
|
357 |
+
}
|
358 |
+
}
|
359 |
+
|
360 |
+
|
361 |
@-webkit-keyframes vrbounce {
|
362 |
0% {
|
363 |
top: 0;
|
574 |
max-width: 100% !important;
|
575 |
margin: 0 !important;
|
576 |
}
|
577 |
+
.cardboard-vrembed {
|
578 |
+
display: flex;
|
579 |
+
flex-flow: row wrap;
|
580 |
+
justify-content: space-between;
|
581 |
+
background: #222;
|
582 |
+
}
|
583 |
|
584 |
.pnlm-container iframe {
|
585 |
max-width: inherit;
|
615 |
cursor: default;
|
616 |
margin: 0 !important;
|
617 |
bottom: 40px !important;
|
618 |
+
left: 50%;
|
619 |
transform: translateX(-50%);
|
620 |
min-width: 300px;
|
621 |
font-weight: 400;
|
644 |
visibility: visible;
|
645 |
}
|
646 |
|
647 |
+
div.custom-tooltip span.vr-mode-title:after,
|
648 |
div.custom-tooltip:hover span:after {
|
649 |
content: '';
|
650 |
position: absolute;
|
668 |
width: 80%;
|
669 |
max-width: 980px;
|
670 |
}
|
671 |
+
div.custom-tooltip span.vr-mode-title:after{
|
672 |
+
bottom: -18px;
|
673 |
+
}
|
674 |
+
|
675 |
+
.custom-tooltip span.vr-mode-title {
|
676 |
+
visibility: visible;
|
677 |
+
min-width: 80px;
|
678 |
+
line-height: 1;
|
679 |
+
left: 50%;
|
680 |
+
}
|
681 |
+
|
682 |
|
683 |
.custom-ifram-flex {
|
684 |
height: 100%;
|
887 |
}
|
888 |
|
889 |
|
890 |
+
/*-------wpvr cardboard style--------*/
|
891 |
+
.wpvr-cardboard {
|
892 |
+
position: relative;
|
893 |
+
display: flex;
|
894 |
+
align-items: center;
|
895 |
+
justify-content: space-between;
|
896 |
+
background: #000;
|
897 |
+
}
|
898 |
+
|
899 |
+
.wpvr-cardboard .pano-wrap {
|
900 |
+
direction:ltr;
|
901 |
+
height: 100%!important;
|
902 |
+
}
|
903 |
+
|
904 |
+
|
905 |
+
.wpvr-cardboard .fullscreen-button {
|
906 |
+
position: absolute;
|
907 |
+
top: 10px;
|
908 |
+
left: 10px;
|
909 |
+
display: none;
|
910 |
+
z-index: 1000;
|
911 |
+
font-size: 25px;
|
912 |
+
padding: 9px 13px;
|
913 |
+
}
|
914 |
+
.cardboard-half {
|
915 |
+
width: 49%!important;
|
916 |
+
}
|
917 |
+
.wpvr-cardboard .fullscreen-button .compress {
|
918 |
+
display: none;
|
919 |
+
}
|
920 |
+
|
921 |
+
.wpvr-cardboard .pano-left {
|
922 |
+
position: absolute;
|
923 |
+
opacity: 0;
|
924 |
+
visibility: hidden;
|
925 |
+
}
|
926 |
+
|
927 |
+
/*------cardboard switcher design--------*/
|
928 |
+
.wpvr-cardboard .wpvr-cardboard-switcher {
|
929 |
+
position: absolute;
|
930 |
+
bottom: 10px;
|
931 |
+
right: 6px;
|
932 |
+
z-index: 9;
|
933 |
+
cursor: pointer;
|
934 |
+
}
|
935 |
+
.wpvr-cardboard .wpvr-cardboard-switcher.vr-embade-mode {
|
936 |
+
position: fixed;
|
937 |
+
z-index: 1000;
|
938 |
+
}
|
939 |
+
.wpvr-cardboard .wpvr-cardboard-switcher input[type="checkbox"] {
|
940 |
+
display: none;
|
941 |
+
}
|
942 |
+
.wpvr-cardboard .wpvr-cardboard-switcher .switcher-box {
|
943 |
+
width: 60px;
|
944 |
+
height: 35px;
|
945 |
+
border: 2px solid #216DF0;
|
946 |
+
border-radius: 100px;
|
947 |
+
display: flex;
|
948 |
+
flex-flow: column;
|
949 |
+
align-items: center;
|
950 |
+
background: #FFFFFF;
|
951 |
+
justify-content: center;
|
952 |
+
}
|
953 |
+
.wpvr-cardboard .wpvr-cardboard-switcher .switcher-box svg {
|
954 |
+
width: 35px;
|
955 |
+
}
|
956 |
+
.wpvr-cardboard .wpvr-cardboard-switcher input[type="checkbox"]:checked + .switcher-box {
|
957 |
+
background-color: #216DF0;
|
958 |
+
border-color: #216DF0;
|
959 |
+
}
|
960 |
+
.wpvr-cardboard .wpvr-cardboard-switcher input[type="checkbox"]:checked + .switcher-box svg path {
|
961 |
+
fill: #FFFFFF;
|
962 |
+
}
|
963 |
+
|
964 |
+
.wpvr-cardboard .wpvr-cardboard-switcher .switcher-box .cardbord-mode-tooltip,
|
965 |
+
.wpvr-cardboard .wpvr-cardboard-switcher .switcher-box .normal-mode-tooltip {
|
966 |
+
width: 155px;
|
967 |
+
background: #FFFFFF;
|
968 |
+
border-radius: 10px;
|
969 |
+
display: block;
|
970 |
+
padding: 11px 7px;
|
971 |
+
position: absolute;
|
972 |
+
bottom: calc(100% + 10px);
|
973 |
+
right: 0;
|
974 |
+
text-align: center;
|
975 |
+
font-weight: 600;
|
976 |
+
font-size: 14px;
|
977 |
+
line-height: 1;
|
978 |
+
color: #000000;
|
979 |
+
display: none;
|
980 |
+
}
|
981 |
+
|
982 |
+
.wpvr-cardboard .wpvr-cardboard-switcher .switcher-box:hover .normal-mode-tooltip {
|
983 |
+
display: block;
|
984 |
+
}
|
985 |
+
.wpvr-cardboard .wpvr-cardboard-switcher input[type="checkbox"]:checked + .switcher-box:hover .normal-mode-tooltip {
|
986 |
+
display: none;
|
987 |
+
}
|
988 |
+
.wpvr-cardboard .wpvr-cardboard-switcher input[type="checkbox"]:checked + .switcher-box:hover .cardbord-mode-tooltip {
|
989 |
+
display: block;
|
990 |
+
}
|
991 |
+
|
992 |
+
.wpvr-cardboard .wpvr-cardboard-switcher .switcher-box .cardbord-mode-tooltip:before,
|
993 |
+
.wpvr-cardboard .wpvr-cardboard-switcher .switcher-box .normal-mode-tooltip:before {
|
994 |
+
content: "";
|
995 |
+
position: absolute;
|
996 |
+
right: 26px;
|
997 |
+
bottom: -5px;
|
998 |
+
width: 14px;
|
999 |
+
height: 14px;
|
1000 |
+
background: #fff;
|
1001 |
+
transform: rotate(45deg);
|
1002 |
+
border-radius: 3px;
|
1003 |
+
}
|
1004 |
+
.cardboard-vrfullwidth.vrfullwidth {
|
1005 |
+
display: flex;
|
1006 |
+
flex-flow: row wrap;
|
1007 |
+
height: 100%;
|
1008 |
+
justify-content: space-between;
|
1009 |
+
}
|
1010 |
+
/* -landscape mode- */
|
1011 |
+
.wpvr-landscape{
|
1012 |
+
-webkit-transform: rotate(90deg);
|
1013 |
+
-moz-transform: rotate(90deg);
|
1014 |
+
-o-transform: rotate(90deg);
|
1015 |
+
-ms-transform: rotate(90deg);
|
1016 |
+
transform: rotate(90deg);
|
1017 |
+
}
|
1018 |
+
|
1019 |
/* ---------responsive style--------- */
|
1020 |
@media only screen and (min-width: 1921px) {
|
1021 |
.wpvr-home-title {
|
1036 |
.pnlm-container.vrembed {
|
1037 |
height: 100% !important;
|
1038 |
}
|
1039 |
+
.pnlm-container.cardboard-half {
|
1040 |
+
width: 49% !important;
|
1041 |
+
}
|
1042 |
.custom-ifram iframe {
|
1043 |
height: 300px;
|
1044 |
}
|
1089 |
height: 320px;
|
1090 |
width: 100%;
|
1091 |
}
|
1092 |
+
.pnlm-container.cardboard-half {
|
1093 |
+
width: 49% !important;
|
1094 |
+
}
|
1095 |
.custom-tooltip p {
|
1096 |
width: 430px;
|
1097 |
}
|
1098 |
+
.wpvr-cardboard .pnlm-compass {
|
1099 |
+
right: 7px;
|
1100 |
+
}
|
1101 |
+
.wpvr-cardboard.enable-cardboard .pnlm-compass {
|
1102 |
+
right: 74px!important;
|
1103 |
+
}
|
1104 |
|
1105 |
}
|
1106 |
|
1129 |
width: 100% !important;
|
1130 |
height: 300px !important;
|
1131 |
}
|
1132 |
+
.pnlm-container.cardboard-half {
|
1133 |
+
width: 49% !important;
|
1134 |
+
}
|
1135 |
|
1136 |
.pnlm-container.vrembed {
|
1137 |
height: 100% !important;
|
public/js/wpvr-public.js
CHANGED
@@ -85,4 +85,6 @@ jQuery(document).ready(function($) {
|
|
85 |
$('.wpvr-mobile-notice').fadeOut();
|
86 |
$.cookie('wpvr_mobile_notice', 'true');
|
87 |
});
|
|
|
|
|
88 |
});
|
85 |
$('.wpvr-mobile-notice').fadeOut();
|
86 |
$.cookie('wpvr_mobile_notice', 'true');
|
87 |
});
|
88 |
+
|
89 |
+
|
90 |
});
|
public/lib/pannellum/src/js/pannellum.js
CHANGED
@@ -809,12 +809,19 @@ function onDocumentMouseMove(event) {
|
|
809 |
var yaw = ((Math.atan(onPointerDownPointerX / canvasWidth * 2 - 1) - Math.atan(pos.x / canvasWidth * 2 - 1)) * 180 / Math.PI * config.hfov / 90) + onPointerDownYaw;
|
810 |
speed.yaw = (yaw - config.yaw) % 360 * 0.2;
|
811 |
config.yaw = yaw;
|
812 |
-
|
813 |
var vfov = 2 * Math.atan(Math.tan(config.hfov/360*Math.PI) * canvasHeight / canvasWidth) * 180 / Math.PI;
|
814 |
|
815 |
var pitch = ((Math.atan(pos.y / canvasHeight * 2 - 1) - Math.atan(onPointerDownPointerY / canvasHeight * 2 - 1)) * 180 / Math.PI * vfov / 90) + onPointerDownPitch;
|
816 |
speed.pitch = (pitch - config.pitch) * 0.2;
|
817 |
config.pitch = pitch;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
818 |
}
|
819 |
}
|
820 |
|
@@ -930,6 +937,11 @@ function onDocumentTouchMove(event) {
|
|
930 |
var pitch = (clientY - onPointerDownPointerY) * touchmovePanSpeedCoeff + onPointerDownPitch;
|
931 |
speed.pitch = (pitch - config.pitch) * 0.2;
|
932 |
config.pitch = pitch;
|
|
|
|
|
|
|
|
|
|
|
933 |
}
|
934 |
}
|
935 |
|
@@ -1792,6 +1804,7 @@ function createHotSpot(hs) {
|
|
1792 |
div.className += ' pnlm-pointer';
|
1793 |
span.className += ' pnlm-pointer';
|
1794 |
}
|
|
|
1795 |
renderContainer.appendChild(div);
|
1796 |
}
|
1797 |
|
809 |
var yaw = ((Math.atan(onPointerDownPointerX / canvasWidth * 2 - 1) - Math.atan(pos.x / canvasWidth * 2 - 1)) * 180 / Math.PI * config.hfov / 90) + onPointerDownYaw;
|
810 |
speed.yaw = (yaw - config.yaw) % 360 * 0.2;
|
811 |
config.yaw = yaw;
|
812 |
+
|
813 |
var vfov = 2 * Math.atan(Math.tan(config.hfov/360*Math.PI) * canvasHeight / canvasWidth) * 180 / Math.PI;
|
814 |
|
815 |
var pitch = ((Math.atan(pos.y / canvasHeight * 2 - 1) - Math.atan(onPointerDownPointerY / canvasHeight * 2 - 1)) * 180 / Math.PI * vfov / 90) + onPointerDownPitch;
|
816 |
speed.pitch = (pitch - config.pitch) * 0.2;
|
817 |
config.pitch = pitch;
|
818 |
+
|
819 |
+
var mirrorData = {
|
820 |
+
pitch: pitch,
|
821 |
+
yaw: yaw
|
822 |
+
}
|
823 |
+
fireEvent('mousemove', mirrorData);
|
824 |
+
|
825 |
}
|
826 |
}
|
827 |
|
937 |
var pitch = (clientY - onPointerDownPointerY) * touchmovePanSpeedCoeff + onPointerDownPitch;
|
938 |
speed.pitch = (pitch - config.pitch) * 0.2;
|
939 |
config.pitch = pitch;
|
940 |
+
var mirrorData = {
|
941 |
+
pitch: pitch,
|
942 |
+
yaw: yaw
|
943 |
+
}
|
944 |
+
fireEvent('touchmove', mirrorData);
|
945 |
}
|
946 |
}
|
947 |
|
1804 |
div.className += ' pnlm-pointer';
|
1805 |
span.className += ' pnlm-pointer';
|
1806 |
}
|
1807 |
+
// renderContainer.appendChild("<span>title</span>");
|
1808 |
renderContainer.appendChild(div);
|
1809 |
}
|
1810 |
|
uninstall.php
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Fired when the plugin is uninstalled.
|
5 |
-
*
|
6 |
-
* When populating this file, consider the following flow
|
7 |
-
* of control:
|
8 |
-
*
|
9 |
-
* - This method should be static
|
10 |
-
* - Check if the $_REQUEST content actually is the plugin name
|
11 |
-
* - Run an admin referrer check to make sure it goes through authentication
|
12 |
-
* - Verify the output of $_GET makes sense
|
13 |
-
* - Repeat with other user roles. Best directly by using the links/query string parameters.
|
14 |
-
* - Repeat things for multisite. Once for a single site in the network, once sitewide.
|
15 |
-
*
|
16 |
-
* This file may be updated more in future version of the Boilerplate; however, this is the
|
17 |
-
* general skeleton and outline for how the file should work.
|
18 |
-
*
|
19 |
-
* For more information, see the following discussion:
|
20 |
-
* https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/pull/123#issuecomment-28541913
|
21 |
-
*
|
22 |
-
* @link http://rextheme.com/
|
23 |
-
* @since 1.0.0
|
24 |
-
*
|
25 |
-
* @package Wpvr
|
26 |
-
*/
|
27 |
-
|
28 |
-
// If uninstall not called from WordPress, then exit.
|
29 |
-
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
30 |
-
exit;
|
31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -8,6 +8,8 @@ $baseDir = dirname($vendorDir);
|
|
8 |
return array(
|
9 |
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
10 |
'Singleton' => $baseDir . '/admin/views/class-wpvr-singleton.php',
|
|
|
|
|
11 |
'WPVR_Admin_Page' => $baseDir . '/admin/classes/class-wpvr-admin-pages.php',
|
12 |
'WPVR_Advanced_Control' => $baseDir . '/admin/classes/class-wpvr-advanced-control.php',
|
13 |
'WPVR_Basic_Setting' => $baseDir . '/admin/classes/class-wpvr-basic-setting.php',
|
8 |
return array(
|
9 |
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
10 |
'Singleton' => $baseDir . '/admin/views/class-wpvr-singleton.php',
|
11 |
+
'WPVR\\Builder\\DIVI\\Modules\\WPVR_Modules' => $baseDir . '/includes/wpvr-divi-modules/includes/DiviModules.php',
|
12 |
+
'WPVR\\Builder\\DIVI\\WPVR_Divi_modules' => $baseDir . '/includes/wpvr-divi-modules/wpvr_divi_modules.php',
|
13 |
'WPVR_Admin_Page' => $baseDir . '/admin/classes/class-wpvr-admin-pages.php',
|
14 |
'WPVR_Advanced_Control' => $baseDir . '/admin/classes/class-wpvr-advanced-control.php',
|
15 |
'WPVR_Basic_Setting' => $baseDir . '/admin/classes/class-wpvr-basic-setting.php',
|
vendor/composer/autoload_static.php
CHANGED
@@ -9,6 +9,8 @@ class ComposerStaticInit10da27e89b9ceb921ca7de55a4e562d6
|
|
9 |
public static $classMap = array (
|
10 |
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
11 |
'Singleton' => __DIR__ . '/../..' . '/admin/views/class-wpvr-singleton.php',
|
|
|
|
|
12 |
'WPVR_Admin_Page' => __DIR__ . '/../..' . '/admin/classes/class-wpvr-admin-pages.php',
|
13 |
'WPVR_Advanced_Control' => __DIR__ . '/../..' . '/admin/classes/class-wpvr-advanced-control.php',
|
14 |
'WPVR_Basic_Setting' => __DIR__ . '/../..' . '/admin/classes/class-wpvr-basic-setting.php',
|
9 |
public static $classMap = array (
|
10 |
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
11 |
'Singleton' => __DIR__ . '/../..' . '/admin/views/class-wpvr-singleton.php',
|
12 |
+
'WPVR\\Builder\\DIVI\\Modules\\WPVR_Modules' => __DIR__ . '/../..' . '/includes/wpvr-divi-modules/includes/DiviModules.php',
|
13 |
+
'WPVR\\Builder\\DIVI\\WPVR_Divi_modules' => __DIR__ . '/../..' . '/includes/wpvr-divi-modules/wpvr_divi_modules.php',
|
14 |
'WPVR_Admin_Page' => __DIR__ . '/../..' . '/admin/classes/class-wpvr-admin-pages.php',
|
15 |
'WPVR_Advanced_Control' => __DIR__ . '/../..' . '/admin/classes/class-wpvr-advanced-control.php',
|
16 |
'WPVR_Basic_Setting' => __DIR__ . '/../..' . '/admin/classes/class-wpvr-basic-setting.php',
|
wpvr.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* Plugin Name: WP VR
|
17 |
* Plugin URI: https://rextheme.com/wpvr/
|
18 |
* Description: WP VR - 360 Panorama and virtual tour creator for WordPress is a customized panaroma & virtual builder tool for WordPress Website.
|
19 |
-
* Version: 8.0
|
20 |
* Author: Rextheme
|
21 |
* Author URI: http://rextheme.com/
|
22 |
* License: GPL-2.0+
|
@@ -37,7 +37,7 @@ require plugin_dir_path(__FILE__) . 'elementor/elementor.php';
|
|
37 |
* Start at version 1.0.0 and use SemVer - https://semver.org
|
38 |
* Rename this for your plugin and update it as you release new versions.
|
39 |
*/
|
40 |
-
define('WPVR_VERSION', '8.0
|
41 |
define('WPVR_FILE', __FILE__);
|
42 |
define("WPVR_PLUGIN_DIR_URL", plugin_dir_url(__FILE__));
|
43 |
define("WPVR_PLUGIN_DIR_PATH", plugin_dir_path(__FILE__));
|
@@ -203,6 +203,7 @@ function wpvr_block_render($attributes)
|
|
203 |
|
204 |
$postdata = get_post_meta($id, 'panodata', true);
|
205 |
$panoid = 'pano' . $id;
|
|
|
206 |
|
207 |
if (isset($postdata['streetviewdata'])) {
|
208 |
if (empty($width)) {
|
@@ -221,6 +222,7 @@ function wpvr_block_render($attributes)
|
|
221 |
|
222 |
return $html;
|
223 |
}
|
|
|
224 |
|
225 |
if (isset($postdata['vidid'])) {
|
226 |
if (empty($width)) {
|
@@ -376,16 +378,17 @@ function wpvr_block_render($attributes)
|
|
376 |
}
|
377 |
}
|
378 |
|
379 |
-
|
380 |
$compass = false;
|
381 |
$audio_right = "5px";
|
382 |
-
if (isset($postdata['compass'])
|
383 |
$compass = $postdata['compass'] == 'on' || $postdata['compass'] != null ? true : false;
|
384 |
if ($compass) {
|
385 |
$audio_right = "60px";
|
386 |
}
|
387 |
}
|
388 |
|
|
|
|
|
389 |
//===explainer handle===//
|
390 |
$explainer_right = "10px";
|
391 |
if ((isset($postdata['compass']) && $postdata['compass'] == 'on') && (isset($postdata['bg_music']) && $postdata['bg_music'] == 'on')) {
|
@@ -395,6 +398,29 @@ function wpvr_block_render($attributes)
|
|
395 |
} elseif (isset($postdata['bg_music']) && $postdata['bg_music'] == "on") {
|
396 |
$explainer_right = "30px";
|
397 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
|
399 |
//===explainer handle===//
|
400 |
|
@@ -828,6 +854,20 @@ function wpvr_block_render($attributes)
|
|
828 |
line-height: 30px;
|
829 |
animation: icon-pulse' . $panoid . ' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
|
830 |
}';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
831 |
if ($hotspotblink == 'on') {
|
832 |
$html .= '@-webkit-keyframes icon-pulse' . $panoid . ' {
|
833 |
0% {
|
@@ -862,19 +902,68 @@ function wpvr_block_render($attributes)
|
|
862 |
|
863 |
$html .= '</style>';
|
864 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
865 |
if ($width == 'fullwidth') {
|
866 |
if (wpvr_isMobileDevice()) {
|
867 |
-
$html .= '<div
|
|
|
|
|
868 |
} else {
|
|
|
869 |
$html .= '<div id="pano' . $id . '" class="pano-wrap vrfullwidth" style=" text-align:center; height: ' . $height . 'px; border-radius:' . $radius . '; direction:ltr;" >';
|
870 |
}
|
871 |
} else {
|
872 |
if (wpvr_isMobileDevice()) {
|
873 |
-
$html .= '<div id="
|
|
|
|
|
|
|
|
|
|
|
|
|
874 |
} else {
|
875 |
-
|
|
|
|
|
|
|
|
|
876 |
}
|
877 |
}
|
|
|
|
|
|
|
|
|
|
|
878 |
|
879 |
//===company logo===//
|
880 |
if (isset($postdata['cpLogoSwitch'])) {
|
@@ -1107,10 +1196,17 @@ function wpvr_block_render($attributes)
|
|
1107 |
$html .= '</div>';
|
1108 |
$html .= '</div>';
|
1109 |
$html .= '</div>';
|
|
|
|
|
|
|
|
|
1110 |
|
1111 |
//script started
|
1112 |
|
1113 |
$html .= '<script>';
|
|
|
|
|
|
|
1114 |
if (isset($postdata['bg_music'])) {
|
1115 |
if ($bg_music == 'on') {
|
1116 |
$html .= '
|
@@ -1179,7 +1275,330 @@ function wpvr_block_render($attributes)
|
|
1179 |
$html .= '}';
|
1180 |
$html .= 'var panoshow' . $id . ' = pannellum.viewer(response[0]["panoid"], scenes);';
|
1181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1182 |
$html .= 'panoshow' . $id . '.on("load", function (){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1183 |
if (jQuery("#pano' . $id . '").children().children(".pnlm-panorama-info:visible").length > 0) {
|
1184 |
jQuery("#controls' . $id . '").css("bottom", "55px");
|
1185 |
}
|
@@ -1227,6 +1646,8 @@ function wpvr_block_render($attributes)
|
|
1227 |
}
|
1228 |
}
|
1229 |
|
|
|
|
|
1230 |
//===Custom Control===//
|
1231 |
if (isset($custom_control)) {
|
1232 |
if ($custom_control['panupSwitch'] == "on") {
|
@@ -1436,6 +1857,8 @@ function wpvr_block_render($attributes)
|
|
1436 |
jQuery("#pano' . $id . '").find(".pnlm-panorama-info").show();
|
1437 |
});';
|
1438 |
}
|
|
|
|
|
1439 |
if (isset($postdata['previewtext'])) {
|
1440 |
$html .= '
|
1441 |
jQuery("#pano' . $id . '").children(".pnlm-ui").find(".pnlm-load-button p").text("' . $postdata['previewtext'] . '")
|
@@ -1446,6 +1869,7 @@ function wpvr_block_render($attributes)
|
|
1446 |
';
|
1447 |
}
|
1448 |
$html .= '});';
|
|
|
1449 |
$html .= '</script>';
|
1450 |
//script end
|
1451 |
return $html;
|
@@ -1742,11 +2166,12 @@ add_action(
|
|
1742 |
}
|
1743 |
);
|
1744 |
|
1745 |
-
function wpvr_redirect_after_activation(
|
1746 |
-
|
1747 |
-
|
1748 |
-
$url =
|
1749 |
-
|
|
|
1750 |
}
|
1751 |
}
|
1752 |
-
add_action(
|
16 |
* Plugin Name: WP VR
|
17 |
* Plugin URI: https://rextheme.com/wpvr/
|
18 |
* Description: WP VR - 360 Panorama and virtual tour creator for WordPress is a customized panaroma & virtual builder tool for WordPress Website.
|
19 |
+
* Version: 8.1.0
|
20 |
* Author: Rextheme
|
21 |
* Author URI: http://rextheme.com/
|
22 |
* License: GPL-2.0+
|
37 |
* Start at version 1.0.0 and use SemVer - https://semver.org
|
38 |
* Rename this for your plugin and update it as you release new versions.
|
39 |
*/
|
40 |
+
define('WPVR_VERSION', '8.1.0');
|
41 |
define('WPVR_FILE', __FILE__);
|
42 |
define("WPVR_PLUGIN_DIR_URL", plugin_dir_url(__FILE__));
|
43 |
define("WPVR_PLUGIN_DIR_PATH", plugin_dir_path(__FILE__));
|
203 |
|
204 |
$postdata = get_post_meta($id, 'panodata', true);
|
205 |
$panoid = 'pano' . $id;
|
206 |
+
$panoid2 = 'pano2' . $id;
|
207 |
|
208 |
if (isset($postdata['streetviewdata'])) {
|
209 |
if (empty($width)) {
|
222 |
|
223 |
return $html;
|
224 |
}
|
225 |
+
$is_pro = apply_filters('is_wpvr_pro_active',false);
|
226 |
|
227 |
if (isset($postdata['vidid'])) {
|
228 |
if (empty($width)) {
|
378 |
}
|
379 |
}
|
380 |
|
|
|
381 |
$compass = false;
|
382 |
$audio_right = "5px";
|
383 |
+
if (isset($postdata['compass'])) {
|
384 |
$compass = $postdata['compass'] == 'on' || $postdata['compass'] != null ? true : false;
|
385 |
if ($compass) {
|
386 |
$audio_right = "60px";
|
387 |
}
|
388 |
}
|
389 |
|
390 |
+
//===explainer handle===//
|
391 |
+
|
392 |
//===explainer handle===//
|
393 |
$explainer_right = "10px";
|
394 |
if ((isset($postdata['compass']) && $postdata['compass'] == 'on') && (isset($postdata['bg_music']) && $postdata['bg_music'] == 'on')) {
|
398 |
} elseif (isset($postdata['bg_music']) && $postdata['bg_music'] == "on") {
|
399 |
$explainer_right = "30px";
|
400 |
}
|
401 |
+
$enable_cardboard = '';
|
402 |
+
$is_cardboard = get_option('wpvr_cardboard_disable');
|
403 |
+
if(wpvr_isMobileDevice() && $is_cardboard == 'true' ){
|
404 |
+
$enable_cardboard = 'enable-cardboard';
|
405 |
+
$audio_right = "73px";
|
406 |
+
if (isset($postdata['compass'])) {
|
407 |
+
$compass = $postdata['compass'] == 'on' || $postdata['compass'] != null ? true : false;
|
408 |
+
if ($compass) {
|
409 |
+
$audio_right = "130px";
|
410 |
+
}
|
411 |
+
}
|
412 |
+
|
413 |
+
//===explainer handle===//
|
414 |
+
|
415 |
+
$explainer_right = "65px";
|
416 |
+
if ((isset($postdata['compass']) && $postdata['compass'] == true) && (isset($postdata['bg_music']) && $postdata['bg_music'] == 'on')) {
|
417 |
+
$explainer_right = "150px";
|
418 |
+
} elseif (isset($postdata['compass']) && $postdata['compass'] == true) {
|
419 |
+
$explainer_right = "130px";
|
420 |
+
} elseif (isset($postdata['bg_music']) && $postdata['bg_music'] == "on") {
|
421 |
+
$explainer_right = "90px";
|
422 |
+
}
|
423 |
+
}
|
424 |
|
425 |
//===explainer handle===//
|
426 |
|
854 |
line-height: 30px;
|
855 |
animation: icon-pulse' . $panoid . ' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
|
856 |
}';
|
857 |
+
$html .= '#' . $panoid2 . ' div.pnlm-hotspot-base.fas,
|
858 |
+
#' . $panoid2 . ' div.pnlm-hotspot-base.fab,
|
859 |
+
#' . $panoid2 . ' div.pnlm-hotspot-base.fa,
|
860 |
+
#' . $panoid2 . ' div.pnlm-hotspot-base.far {
|
861 |
+
display: block !important;
|
862 |
+
background-color: ' . $hotspoticoncolor . ';
|
863 |
+
color: ' . $foreground_color . ';
|
864 |
+
border-radius: 100%;
|
865 |
+
width: 30px;
|
866 |
+
height: 30px;
|
867 |
+
font-size: 16px;
|
868 |
+
line-height: 30px;
|
869 |
+
animation: icon-pulse' . $panoid2 . ' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
|
870 |
+
}';
|
871 |
if ($hotspotblink == 'on') {
|
872 |
$html .= '@-webkit-keyframes icon-pulse' . $panoid . ' {
|
873 |
0% {
|
902 |
|
903 |
$html .= '</style>';
|
904 |
|
905 |
+
|
906 |
+
|
907 |
+
if (wpvr_isMobileDevice()) {
|
908 |
+
$html .= '<div id="master-container" class="wpvr-cardboard '.$enable_cardboard.' " style="max-width:' . $width . 'px; width: 100%; height: ' . $mobile_height . 'px; border-radius:' . $radius . '; direction:ltr; ">';
|
909 |
+
} else {
|
910 |
+
$html .= '<div id="master-container" class="wpvr-cardboard '.$enable_cardboard.'" style="max-width:' . $width . 'px; width: 100%; height: ' . $height . 'px; border-radius:' . $radius . '; direction:ltr; ">';
|
911 |
+
}
|
912 |
+
$status = get_option('wpvr_edd_license_status');
|
913 |
+
$is_cardboard = get_option('wpvr_cardboard_disable');
|
914 |
+
if ($status !== false && 'valid' == $status && $is_pro && wpvr_isMobileDevice() && $is_cardboard == 'true' ) {
|
915 |
+
$html .= '<button class="fullscreen-button">';
|
916 |
+
$html .= '<span class="expand">';
|
917 |
+
$html .= '<i class="fa fa-expand" aria-hidden="true"></i>';
|
918 |
+
$html .= '</span>';
|
919 |
+
|
920 |
+
$html .= '<span class="compress">';
|
921 |
+
$html .= '<i class="fa fa-compress" aria-hidden="true"></i>';
|
922 |
+
$html .= '</span>';
|
923 |
+
$html .= '</button>';
|
924 |
+
$html .= '<label class="wpvr-cardboard-switcher">
|
925 |
+
<input type="checkbox" class="vr_mode_change' . $id . '" name="vr_mode_change" value="off">
|
926 |
+
<span class="switcher-box">
|
927 |
+
<span class="normal-mode-tooltip">Normal VR Mode</span>
|
928 |
+
<span class="cardbord-mode-tooltip">Cardboard VR Mode</span>
|
929 |
+
<svg width="78" height="60" viewBox="0 0 78 60" fill="none" xmlns="http://www.w3.org/2000/svg">
|
930 |
+
<path d="M42.25 21.4286C42.25 22.2811 41.9076 23.0986 41.2981 23.7014C40.6886 24.3042 39.862 24.6429 39 24.6429C38.138 24.6429 37.3114 24.3042 36.7019 23.7014C36.0924 23.0986 35.75 22.2811 35.75 21.4286C35.75 20.5761 36.0924 19.7585 36.7019 19.1557C37.3114 18.5529 38.138 18.2143 39 18.2143C39.862 18.2143 40.6886 18.5529 41.2981 19.1557C41.9076 19.7585 42.25 20.5761 42.25 21.4286ZM19.5 30C18.9254 30 18.3743 30.2258 17.9679 30.6276C17.5616 31.0295 17.3333 31.5745 17.3333 32.1429C17.3333 32.7112 17.5616 33.2562 17.9679 33.6581C18.3743 34.06 18.9254 34.2857 19.5 34.2857H28.1667C28.7413 34.2857 29.2924 34.06 29.6987 33.6581C30.1051 33.2562 30.3333 32.7112 30.3333 32.1429C30.3333 31.5745 30.1051 31.0295 29.6987 30.6276C29.2924 30.2258 28.7413 30 28.1667 30H19.5ZM47.6667 32.1429C47.6667 31.5745 47.8949 31.0295 48.3013 30.6276C48.7076 30.2258 49.2587 30 49.8333 30H58.5C59.0746 30 59.6257 30.2258 60.0321 30.6276C60.4384 31.0295 60.6667 31.5745 60.6667 32.1429C60.6667 32.7112 60.4384 33.2562 60.0321 33.6581C59.6257 34.06 59.0746 34.2857 58.5 34.2857H49.8333C49.2587 34.2857 48.7076 34.06 48.3013 33.6581C47.8949 33.2562 47.6667 32.7112 47.6667 32.1429ZM32.5 0C31.9254 0 31.3743 0.225765 30.9679 0.627629C30.5616 1.02949 30.3333 1.57454 30.3333 2.14286V8.57143H18.4167C14.8693 8.57183 11.4528 9.89617 8.84994 12.2798C6.24706 14.6634 4.64954 17.9306 4.37667 21.4286H2.16667C1.59203 21.4286 1.04093 21.6543 0.634602 22.0562C0.228273 22.4581 0 23.0031 0 23.5714V36.4286C0 36.9969 0.228273 37.5419 0.634602 37.9438C1.04093 38.3457 1.59203 38.5714 2.16667 38.5714H4.33333V46.0714C4.33333 49.7655 5.81711 53.3083 8.45825 55.9204C11.0994 58.5325 14.6815 60 18.4167 60H25.3933C29.1269 59.9986 32.7071 58.5311 35.347 55.92L37.921 53.3786C38.0618 53.2393 38.229 53.1288 38.4131 53.0534C38.5971 52.978 38.7943 52.9392 38.9935 52.9392C39.1927 52.9392 39.3899 52.978 39.5739 53.0534C39.758 53.1288 39.9252 53.2393 40.066 53.3786L42.6357 55.92C45.2766 58.5322 48.8586 59.9998 52.5937 60H59.5833C63.3185 60 66.9006 58.5325 69.5418 55.9204C72.1829 53.3083 73.6667 49.7655 73.6667 46.0714V38.5714H75.8333C76.408 38.5714 76.9591 38.3457 77.3654 37.9438C77.7717 37.5419 78 36.9969 78 36.4286V23.5714C78 23.0031 77.7717 22.4581 77.3654 22.0562C76.9591 21.6543 76.408 21.4286 75.8333 21.4286H73.6233C73.3505 17.9306 71.753 14.6634 69.1501 12.2798C66.5472 9.89617 63.1307 8.57183 59.5833 8.57143H47.6667V2.14286C47.6667 1.57454 47.4384 1.02949 47.0321 0.627629C46.6257 0.225765 46.0746 0 45.5 0H32.5ZM69.3333 22.5V46.0714C69.3333 48.6289 68.3061 51.0816 66.4776 52.89C64.6491 54.6983 62.1692 55.7143 59.5833 55.7143H52.5937C50.0093 55.7132 47.5311 54.6973 45.7037 52.89L43.1297 50.3486C42.5864 49.8108 41.9413 49.3842 41.2312 49.0931C40.5211 48.8021 39.76 48.6522 38.9913 48.6522C38.2227 48.6522 37.4616 48.8021 36.7515 49.0931C36.0414 49.3842 35.3963 49.8108 34.853 50.3486L32.2833 52.89C30.4559 54.6973 27.9777 55.7132 25.3933 55.7143H18.4167C15.8308 55.7143 13.3509 54.6983 11.5224 52.89C9.6939 51.0816 8.66667 48.6289 8.66667 46.0714V22.5C8.66667 19.9426 9.6939 17.4899 11.5224 15.6815C13.3509 13.8731 15.8308 12.8571 18.4167 12.8571H59.5833C62.1692 12.8571 64.6491 13.8731 66.4776 15.6815C68.3061 17.4899 69.3333 19.9426 69.3333 22.5Z" fill="#216DF0"/>
|
931 |
+
</svg>
|
932 |
+
</span>
|
933 |
+
</label>';
|
934 |
+
}
|
935 |
+
|
936 |
if ($width == 'fullwidth') {
|
937 |
if (wpvr_isMobileDevice()) {
|
938 |
+
$html .= '<div class="cardboard-vrfullwidth vrfullwidth">';
|
939 |
+
$html .= '<div id="pano2' . $id . '" class="pano-wrap pano-left cardboard-half" style="width: 49%!important; border-radius:' . $radius . ' ;text-align:center; direction:ltr;" ><div id="center-pointer2' . $id . '" class="vr-pointer-container"><span class="center-pointer"></span></div></div>';
|
940 |
+
$html .= '<div id="pano' . $id . '" class="pano-wrap pano-right" style="width: 100%; text-align:center; direction:ltr; border-radius:' . $radius . '" >';
|
941 |
} else {
|
942 |
+
$html .= '<div id="pano2' . $id . '" class="pano-wrap pano-left" style="width: 49%; border-radius:' . $radius . ';"><div id="center-pointer2' . $id . '" class="vr-pointer-container"><span class="center-pointer"></span></div></div>';
|
943 |
$html .= '<div id="pano' . $id . '" class="pano-wrap vrfullwidth" style=" text-align:center; height: ' . $height . 'px; border-radius:' . $radius . '; direction:ltr;" >';
|
944 |
}
|
945 |
} else {
|
946 |
if (wpvr_isMobileDevice()) {
|
947 |
+
$html .= '<div id="pano2' . $id . '" class="pano-wrap pano-left cardboard-half" style="width: 49%; border-radius:' . $radius . ';">
|
948 |
+
<div id="center-pointer2' . $id . '" class="vr-pointer-container">
|
949 |
+
<span class="center-pointer"></span>
|
950 |
+
</div>
|
951 |
+
</div>';
|
952 |
+
|
953 |
+
$html .= '<div id="pano' . $id . '" class="pano-wrap pano-right" style=" width: 100%; border-radius:' . $radius . ';">';
|
954 |
} else {
|
955 |
+
|
956 |
+
$html .= '<div id="pano2' . $id . '" class="pano-wrap pano-left" style="width: 49%; border-radius:' . $radius . ';"><div id="center-pointer2' . $id . '" class="vr-pointer-container"><span class="center-pointer"></span></div></div>';
|
957 |
+
|
958 |
+
$html .= '<div id="pano' . $id . '" class="pano-wrap pano-right" style="width: 100%; border-radius:' . $radius . ';">';
|
959 |
+
|
960 |
}
|
961 |
}
|
962 |
+
// Vr mode transction scene to scene
|
963 |
+
if ($status !== false && 'valid' == $status && $is_pro) {
|
964 |
+
$html .= '<div id="center-pointer' . $id . '" class="vr-pointer-container" style="display:none"><span class="center-pointer"></span></div>';
|
965 |
+
}
|
966 |
+
|
967 |
|
968 |
//===company logo===//
|
969 |
if (isset($postdata['cpLogoSwitch'])) {
|
1196 |
$html .= '</div>';
|
1197 |
$html .= '</div>';
|
1198 |
$html .= '</div>';
|
1199 |
+
$html .= '</div>';
|
1200 |
+
if( "fullwidth" == $width ){
|
1201 |
+
$html .= '</div>';
|
1202 |
+
}
|
1203 |
|
1204 |
//script started
|
1205 |
|
1206 |
$html .= '<script>';
|
1207 |
+
|
1208 |
+
|
1209 |
+
|
1210 |
if (isset($postdata['bg_music'])) {
|
1211 |
if ($bg_music == 'on') {
|
1212 |
$html .= '
|
1275 |
$html .= '}';
|
1276 |
$html .= 'var panoshow' . $id . ' = pannellum.viewer(response[0]["panoid"], scenes);';
|
1277 |
|
1278 |
+
|
1279 |
+
//===Dplicate mode only for vr mode===//
|
1280 |
+
$html .= 'var response_duplicate = ' . $response . ';';
|
1281 |
+
$html .= 'var scenes_duplicate = response_duplicate[1];';
|
1282 |
+
|
1283 |
+
$html .= 'if(scenes_duplicate) {';
|
1284 |
+
$html .= 'var scenedata = scenes_duplicate.scenes;';
|
1285 |
+
$html .= 'for(var i in scenedata) {';
|
1286 |
+
$html .= 'var scenehotspot = scenedata[i].hotSpots;';
|
1287 |
+
$html .= 'for(var i = 0; i < scenehotspot.length; i++) {';
|
1288 |
+
$html .= 'if(scenehotspot[i]["clickHandlerArgs"] != "") {';
|
1289 |
+
$html .= 'scenehotspot[i]["clickHandlerFunc"] = wpvrhotspot;';
|
1290 |
+
$html .= '}';
|
1291 |
+
if (wpvr_isMobileDevice() && get_option('dis_on_hover') == "true") {
|
1292 |
+
} else {
|
1293 |
+
$html .= 'if(scenehotspot[i]["createTooltipArgs"] != "") {';
|
1294 |
+
$html .= 'scenehotspot[i]["createTooltipFunc"] = wpvrtooltip;';
|
1295 |
+
$html .= '}';
|
1296 |
+
}
|
1297 |
+
$html .= '}';
|
1298 |
+
$html .= '}';
|
1299 |
+
$html .= '}';
|
1300 |
+
|
1301 |
+
$status = get_option('wpvr_edd_license_status');
|
1302 |
+
if ($status !== false && 'valid' == $status && $is_pro) {
|
1303 |
+
$html .= 'var panoshow2' . $id . ' = pannellum.viewer("pano2' . $id . '", scenes_duplicate);';
|
1304 |
+
|
1305 |
+
// Show Cardboard Mode in Tour
|
1306 |
+
$html .= '
|
1307 |
+
var tim;
|
1308 |
+
var im = 0;
|
1309 |
+
var active_scene = "'.$default_scene.'";
|
1310 |
+
var c_time;
|
1311 |
+
c_time = new Date();
|
1312 |
+
var timer = c_time.getTime() + 2000;
|
1313 |
+
function panoShowCardBoardOnTrigger(data){
|
1314 |
+
if(scenes_duplicate) {
|
1315 |
+
var scenedata = scenes_duplicate.scenes;
|
1316 |
+
for(var i in scenedata) {
|
1317 |
+
if(active_scene === i) {
|
1318 |
+
var scenehotspot = scenedata[i].hotSpots;
|
1319 |
+
for(var j in scenehotspot) {
|
1320 |
+
var plusFiveYaw = Math.round(scenehotspot[j].yaw) + 5;
|
1321 |
+
var minusFiveYaw = Math.round(scenehotspot[j].yaw) - 5;
|
1322 |
+
var plusFivePitch = Math.round(scenehotspot[j].pitch) + 5;
|
1323 |
+
var minusFivePitch = Math.round(scenehotspot[j].pitch) - 5;
|
1324 |
+
var firstCondition = ( Math.round(data.pitch) > minusFivePitch) && (Math.round(data.pitch) < plusFivePitch) ;
|
1325 |
+
var secCondition = (Math.round(data.yaw) > minusFiveYaw) && (Math.round(data.yaw) < plusFiveYaw);
|
1326 |
+
if(( Math.round(data.pitch) > minusFivePitch) && (Math.round(data.pitch) < plusFivePitch) ){
|
1327 |
+
if((Math.round(data.yaw) > minusFiveYaw) && (Math.round(data.yaw) < plusFiveYaw)){
|
1328 |
+
jQuery(".center-pointer").addClass("wpvr-pluse-effect")
|
1329 |
+
var getScene = scenehotspot[j].sceneId;
|
1330 |
+
if(scenehotspot[j].type == "scene"){
|
1331 |
+
panoshow' . $id . '.loadScene(getScene);
|
1332 |
+
panoshow2' . $id . '.loadScene(getScene);
|
1333 |
+
// var inside_current_time_object = new Date();
|
1334 |
+
// var inside_timer = inside_current_time_object.getTime();
|
1335 |
+
// if(inside_timer > timer) {
|
1336 |
+
// panoshow' . $id . '.loadScene(getScene);
|
1337 |
+
// panoshow2' . $id . '.loadScene(getScene);
|
1338 |
+
// jQuery(".center-pointer").removeClass("wpvr-pluse-effect")
|
1339 |
+
// }
|
1340 |
+
}else{
|
1341 |
+
jQuery(".center-pointer").removeClass("wpvr-pluse-effect")
|
1342 |
+
}
|
1343 |
+
}
|
1344 |
+
else {
|
1345 |
+
jQuery(".center-pointer").removeClass("wpvr-pluse-effect")
|
1346 |
+
c_time = new Date();
|
1347 |
+
timer = c_time.getTime() + 2000;
|
1348 |
+
}
|
1349 |
+
}
|
1350 |
+
else {
|
1351 |
+
c_time = new Date();
|
1352 |
+
timer = c_time.getTime() + 2000;
|
1353 |
+
}
|
1354 |
+
}
|
1355 |
+
}
|
1356 |
+
}
|
1357 |
+
}
|
1358 |
+
};
|
1359 |
+
';
|
1360 |
+
$html .= '
|
1361 |
+
|
1362 |
+
function requestFullScreen(){
|
1363 |
+
var elem = document.getElementById("master-container");
|
1364 |
+
if (elem.requestFullscreen) {
|
1365 |
+
elem.requestFullscreen();
|
1366 |
+
} else if (elem.webkitRequestFullscreen) { /* Safari */
|
1367 |
+
elem.webkitRequestFullscreen();
|
1368 |
+
} else if (elem.msRequestFullscreen) { /* IE11 */
|
1369 |
+
elem.msRequestFullscreen();
|
1370 |
+
}
|
1371 |
+
}
|
1372 |
+
function requestExitFullscreen(){
|
1373 |
+
var elem = document.getElementById("master-container");
|
1374 |
+
if (document.exitFullscreen) {
|
1375 |
+
document.exitFullscreen();
|
1376 |
+
} else if (document.webkitExitFullscreen) { /* Safari */
|
1377 |
+
document.webkitExitFullscreen();
|
1378 |
+
} else if (document.msExitFullscreen) { /* IE11 */
|
1379 |
+
document.msExitFullscreen();
|
1380 |
+
}
|
1381 |
+
}
|
1382 |
+
jQuery(document).on("click",".fullscreen-button .expand",function() {
|
1383 |
+
jQuery(this).hide()
|
1384 |
+
jQuery(this).parent().find(".compress").show()
|
1385 |
+
requestFullScreen()
|
1386 |
+
screen.orientation.lock("landscape-primary")
|
1387 |
+
.then(function() {
|
1388 |
+
})
|
1389 |
+
.catch(function(error) {
|
1390 |
+
alert("Not Supported for this devise");
|
1391 |
+
});
|
1392 |
+
|
1393 |
+
});
|
1394 |
+
jQuery(document).on("click",".fullscreen-button .compress",function() {
|
1395 |
+
jQuery(this).hide()
|
1396 |
+
jQuery(this).parent().find(".expand").show()
|
1397 |
+
requestExitFullscreen()
|
1398 |
+
screen.orientation.unlock();
|
1399 |
+
|
1400 |
+
});
|
1401 |
+
';
|
1402 |
+
|
1403 |
+
$html .= '
|
1404 |
+
panoshow' . $id . '.on("scenechange", function (scene){
|
1405 |
+
jQuery(".center-pointer").removeClass("wpvr-pluse-effect")
|
1406 |
+
active_scene = scene;
|
1407 |
+
});
|
1408 |
+
var compassBlock = "";
|
1409 |
+
var infoBlock = "";
|
1410 |
+
var getValue = "";
|
1411 |
+
jQuery(document).on("click",".vr_mode_change' . $id . '",function (){
|
1412 |
+
getValue = jQuery(this).val();
|
1413 |
+
var getParent = jQuery(this).parent().parent();
|
1414 |
+
var fullWidthParent = getParent.parent();
|
1415 |
+
var compass = getParent.find("#pano2' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").css("display");
|
1416 |
+
var panoInfo = getParent.find("#pano' . $id . ' .pnlm-panorama-info").css("display");
|
1417 |
+
if(compass == "block"){
|
1418 |
+
compassBlock = "block";
|
1419 |
+
}
|
1420 |
+
if(panoInfo == "block"){
|
1421 |
+
infoBlock = "block";
|
1422 |
+
}
|
1423 |
+
|
1424 |
+
if (getValue == "off") {
|
1425 |
+
requestFullScreen()
|
1426 |
+
screen.orientation.lock("landscape-primary")
|
1427 |
+
.then(function() {
|
1428 |
+
})
|
1429 |
+
.catch(function(error) {
|
1430 |
+
alert("VR Glass Mode not supported in this device");
|
1431 |
+
});
|
1432 |
+
|
1433 |
+
localStorage.setItem("vr_mode", "on");
|
1434 |
+
localStorage.setItem("vr_mode_compass", "off");
|
1435 |
+
localStorage.setItem("vr_mode_pano_info", "off");
|
1436 |
+
jQuery(".vr-mode-title").show();
|
1437 |
+
jQuery(this).val("on");
|
1438 |
+
getParent.find("#pano2' . $id . '").css({
|
1439 |
+
"opacity": "1",
|
1440 |
+
"visibility": "visible",
|
1441 |
+
"position": "relative",
|
1442 |
+
});
|
1443 |
+
panoshow' . $id . '.startOrientation();
|
1444 |
+
panoshow2' . $id . '.startOrientation();
|
1445 |
+
getParent.find("#pano' .$id. ' #zoom-in-out-controls'.$id.'").hide();
|
1446 |
+
getParent.find("#pano' .$id. ' #controls'.$id.'").hide();
|
1447 |
+
getParent.find("#pano' .$id. ' #explainer_button_'.$id.'").hide();
|
1448 |
+
getParent.find("#pano' .$id. ' #vrgcontrols'.$id.'").hide();
|
1449 |
+
getParent.find("#pano' .$id. ' #sccontrols'.$id.'").hide();
|
1450 |
+
getParent.find("#pano' .$id. ' #adcontrol'.$id.'").hide();
|
1451 |
+
getParent.find("#pano' .$id. ' .owl-nav.wpvr_slider_nav").hide();
|
1452 |
+
getParent.find("#pano' .$id. ' #cp-logo-controls").hide();
|
1453 |
+
|
1454 |
+
getParent.find("#pano2' . $id . ' .pnlm-controls-container").hide();
|
1455 |
+
getParent.find("#pano' . $id . ' .pnlm-controls-container").hide();
|
1456 |
+
|
1457 |
+
getParent.find("#pano2' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").hide();
|
1458 |
+
getParent.find("#pano' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").hide();
|
1459 |
+
|
1460 |
+
getParent.find("#pano2' . $id . ' .pnlm-panorama-info").hide();
|
1461 |
+
getParent.find("#pano' . $id . ' .pnlm-panorama-info").hide();
|
1462 |
+
getParent.find("#pano' . $id . '").addClass("cardboard-half");
|
1463 |
+
|
1464 |
+
getParent.find("#center-pointer' . $id . '").show();
|
1465 |
+
getParent.find(".fullscreen-button").hide();
|
1466 |
+
|
1467 |
+
|
1468 |
+
if (window.DeviceOrientationEvent) {
|
1469 |
+
window.addEventListener("deviceorientation", function () {
|
1470 |
+
var data = {
|
1471 |
+
pitch: panoshow' . $id . '.getPitch(),
|
1472 |
+
yaw: panoshow' . $id . '.getYaw(),
|
1473 |
+
};
|
1474 |
+
panoShowCardBoardOnTrigger(data);
|
1475 |
+
});
|
1476 |
+
}
|
1477 |
+
|
1478 |
+
jQuery(document).on("click","#pano2' . $id . '",function(event) {
|
1479 |
+
panoshow' . $id . '.startOrientation();
|
1480 |
+
panoshow2' . $id . '.startOrientation();
|
1481 |
+
|
1482 |
+
});
|
1483 |
+
|
1484 |
+
jQuery(document).on("click","#pano' . $id . '",function(event) {
|
1485 |
+
panoshow' . $id . '.startOrientation();
|
1486 |
+
panoshow2' . $id . '.startOrientation();
|
1487 |
+
});
|
1488 |
+
|
1489 |
+
panoshow' . $id . '.on("mousemove", function (data){
|
1490 |
+
panoshow2' . $id . '.setPitch(data.pitch, 0);
|
1491 |
+
panoshow2' . $id . '.setYaw(data.yaw, 0);
|
1492 |
+
panoShowCardBoardOnTrigger(data);
|
1493 |
+
|
1494 |
+
});
|
1495 |
+
panoshow2' . $id . '.on("mousemove", function (data){
|
1496 |
+
panoshow2' . $id . '.setPitch(data.pitch, 0);
|
1497 |
+
panoshow' . $id . '.setYaw(data.yaw, 0);
|
1498 |
+
panoShowCardBoardOnTrigger(data);
|
1499 |
+
|
1500 |
+
});
|
1501 |
+
|
1502 |
+
panoshow' . $id . '.on("zoomchange", function (data){
|
1503 |
+
panoshow2' . $id . '.setHfov(data, 0);
|
1504 |
+
});
|
1505 |
+
|
1506 |
+
panoshow2' . $id . '.on("zoomchange", function (data){
|
1507 |
+
panoshow' . $id . '.setHfov(data, 0);
|
1508 |
+
});
|
1509 |
+
|
1510 |
+
panoshow' . $id . '.on("touchmove", function (data){
|
1511 |
+
panoshow' . $id . '.stopOrientation();
|
1512 |
+
panoshow2' . $id . '.stopOrientation();
|
1513 |
+
panoshow2' . $id . '.setPitch(data.pitch, 0);
|
1514 |
+
panoshow2' . $id . '.setYaw(data.yaw, 0);
|
1515 |
+
panoShowCardBoardOnTrigger(data);
|
1516 |
+
|
1517 |
+
});
|
1518 |
+
|
1519 |
+
panoshow2' . $id . '.on("touchmove", function (data){
|
1520 |
+
panoshow' . $id . '.stopOrientation();
|
1521 |
+
panoshow2' . $id . '.stopOrientation();
|
1522 |
+
panoshow' . $id . '.setPitch(data.pitch, 0);
|
1523 |
+
panoshow' . $id . '.setYaw(data.yaw, 0);
|
1524 |
+
panoShowCardBoardOnTrigger(data);
|
1525 |
+
|
1526 |
+
});
|
1527 |
+
|
1528 |
+
}
|
1529 |
+
else if(getValue == "on") {
|
1530 |
+
screen.orientation.unlock();
|
1531 |
+
requestExitFullscreen();
|
1532 |
+
localStorage.setItem("vr_mode", "off");
|
1533 |
+
localStorage.setItem("vr_mode_compass", "on");
|
1534 |
+
localStorage.setItem("vr_mode_pano_info", "on");
|
1535 |
+
jQuery(".vr-mode-title").hide();
|
1536 |
+
jQuery(this).val("off");
|
1537 |
+
getParent.find("#pano2' . $id . '").css({
|
1538 |
+
"opacity": "0",
|
1539 |
+
"visibility": "hidden",
|
1540 |
+
"position": "absolute",
|
1541 |
+
});
|
1542 |
+
getParent.find("#pano' .$id. ' #zoom-in-out-controls'.$id.'").show();
|
1543 |
+
getParent.find("#pano' .$id. ' #controls'.$id.'").show();
|
1544 |
+
getParent.find("#pano' .$id. ' #explainer_button_'.$id.'").show();
|
1545 |
+
|
1546 |
+
getParent.find("#pano2' . $id . ' .pnlm-controls-container").show();
|
1547 |
+
getParent.find("#pano' . $id . ' .pnlm-controls-container").show();
|
1548 |
+
getParent.find("#pano' .$id. ' #vrgcontrols'.$id.'").show();
|
1549 |
+
getParent.find("#pano' .$id. ' #sccontrols'.$id.'").hide();
|
1550 |
+
getParent.find("#pano' .$id. ' #adcontrol'.$id.'").show();
|
1551 |
+
getParent.find("#pano' .$id. ' .owl-nav.wpvr_slider_nav").hide();
|
1552 |
+
getParent.find("#pano' .$id. ' #cp-logo-controls").show();
|
1553 |
+
|
1554 |
+
if(compassBlock == "block"){
|
1555 |
+
getParent.find("#pano2' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").show();
|
1556 |
+
getParent.find("#pano' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").show();
|
1557 |
+
}
|
1558 |
+
if(infoBlock == "block"){
|
1559 |
+
getParent.find("#pano2' . $id . ' .pnlm-panorama-info").show();
|
1560 |
+
getParent.find("#pano' . $id . ' .pnlm-panorama-info").show();
|
1561 |
+
}
|
1562 |
+
|
1563 |
+
getParent.find("#pano' . $id . '").removeClass("cardboard-half");
|
1564 |
+
getParent.find("#center-pointer' . $id . '").hide();
|
1565 |
+
getParent.find(".fullscreen-button").hide();
|
1566 |
+
panoshow' . $id . '.off("mousemove");
|
1567 |
+
panoshow2' . $id . '.off("mousemove");
|
1568 |
+
}
|
1569 |
+
});';
|
1570 |
+
|
1571 |
+
$html .= 'panoshow2' . $id . '.on("load", function (){
|
1572 |
+
if(localStorage.getItem("vr_mode") == "off") {
|
1573 |
+
jQuery(".vr-mode-title").hide();
|
1574 |
+
}
|
1575 |
+
else {
|
1576 |
+
jQuery("#pano2' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").css("display","none");
|
1577 |
+
jQuery("#pano' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").css("display","none");
|
1578 |
+
jQuery("#pano2' . $id . ' .pnlm-panorama-info").hide();
|
1579 |
+
jQuery("#pano' . $id . ' .pnlm-panorama-info").hide();
|
1580 |
+
jQuery(".vr-mode-title").show();
|
1581 |
+
}
|
1582 |
+
});';
|
1583 |
+
}
|
1584 |
+
|
1585 |
+
|
1586 |
+
|
1587 |
+
//Duplicate mode only for vr mode end===//
|
1588 |
$html .= 'panoshow' . $id . '.on("load", function (){
|
1589 |
+
|
1590 |
+
if(localStorage.getItem("vr_mode") == "off") {
|
1591 |
+
jQuery(".vr-mode-title").hide();
|
1592 |
+
}
|
1593 |
+
else {
|
1594 |
+
jQuery("#pano2' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").css("display","none");
|
1595 |
+
jQuery("#pano' . $id . ' .pnlm-compass.pnlm-controls.pnlm-control").css("display","none");
|
1596 |
+
jQuery("#pano2' . $id . ' .pnlm-panorama-info").hide();
|
1597 |
+
jQuery("#pano' . $id . ' .pnlm-panorama-info").hide();
|
1598 |
+
jQuery(".vr-mode-title").show();
|
1599 |
+
}
|
1600 |
+
|
1601 |
+
|
1602 |
if (jQuery("#pano' . $id . '").children().children(".pnlm-panorama-info:visible").length > 0) {
|
1603 |
jQuery("#controls' . $id . '").css("bottom", "55px");
|
1604 |
}
|
1646 |
}
|
1647 |
}
|
1648 |
|
1649 |
+
|
1650 |
+
|
1651 |
//===Custom Control===//
|
1652 |
if (isset($custom_control)) {
|
1653 |
if ($custom_control['panupSwitch'] == "on") {
|
1857 |
jQuery("#pano' . $id . '").find(".pnlm-panorama-info").show();
|
1858 |
});';
|
1859 |
}
|
1860 |
+
|
1861 |
+
|
1862 |
if (isset($postdata['previewtext'])) {
|
1863 |
$html .= '
|
1864 |
jQuery("#pano' . $id . '").children(".pnlm-ui").find(".pnlm-load-button p").text("' . $postdata['previewtext'] . '")
|
1869 |
';
|
1870 |
}
|
1871 |
$html .= '});';
|
1872 |
+
|
1873 |
$html .= '</script>';
|
1874 |
//script end
|
1875 |
return $html;
|
2166 |
}
|
2167 |
);
|
2168 |
|
2169 |
+
function wpvr_redirect_after_activation($plugin)
|
2170 |
+
{
|
2171 |
+
if ($plugin == plugin_basename(__FILE__)) {
|
2172 |
+
$url = admin_url('admin.php?page=wpvr-setup-wizard');
|
2173 |
+
$url = esc_url($url, FILTER_SANITIZE_URL);
|
2174 |
+
exit(wp_safe_redirect($url));
|
2175 |
}
|
2176 |
}
|
2177 |
+
add_action('activated_plugin', 'wpvr_redirect_after_activation');
|