|
@@ -6609,7 +6609,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
}),
|
|
|
m(e, t),
|
|
|
A(e, t),
|
|
|
- e.data.enable_social_sharing && e.data.is_public && Q.share.enabled && (Ce.init(e.data.name),
|
|
|
+ e.data.enable_social_sharing && e.data.is_public && Q.share.enabled && (Ce.init(MP_PREFETCHED_MODELDATA.name/* e.data.name */),
|
|
|
Ce.on(Me.OPENED, function() {
|
|
|
var e = document.getElementById("share-modal");
|
|
|
return function() {
|
|
@@ -7194,7 +7194,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
});
|
|
|
|
|
|
/***********************方奕卓 热点列表事件监听 ************************/
|
|
|
- if(window.MP_PREFETCHED_MODELDATA.showHotListSta === 'true') {
|
|
|
+ if(window.MP_PREFETCHED_MODELDATA.showHotListSta) {
|
|
|
$('#hotList').css('display', '');
|
|
|
$('#hotList').on('click',function(e){
|
|
|
l(e);
|
|
@@ -8578,7 +8578,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
, D = !1
|
|
|
, N = {
|
|
|
populate: function(e) {
|
|
|
- if (n(e.name, e.coBrand)) {
|
|
|
+ if (n(MP_PREFETCHED_MODELDATA.name, e.coBrand)) {
|
|
|
if (r(e.description),
|
|
|
o(e.contactName, e.phone, e.email, e.formatted_contact_phone),
|
|
|
a(e.address),
|
|
@@ -14230,6 +14230,10 @@ window.Modernizr = function(n, e, t) {
|
|
|
}catch(e){console.log(e) }
|
|
|
|
|
|
window.MP_PREFETCHED_MODELDATA = data;
|
|
|
+ data.model.summary = data.summary
|
|
|
+ data.model.name = data.name
|
|
|
+
|
|
|
+
|
|
|
progressUpdate(0.7);
|
|
|
StartLoad(); //xzw someData.js是我整合的 原本在html里 但这样每个场景的html都不一样了
|
|
|
if(data.weixinDesc){
|
|
@@ -23498,18 +23502,24 @@ window.Modernizr = function(n, e, t) {
|
|
|
if(window.vrEnabled && !window.orientEnable){//很可能没能触发陀螺仪事件
|
|
|
if(m.detectIOS()/* && m.detectSafari() */){
|
|
|
var b = m.iosVersion();//{major: 10, minor: 3, patch: 1}
|
|
|
- //console.log("开始获取权限 major"+b.major)
|
|
|
+ console.log("开始获取权限 major"+b.major)
|
|
|
if(b.major == 12 && b.minor>=2){
|
|
|
if(browser.detectSafari()) alert("浏览器未能检测到转动。为完整体验VR效果,请打开 “设置” > “Safari” > “隐私和安全” 下的 “运动和方向访问” 开关,然后刷新此页面。")
|
|
|
else{//app??
|
|
|
alert("浏览器未能检测到转动。请在手机或浏览器设置中开启了运动和方向访问等设置,然后刷新此页面。")
|
|
|
}
|
|
|
}else if(b.major >= 13){
|
|
|
+ if(!window.location.href.includes("https://")){
|
|
|
+ console.log("需要https");
|
|
|
+ alert("当前网页下,高于ios12的浏览器版本可能不支持陀螺仪开启。")
|
|
|
+ return;
|
|
|
+ }
|
|
|
var hasFailed = window.vrPermission && (window.vrPermission.deviceMotion != "granted" || window.vrPermission.deviceOrientation != "granted")
|
|
|
- hasFailed || alert("'请点击“允许”'");
|
|
|
- setTimeout(()=>{
|
|
|
+
|
|
|
+ setTimeout(()=>{//如果使用了alert会阻断这个事件,报以下错requusting device orientation or motion access requires a user gesture
|
|
|
if(!window.vrEnabled || window.orientEnable)return;
|
|
|
vrPermissionCallBack("reset")
|
|
|
+ console.log(window.DeviceMotionEvent)
|
|
|
if ( window.DeviceMotionEvent && window.DeviceMotionEvent.requestPermission && typeof window.DeviceMotionEvent.requestPermission === 'function') {
|
|
|
console.log("开始获取权限1")
|
|
|
///注意:需要https 本地服务器permissionState会得到denied
|
|
@@ -23878,13 +23888,13 @@ window.Modernizr = function(n, e, t) {
|
|
|
if (this.vrCameraNeedsUpdate = this.vrCameraNeedsUpdate || this.bananaFov !== a.fov || this.bananaReal_aspect !== a.aspect * this.bananaAspect || this.bananaNear !== a.near || this.bananaFar !== a.far,
|
|
|
this.vrCameraNeedsUpdate) {
|
|
|
this.vrCameraNeedsUpdate = !1,
|
|
|
- console.debug("vrCameraUpdate"),
|
|
|
+ //console.debug("vrCameraUpdate"),
|
|
|
this.bananaFocus = a.focus,
|
|
|
this.bananaFov = a.fov,
|
|
|
this.bananaReal_aspect = a.aspect * this.bananaAspect,
|
|
|
this.bananaNear = a.near,
|
|
|
this.bananaFar = a.far,
|
|
|
- console.debug(a.aspect),
|
|
|
+ //console.debug(a.aspect),
|
|
|
this.bananaFocus = 10;
|
|
|
var b, c, d = a.projectionMatrix.clone(), e = this.overlap / 2, f = e * this.bananaNear / this.bananaFocus, g = this.bananaNear * Math.tan(Math.PI / 180 * this.bananaFov * .5);
|
|
|
this.eyeLeft.elements[12] = -e,
|