This commit is contained in:
@@ -5,8 +5,10 @@
|
|||||||
|
|
||||||
<!-- 首页脚本 -->
|
<!-- 首页脚本 -->
|
||||||
<script src="/web/BlackFruit-web/js/index.js"></script>
|
<script src="/web/BlackFruit-web/js/index.js"></script>
|
||||||
<!-- 3D 地球依赖:Three.js(请在 /web/BlackFruit-web/vender/three/three.min.js 放置库文件) -->
|
<!-- 3D 地球依赖:Three.js
|
||||||
<script src="/web/BlackFruit-web/vender/three/three.min.js"></script>
|
如需本地部署,请将 three.min.js 放到 /web/BlackFruit-web/vender/three/three.min.js
|
||||||
|
这里默认使用 CDN,方便快速预览效果 -->
|
||||||
|
<script src="https://unpkg.com/three@0.155.0/build/three.min.js"></script>
|
||||||
<!-- 3D 地球效果脚本 -->
|
<!-- 3D 地球效果脚本 -->
|
||||||
<script src="/web/BlackFruit-web/js/globe.js"></script>
|
<script src="/web/BlackFruit-web/js/globe.js"></script>
|
||||||
<script src="/web/BlackFruit-web/js/viewer.min.js"></script>
|
<script src="/web/BlackFruit-web/js/viewer.min.js"></script>
|
||||||
|
|||||||
@@ -4,9 +4,13 @@
|
|||||||
(function () {
|
(function () {
|
||||||
function initGlobe() {
|
function initGlobe() {
|
||||||
var container = document.getElementById("bannerGlobe");
|
var container = document.getElementById("bannerGlobe");
|
||||||
if (!container) return;
|
if (!container) {
|
||||||
|
console.warn("[Globe] bannerGlobe container not found");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (typeof THREE === "undefined") {
|
if (typeof THREE === "undefined") {
|
||||||
// Three.js 未加载时直接跳过,不影响其它功能
|
// Three.js 未加载时直接跳过,不影响其它功能
|
||||||
|
console.warn("[Globe] THREE is undefined, please ensure three.min.js is loaded");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,4 +185,3 @@
|
|||||||
initGlobe();
|
initGlobe();
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user