|
@@ -153,6 +153,8 @@ export const debug = {};
|
|
|
|
|
|
|
|
let scriptPath = "";
|
|
let scriptPath = "";
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
if (document.currentScript && document.currentScript.src) {
|
|
if (document.currentScript && document.currentScript.src) {
|
|
|
scriptPath = new URL(document.currentScript.src + '/..').href;
|
|
scriptPath = new URL(document.currentScript.src + '/..').href;
|
|
|
if (scriptPath.slice(-1) === '/') {
|
|
if (scriptPath.slice(-1) === '/') {
|
|
@@ -167,6 +169,11 @@ if (document.currentScript && document.currentScript.src) {
|
|
|
console.error('Potree was unable to find its script path using document.currentScript. Is Potree included with a script tag? Does your browser support this function?');
|
|
console.error('Potree was unable to find its script path using document.currentScript. Is Potree included with a script tag? Does your browser support this function?');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+//去掉加的版本号,否则报错。http://192.168.0.59:8080/static/lib/potree/potree.js?v=2.12.4/..
|
|
|
|
|
+console.log('scriptPath', scriptPath)
|
|
|
|
|
+//scriptPath = scriptPath.split('potree.js')[0]
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
let resourcePath = scriptPath + '/resources';
|
|
let resourcePath = scriptPath + '/resources';
|
|
|
|
|
|
|
|
// scriptPath: build/potree
|
|
// scriptPath: build/potree
|