|
|
|
@ -1,4 +1,6 @@
|
|
|
|
|
import { Intent } from '@blueprintjs/core';
|
|
|
|
|
import 'core-js/features/object/has-own';
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import { Cache, Layers, Object3D } from 'three';
|
|
|
|
|
import { HostApplicationServices } from './ApplicationServices/HostApplicationServices';
|
|
|
|
|
import { ColorPalette } from './Common/ColorPalette';
|
|
|
|
@ -142,6 +144,31 @@ window.onload = function ()
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function CheckChromeVer93(): string
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
const browser = detect();
|
|
|
|
|
if (browser.name === "chrome" || browser.name === "edge-chromium")
|
|
|
|
|
{
|
|
|
|
|
let ver = parseInt(browser.version.split(".")[0]);
|
|
|
|
|
|
|
|
|
|
if (browser.os === "Windows 7")
|
|
|
|
|
{
|
|
|
|
|
if (ver < 93)
|
|
|
|
|
return "https://dl.google.com/release2/chrome/czao2hrvpk5wgqrkz4kks5r734_109.0.5414.120/109.0.5414.120_chrome_installer.exe";
|
|
|
|
|
}
|
|
|
|
|
else if (ver < 93)
|
|
|
|
|
return "https://www.google.cn/chrome/";
|
|
|
|
|
}
|
|
|
|
|
return "";//其他浏览器??
|
|
|
|
|
}
|
|
|
|
|
catch (error)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let isWebGlSupport = isWebGLAvailable();
|
|
|
|
|
let isChromeVerSupport = CheckChromeVer();
|
|
|
|
|
if (!isWebGlSupport || !isChromeVerSupport)
|
|
|
|
@ -182,8 +209,27 @@ window.onload = function ()
|
|
|
|
|
else if (window.location.hostname === "localhost")
|
|
|
|
|
ReportErrorWrap.IsProduction = false;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ReportErrorWrap.IsProduction = true;
|
|
|
|
|
|
|
|
|
|
let linkUrl = CheckChromeVer93();
|
|
|
|
|
if (linkUrl)
|
|
|
|
|
{
|
|
|
|
|
let logVer = AppToaster.show({
|
|
|
|
|
message: <>
|
|
|
|
|
当前浏览器版本较低,为了更好的体验产品,点击
|
|
|
|
|
<button onClick={() =>
|
|
|
|
|
{
|
|
|
|
|
window.open(linkUrl);
|
|
|
|
|
AppToaster.dismiss(logVer);
|
|
|
|
|
}}>下载</button>
|
|
|
|
|
最新浏览器
|
|
|
|
|
</>,
|
|
|
|
|
timeout: 30000,
|
|
|
|
|
}, "logVer");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Object3D.DefaultMatrixAutoUpdate = false;
|
|
|
|
|
|
|
|
|
|
Layers.prototype.test = (layers) => true;
|
|
|
|
|