Version Description
(09-09-2020) = * Preview gallery modified * Mobile media resizer modified * Video tab bug fixed * Allow url open auto handled
=
Download this release
Release Info
Developer | rextheme |
Plugin | WP VR – 360 Panorama and virtual tour creator for WordPress |
Version | 6.6.0 |
Comparing to | |
See all releases |
Code changes from version 6.5.0 to 6.6.0
- README.txt +8 -2
- admin/css/wpvr-admin.css +44 -8
- admin/js/wpvr-admin.js +37 -2
- admin/js/wpvr-global.js +0 -11
- admin/partials/wpvr-meta-box-builder-display.php +1 -1
- public/class-wpvr-public.php +53 -56
- public/css/wpvr-public.css +0 -1
- public/lib/pannellum/src/js/libpannellum.js +2 -0
- wpvr.php +33 -36
README.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: rextheme, coderexco
|
|
3 |
Donate link: https://rextheme.com/wp-vr-360-panorama-and-virtual-tour-creator-for-wordpress/
|
4 |
Tags: virtual tour, real estate tour, panorama, panorama viewer, virtual tour, 360 panorama, interactive tour
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 5.5.
|
7 |
-
Stable tag: 6.
|
8 |
Requires PHP: 7.0.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -438,5 +438,11 @@ Simply add "/plugins/wpvr" to exclusion field (or use the location where you sto
|
|
438 |
* Empty needle warning fixed
|
439 |
* Appsero updated
|
440 |
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
== Upgrade Notice ==
|
442 |
Please do update the WP VR to the latest version. Each update makes it sure your plugin is supporting all tour features.
|
3 |
Donate link: https://rextheme.com/wp-vr-360-panorama-and-virtual-tour-creator-for-wordpress/
|
4 |
Tags: virtual tour, real estate tour, panorama, panorama viewer, virtual tour, 360 panorama, interactive tour
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 5.5.1
|
7 |
+
Stable tag: 6.6.0
|
8 |
Requires PHP: 7.0.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
438 |
* Empty needle warning fixed
|
439 |
* Appsero updated
|
440 |
|
441 |
+
= 6.6.0 (09-09-2020) =
|
442 |
+
* Preview gallery modified
|
443 |
+
* Mobile media resizer modified
|
444 |
+
* Video tab bug fixed
|
445 |
+
* Allow url open auto handled
|
446 |
+
|
447 |
== Upgrade Notice ==
|
448 |
Please do update the WP VR to the latest version. Each update makes it sure your plugin is supporting all tour features.
|
admin/css/wpvr-admin.css
CHANGED
@@ -3,9 +3,7 @@
|
|
3 |
* included in this file.
|
4 |
*/
|
5 |
|
6 |
-
|
7 |
-
display: none;
|
8 |
-
} */
|
9 |
.wpvr_gt_settings_ruler {
|
10 |
content: "";
|
11 |
display: block;
|
@@ -166,15 +164,53 @@
|
|
166 |
background: url('../images/icon.png') no-repeat center center / 100% 100%;
|
167 |
}
|
168 |
.scene-gallery {
|
169 |
-
border-radius:
|
170 |
-
max-width:
|
171 |
margin: 0 auto;
|
|
|
172 |
color: #32373c;
|
173 |
background-color: #eceef1;
|
|
|
174 |
}
|
175 |
.scene-gallery ul {
|
176 |
display: inline-grid;
|
177 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
|
179 |
.scctrl {
|
180 |
border-radius: 5px;
|
@@ -182,11 +218,11 @@
|
|
182 |
height: 100px;
|
183 |
display: inline-block;
|
184 |
cursor: pointer;
|
185 |
-
margin: 5px;
|
186 |
}
|
187 |
.scctrl:hover {
|
188 |
background: rgba(200, 200, 200, 1);
|
189 |
-
|
|
|
190 |
.vr-export {
|
191 |
color: #fff!important;
|
192 |
background-color: #2196F3!important;
|
@@ -673,7 +709,7 @@ div.custom-tooltip:hover span:after {
|
|
673 |
display: block !important;
|
674 |
}
|
675 |
|
676 |
-
.rex-pano-sub-tabs .rex-pano-tab.clearfix,
|
677 |
.rex-pano-tabs .rex-pano-tab.clearfix {
|
678 |
overflow: initial;
|
679 |
}
|
3 |
* included in this file.
|
4 |
*/
|
5 |
|
6 |
+
|
|
|
|
|
7 |
.wpvr_gt_settings_ruler {
|
8 |
content: "";
|
9 |
display: block;
|
164 |
background: url('../images/icon.png') no-repeat center center / 100% 100%;
|
165 |
}
|
166 |
.scene-gallery {
|
167 |
+
border-radius: 6px;
|
168 |
+
max-width: 626px;
|
169 |
margin: 0 auto;
|
170 |
+
padding: 0 10px;
|
171 |
color: #32373c;
|
172 |
background-color: #eceef1;
|
173 |
+
box-sizing: border-box;
|
174 |
}
|
175 |
.scene-gallery ul {
|
176 |
display: inline-grid;
|
177 |
}
|
178 |
+
.scene-gallery ul li {
|
179 |
+
text-transform: capitalize;
|
180 |
+
font-weight: 500;
|
181 |
+
position: relative;
|
182 |
+
word-break: break-word;
|
183 |
+
}
|
184 |
+
.scene-gallery ul li.owlscene {
|
185 |
+
margin-bottom: 5px;
|
186 |
+
}
|
187 |
+
.scene-gallery .marked .owlscene {
|
188 |
+
color: #004efa;
|
189 |
+
}
|
190 |
+
|
191 |
+
.scene-gallery ul li img {
|
192 |
+
filter: blur(0.5px) brightness(0.5);
|
193 |
+
-webkit-filter: blur(0.5px) brightness(0.5);
|
194 |
+
}
|
195 |
+
.scene-gallery .marked ul li img {
|
196 |
+
filter: blur(0) brightness(1);
|
197 |
+
-webkit-filter: blur(0) brightness(1);
|
198 |
+
}
|
199 |
+
|
200 |
+
/* .scene-gallery ul li:not(.owlscene):before {
|
201 |
+
content: "";
|
202 |
+
position: absolute;
|
203 |
+
left: 0;
|
204 |
+
bottom: 0;
|
205 |
+
width: 100%;
|
206 |
+
height: 100%;
|
207 |
+
background: rgba(51, 51, 51, 0.7);
|
208 |
+
border-radius: 5px;
|
209 |
+
transition: all 0.3s ease;
|
210 |
+
}
|
211 |
+
.scene-gallery .marked ul li:not(.owlscene):before {
|
212 |
+
background: transparent;
|
213 |
+
} */
|
214 |
|
215 |
.scctrl {
|
216 |
border-radius: 5px;
|
218 |
height: 100px;
|
219 |
display: inline-block;
|
220 |
cursor: pointer;
|
|
|
221 |
}
|
222 |
.scctrl:hover {
|
223 |
background: rgba(200, 200, 200, 1);
|
224 |
+
}
|
225 |
+
|
226 |
.vr-export {
|
227 |
color: #fff!important;
|
228 |
background-color: #2196F3!important;
|
709 |
display: block !important;
|
710 |
}
|
711 |
|
712 |
+
.rex-pano-sub-tabs .rex-pano-tab.clearfix,
|
713 |
.rex-pano-tabs .rex-pano-tab.clearfix {
|
714 |
overflow: initial;
|
715 |
}
|
admin/js/wpvr-admin.js
CHANGED
@@ -37,6 +37,8 @@
|
|
37 |
autoWidth: true,
|
38 |
});
|
39 |
|
|
|
|
|
40 |
|
41 |
$('.meta-box-sortables').sortable({
|
42 |
items: '#wpvr_item_builder_box',
|
@@ -46,7 +48,6 @@
|
|
46 |
$('.postbox .hndle').css('cursor', 'pointer');
|
47 |
});
|
48 |
|
49 |
-
|
50 |
$(document).on("change", "input.vr-switcher-check", function(event) {
|
51 |
if (this.checked) {
|
52 |
$(this).val('on');
|
@@ -55,6 +56,16 @@
|
|
55 |
}
|
56 |
});
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
jQuery(document).ready(function($) {
|
59 |
|
60 |
|
@@ -122,8 +133,15 @@
|
|
122 |
$('.scene-gallery').trigger('destroy.owl.carousel');
|
123 |
$('.scene-gallery').empty();
|
124 |
$.each(scenes.scenes, function(key, val) {
|
125 |
-
$('.scene-gallery').append('<ul style="width:150px;"><li>' + key + '</li><li title="Double click to view scene"><img class="scctrl" id="' + key + '_gallery" src="' + val.panorama + '"></li></ul>');
|
126 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
var panoshow = pannellum.viewer(response.data[0]["panoid"], scenes);
|
129 |
if (scenes.autoRotate) {
|
@@ -699,6 +717,23 @@
|
|
699 |
getparent.find('.hotspot-url').hide();
|
700 |
getparent.find('.hotspot-content').hide();
|
701 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
702 |
});
|
703 |
|
704 |
jQuery(document).ready(function($) {
|
37 |
autoWidth: true,
|
38 |
});
|
39 |
|
40 |
+
var primary_markng = $('#scene-1').find('input.sceneid').val();
|
41 |
+
$('.owl'+primary_markng).parents('.owl-item').addClass('marked');
|
42 |
|
43 |
$('.meta-box-sortables').sortable({
|
44 |
items: '#wpvr_item_builder_box',
|
48 |
$('.postbox .hndle').css('cursor', 'pointer');
|
49 |
});
|
50 |
|
|
|
51 |
$(document).on("change", "input.vr-switcher-check", function(event) {
|
52 |
if (this.checked) {
|
53 |
$(this).val('on');
|
56 |
}
|
57 |
});
|
58 |
|
59 |
+
|
60 |
+
$(document).on("click", ".scene-nav ul li span", function(event) {
|
61 |
+
$('.owl-item').removeClass('marked');
|
62 |
+
var target = $(this).attr("data-index");
|
63 |
+
var data = $('#scene-'+target).find('input.sceneid').val();
|
64 |
+
if (data) {
|
65 |
+
$('.owl'+data).parents('.owl-item').addClass('marked');
|
66 |
+
}
|
67 |
+
});
|
68 |
+
|
69 |
jQuery(document).ready(function($) {
|
70 |
|
71 |
|
133 |
$('.scene-gallery').trigger('destroy.owl.carousel');
|
134 |
$('.scene-gallery').empty();
|
135 |
$.each(scenes.scenes, function(key, val) {
|
136 |
+
$('.scene-gallery').append('<ul style="width:150px;"><li class="owlscene owl'+key+'">' + key + '</li><li title="Double click to view scene"><img class="scctrl" id="' + key + '_gallery" src="' + val.panorama + '"></li></ul>');
|
137 |
});
|
138 |
+
$(".vrowl-carousel").owlCarousel({
|
139 |
+
margin: 10,
|
140 |
+
autoWidth: true,
|
141 |
+
});
|
142 |
+
var active_owl_target = $('#wpvr_active_scenes').val();
|
143 |
+
var get_owl_target = $('#scene-'+active_owl_target).find('input.sceneid').val();
|
144 |
+
$('.owl'+get_owl_target).parents('.owl-item').addClass('marked');
|
145 |
}
|
146 |
var panoshow = pannellum.viewer(response.data[0]["panoid"], scenes);
|
147 |
if (scenes.autoRotate) {
|
717 |
getparent.find('.hotspot-url').hide();
|
718 |
getparent.find('.hotspot-content').hide();
|
719 |
}
|
720 |
+
});
|
721 |
+
|
722 |
+
$(document).on("change", "input[type=radio][name=panovideo]", function(event) {
|
723 |
+
var getvalue = $(this).val();
|
724 |
+
if (getvalue == 'on') {
|
725 |
+
$(".video-setting").show();
|
726 |
+
$("li.general").hide();
|
727 |
+
$("li.scene").hide();
|
728 |
+
$("li.hotspot").hide();
|
729 |
+
$("li.streetview").hide();
|
730 |
+
} else {
|
731 |
+
$(".video-setting").hide();
|
732 |
+
$("li.general").show();
|
733 |
+
$("li.scene").show();
|
734 |
+
$("li.hotspot").show();
|
735 |
+
$("li.streetview").show();
|
736 |
+
}
|
737 |
});
|
738 |
|
739 |
jQuery(document).ready(function($) {
|
admin/js/wpvr-global.js
CHANGED
@@ -39,17 +39,6 @@
|
|
39 |
navText: ['Previous','Next'],
|
40 |
});
|
41 |
|
42 |
-
|
43 |
-
/*$(".choose-tour input[type='radio']").change(function(){
|
44 |
-
var val = $(this).val();
|
45 |
-
if($(this).is(":checked") ){
|
46 |
-
console.log(val);
|
47 |
-
$('#'+val).show();
|
48 |
-
}else{
|
49 |
-
$('#'+val).siblings().hide();
|
50 |
-
}
|
51 |
-
});*/
|
52 |
-
|
53 |
$(".choose-tour input[type='radio']").on('click', function(){
|
54 |
var val = $(this).val();
|
55 |
$('#'+val).show();
|
39 |
navText: ['Previous','Next'],
|
40 |
});
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
$(".choose-tour input[type='radio']").on('click', function(){
|
43 |
var val = $(this).val();
|
44 |
$('#'+val).show();
|
admin/partials/wpvr-meta-box-builder-display.php
CHANGED
@@ -480,7 +480,7 @@ var scenes = response[1];
|
|
480 |
if (scenes) {
|
481 |
jQuery('.scene-gallery').empty();
|
482 |
jQuery.each(scenes.scenes, function (key, val) {
|
483 |
-
jQuery('.scene-gallery').append('<ul style="width:150px;"><li>'+key+'</li><li title="Double click to view scene"><img class="scctrl" id="'+key+'_gallery" src="'+val.panorama+'"></li></ul>');
|
484 |
});
|
485 |
}
|
486 |
|
480 |
if (scenes) {
|
481 |
jQuery('.scene-gallery').empty();
|
482 |
jQuery.each(scenes.scenes, function (key, val) {
|
483 |
+
jQuery('.scene-gallery').append('<ul style="width:150px;"><li class="owlscene owl'+key+'">'+key+'</li><li title="Double click to view scene"><img class="scctrl" id="'+key+'_gallery" src="'+val.panorama+'"></li></ul>');
|
484 |
});
|
485 |
}
|
486 |
|
public/class-wpvr-public.php
CHANGED
@@ -238,7 +238,6 @@ class Wpvr_Public {
|
|
238 |
$html .= '</div>';
|
239 |
|
240 |
return $html;
|
241 |
-
|
242 |
}
|
243 |
|
244 |
if (isset($postdata['vidid'])) {
|
@@ -607,29 +606,41 @@ class Wpvr_Public {
|
|
607 |
}
|
608 |
|
609 |
$device_scene = $panoscenes['scene-attachment-url'];
|
610 |
-
$
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
621 |
}
|
622 |
}
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
}
|
631 |
}
|
632 |
-
|
633 |
}
|
634 |
|
635 |
$scene_info = array();
|
@@ -1202,50 +1213,36 @@ class Wpvr_Public {
|
|
1202 |
|
1203 |
if (!$autoload) {
|
1204 |
$html .= '
|
|
|
|
|
|
|
|
|
|
|
|
|
1205 |
|
1206 |
-
|
1207 |
-
jQuery("#controls'.$id.'").hide();
|
1208 |
-
jQuery("#zoom-in-out-controls'.$id.'").hide();
|
1209 |
-
jQuery("#adcontrol'.$id.'").hide();
|
1210 |
-
jQuery("#pano'.$id.'").find(".pnlm-panorama-info").hide();
|
1211 |
-
});
|
1212 |
-
|
1213 |
-
';
|
1214 |
|
1215 |
$html .= 'panoshow'.$id.'.on("load", function (){
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
}
|
1222 |
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
';
|
1234 |
|
1235 |
-
// $html .= '
|
1236 |
-
// jQuery(".elementor-tab-title").click(function(){
|
1237 |
-
// panoshow'.$id.'.destroy();
|
1238 |
-
// panoshow'.$id.' = pannellum.viewer(response[0]["panoid"], scenes);
|
1239 |
-
// panoshow'.$id.'.resize();
|
1240 |
-
// panoshow'.$id.'.loadScene("'.$default_scene.'");
|
1241 |
-
// jQuery(".pnlm-ui").empty();
|
1242 |
-
// jQuery("pnlm-render-container").empty();
|
1243 |
-
//
|
1244 |
-
// });
|
1245 |
-
// ';
|
1246 |
|
1247 |
$html .= '});';
|
1248 |
-
|
1249 |
$html .= '</script>';
|
1250 |
//script end
|
1251 |
|
238 |
$html .= '</div>';
|
239 |
|
240 |
return $html;
|
|
|
241 |
}
|
242 |
|
243 |
if (isset($postdata['vidid'])) {
|
606 |
}
|
607 |
|
608 |
$device_scene = $panoscenes['scene-attachment-url'];
|
609 |
+
$file_accessible = ini_get('allow_url_fopen');
|
610 |
+
if ($file_accessible == "1") {
|
611 |
+
$arrContextOptions=array(
|
612 |
+
"ssl"=>array(
|
613 |
+
"verify_peer"=>false,
|
614 |
+
"verify_peer_name"=>false,
|
615 |
+
),
|
616 |
+
);
|
617 |
+
$getfile = file_get_contents($device_scene, false, stream_context_create($arrContextOptions));
|
618 |
+
$image = imagecreatefromstring($getfile);
|
619 |
+
$w = imagesx($image);
|
620 |
+
// $image_info = getimagesize($device_scene);
|
621 |
+
// if ($image_info[0] > 4096) {
|
622 |
+
if ($w > 4096) {
|
623 |
+
$src_to_id_for_mobile = '';
|
624 |
+
$src_to_id_for_desktop = '';
|
625 |
+
if (wpvr_isMobileDevice()) {
|
626 |
+
$src_to_id_for_mobile = attachment_url_to_postid($panoscenes['scene-attachment-url']);
|
627 |
+
if ($src_to_id_for_mobile) {
|
628 |
+
$mobile_scene = wp_get_attachment_image_src($src_to_id_for_mobile, 'wpvr_mobile');
|
629 |
+
if ($mobile_scene[3]) {
|
630 |
+
$device_scene = $mobile_scene[0];
|
631 |
+
}
|
632 |
}
|
633 |
}
|
634 |
+
else {
|
635 |
+
$src_to_id_for_desktop = attachment_url_to_postid($panoscenes['scene-attachment-url']);
|
636 |
+
if ($src_to_id_for_desktop) {
|
637 |
+
$desktop_scene = wp_get_attachment_image_src($src_to_id_for_mobile, 'full');
|
638 |
+
if ($desktop_scene[0]) {
|
639 |
+
$device_scene = $desktop_scene[0];
|
640 |
+
}
|
641 |
}
|
642 |
}
|
643 |
+
}
|
644 |
}
|
645 |
|
646 |
$scene_info = array();
|
1213 |
|
1214 |
if (!$autoload) {
|
1215 |
$html .= '
|
1216 |
+
jQuery(document).ready(function(){
|
1217 |
+
jQuery("#controls'.$id.'").hide();
|
1218 |
+
jQuery("#zoom-in-out-controls'.$id.'").hide();
|
1219 |
+
jQuery("#adcontrol'.$id.'").hide();
|
1220 |
+
jQuery("#pano'.$id.'").find(".pnlm-panorama-info").hide();
|
1221 |
+
});
|
1222 |
|
1223 |
+
';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1224 |
|
1225 |
$html .= 'panoshow'.$id.'.on("load", function (){
|
1226 |
+
jQuery("#controls'.$id.'").show();
|
1227 |
+
jQuery("#zoom-in-out-controls'.$id.'").show();
|
1228 |
+
jQuery("#adcontrol'.$id.'").show();
|
1229 |
+
jQuery("#pano'.$id.'").find(".pnlm-panorama-info").show();
|
1230 |
+
});';
|
1231 |
}
|
1232 |
|
1233 |
+
$html .= '
|
1234 |
+
jQuery(".elementor-tab-title, .geodir-tab-head dd, #vr-tour-tab").click(function(){
|
1235 |
+
jQuery("#pano'.$id.'").children(".pnlm-render-container").remove();
|
1236 |
+
jQuery("#pano'.$id.'").children(".pnlm-ui").remove();
|
1237 |
+
panoshow'.$id.' = pannellum.viewer(response[0]["panoid"], scenes);
|
1238 |
+
setTimeout(function() {
|
1239 |
+
panoshow'.$id.'.loadScene("'.$default_scene.'");
|
1240 |
+
}, 2000);
|
1241 |
+
});
|
1242 |
+
';
|
|
|
1243 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1244 |
|
1245 |
$html .= '});';
|
|
|
1246 |
$html .= '</script>';
|
1247 |
//script end
|
1248 |
|
public/css/wpvr-public.css
CHANGED
@@ -660,7 +660,6 @@ div.custom-ifram {
|
|
660 |
}
|
661 |
|
662 |
|
663 |
-
|
664 |
/* ----woocommerce product---- */
|
665 |
.wpvr-product-container {
|
666 |
display: block;
|
660 |
}
|
661 |
|
662 |
|
|
|
663 |
/* ----woocommerce product---- */
|
664 |
.wpvr-product-container {
|
665 |
display: block;
|
public/lib/pannellum/src/js/libpannellum.js
CHANGED
@@ -439,6 +439,7 @@ function Renderer(container) {
|
|
439 |
cropCanvas.height = image.height;
|
440 |
var cropContext = cropCanvas.getContext('2d');
|
441 |
cropContext.drawImage(image, 0, 0);
|
|
|
442 |
|
443 |
// Upload first half of image to the texture
|
444 |
var cropImage = cropContext.getImageData(0, 0, image.width / 2, image.height);
|
@@ -547,6 +548,7 @@ function Renderer(container) {
|
|
547 |
var pixelRatio = window.devicePixelRatio || 1;
|
548 |
canvas.width = canvas.clientWidth * pixelRatio;
|
549 |
canvas.height = canvas.clientHeight * pixelRatio;
|
|
|
550 |
if (gl) {
|
551 |
if (gl.getError() == 1286)
|
552 |
handleWebGLError1286();
|
439 |
cropCanvas.height = image.height;
|
440 |
var cropContext = cropCanvas.getContext('2d');
|
441 |
cropContext.drawImage(image, 0, 0);
|
442 |
+
|
443 |
|
444 |
// Upload first half of image to the texture
|
445 |
var cropImage = cropContext.getImageData(0, 0, image.width / 2, image.height);
|
548 |
var pixelRatio = window.devicePixelRatio || 1;
|
549 |
canvas.width = canvas.clientWidth * pixelRatio;
|
550 |
canvas.height = canvas.clientHeight * pixelRatio;
|
551 |
+
|
552 |
if (gl) {
|
553 |
if (gl.getError() == 1286)
|
554 |
handleWebGLError1286();
|
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: 6.
|
20 |
* Author: Rextheme
|
21 |
* Author URI: http://rextheme.com/
|
22 |
* License: GPL-2.0+
|
@@ -195,6 +195,7 @@ function wpvr_block_render( $attributes ) {
|
|
195 |
$html .= '</div>';
|
196 |
|
197 |
|
|
|
198 |
return $html;
|
199 |
}
|
200 |
|
@@ -559,32 +560,43 @@ function wpvr_block_render( $attributes ) {
|
|
559 |
}
|
560 |
|
561 |
$device_scene = $panoscenes['scene-attachment-url'];
|
562 |
-
$
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
573 |
}
|
574 |
}
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
}
|
583 |
}
|
584 |
-
|
585 |
}
|
586 |
|
587 |
-
|
588 |
$scene_info = array();
|
589 |
$scene_info = array('type'=>$panoscenes['scene-type'],'panorama'=>$device_scene,"pitch"=>$default_scene_pitch,"maxPitch"=>$scene_max_pitch,"minPitch"=>$scene_min_pitch,"maxYaw"=>$scene_max_yaw,"minYaw"=>$scene_min_yaw,"yaw"=>$default_scene_yaw,"hfov"=>$default_zoom,"maxHfov"=>$max_zoom,"minHfov"=>$min_zoom,"title"=>$scene_ititle,"author"=>$scene_author, "authorURL"=>$scene_author_url, "vaov"=>$scene_vaov, "haov"=>$scene_haov, "vOffset"=>$scene_vertical_offset, 'hotSpots'=>$hotspots);
|
590 |
|
@@ -1422,18 +1434,3 @@ add_action( 'init', 'wpvr_mobile_media_handle' );
|
|
1422 |
function wpvr_mobile_media_handle() {
|
1423 |
add_image_size( 'wpvr_mobile', 4096, 2048 ); //mobile
|
1424 |
}
|
1425 |
-
|
1426 |
-
/**
|
1427 |
-
* Redirect to the edit.php on post save or publish.
|
1428 |
-
*/
|
1429 |
-
//function wpvr_active_tab_query_params( $location, $post_id ) {
|
1430 |
-
// if( isset( $_POST['post_type'] ) ) {
|
1431 |
-
//
|
1432 |
-
// error_log(print_r($_POST,1));
|
1433 |
-
// if($_POST['post_type'] === 'wpvr_item') {
|
1434 |
-
// return admin_url( "post.php?post=".$post_id."&action=edit&active_tab=".$_POST['wpvr_active_tab'].'&scene="'.$_POST['wpvr_active_scenes'].'&hotspot="'.$_POST['wpvr_active_hotspot'] );
|
1435 |
-
// }
|
1436 |
-
// }
|
1437 |
-
// return $location;
|
1438 |
-
//}
|
1439 |
-
//add_filter( 'redirect_post_location', 'wpvr_active_tab_query_params', 10, 2 );
|
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: 6.6.0
|
20 |
* Author: Rextheme
|
21 |
* Author URI: http://rextheme.com/
|
22 |
* License: GPL-2.0+
|
195 |
$html .= '</div>';
|
196 |
|
197 |
|
198 |
+
|
199 |
return $html;
|
200 |
}
|
201 |
|
560 |
}
|
561 |
|
562 |
$device_scene = $panoscenes['scene-attachment-url'];
|
563 |
+
$file_accessible = ini_get('allow_url_fopen');
|
564 |
+
if ($file_accessible == "1") {
|
565 |
+
$arrContextOptions=array(
|
566 |
+
"ssl"=>array(
|
567 |
+
"verify_peer"=>false,
|
568 |
+
"verify_peer_name"=>false,
|
569 |
+
),
|
570 |
+
);
|
571 |
+
$getfile = file_get_contents($device_scene, false, stream_context_create($arrContextOptions));
|
572 |
+
$image = imagecreatefromstring($getfile);
|
573 |
+
$w = imagesx($image);
|
574 |
+
// $image_info = getimagesize($device_scene);
|
575 |
+
// if ($image_info[0] > 4096) {
|
576 |
+
if ($w > 4096) {
|
577 |
+
$src_to_id_for_mobile = '';
|
578 |
+
$src_to_id_for_desktop = '';
|
579 |
+
if (wpvr_isMobileDevice()) {
|
580 |
+
$src_to_id_for_mobile = attachment_url_to_postid($panoscenes['scene-attachment-url']);
|
581 |
+
if ($src_to_id_for_mobile) {
|
582 |
+
$mobile_scene = wp_get_attachment_image_src($src_to_id_for_mobile, 'wpvr_mobile');
|
583 |
+
if ($mobile_scene[3]) {
|
584 |
+
$device_scene = $mobile_scene[0];
|
585 |
+
}
|
586 |
}
|
587 |
}
|
588 |
+
else {
|
589 |
+
$src_to_id_for_desktop = attachment_url_to_postid($panoscenes['scene-attachment-url']);
|
590 |
+
if ($src_to_id_for_desktop) {
|
591 |
+
$desktop_scene = wp_get_attachment_image_src($src_to_id_for_mobile, 'full');
|
592 |
+
if ($desktop_scene[0]) {
|
593 |
+
$device_scene = $desktop_scene[0];
|
594 |
+
}
|
595 |
}
|
596 |
}
|
597 |
+
}
|
598 |
}
|
599 |
|
|
|
600 |
$scene_info = array();
|
601 |
$scene_info = array('type'=>$panoscenes['scene-type'],'panorama'=>$device_scene,"pitch"=>$default_scene_pitch,"maxPitch"=>$scene_max_pitch,"minPitch"=>$scene_min_pitch,"maxYaw"=>$scene_max_yaw,"minYaw"=>$scene_min_yaw,"yaw"=>$default_scene_yaw,"hfov"=>$default_zoom,"maxHfov"=>$max_zoom,"minHfov"=>$min_zoom,"title"=>$scene_ititle,"author"=>$scene_author, "authorURL"=>$scene_author_url, "vaov"=>$scene_vaov, "haov"=>$scene_haov, "vOffset"=>$scene_vertical_offset, 'hotSpots'=>$hotspots);
|
602 |
|
1434 |
function wpvr_mobile_media_handle() {
|
1435 |
add_image_size( 'wpvr_mobile', 4096, 2048 ); //mobile
|
1436 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|