将url中localhost端口改为当前host端口

This commit is contained in:
zh
2025-07-11 09:19:20 +08:00
parent 399725ed06
commit 579b76dc0e
8 changed files with 99 additions and 23 deletions

View File

@ -1305,9 +1305,10 @@ class TrajectoryMotion extends Base {
}
// 创建模型
static async addModel(that) {
let url = that.replaceHost(that.options.model.url, that.options.host)
let options = {
id: that.options.id,
url: that.options.model.url,
url: url,
show: that.options.show ? that.options.model.show : false,
scale: that.options.model.scale,
// minimumPixelSize: that.options.model.pixelSize,
@ -2285,7 +2286,7 @@ class TrajectoryMotion extends Base {
async changeModelUrl(url) {
this.sdk.viewer.scene.primitives.remove(this.model)
this.options.model.url = url
this.options.model.url = this.replaceHost(url, this.options.host)
let matrix = this.model.modelMatrix
let position = this.model.position
let options = {