|
@@ -2671,11 +2671,18 @@ function load4dkkMedias(model){//加载四维看看的一些媒体物品
|
|
|
prop.type = 'media'
|
|
|
prop.model = model
|
|
|
prop.position = Potree.Utils.tran4dkkVecInModel(new THREE.Vector3().fromArray(prop.pos), model) ,
|
|
|
- prop.rotation = new THREE.Euler().setFromQuaternion(new THREE.Quaternion().fromArray(prop.qua)),
|
|
|
+ let qua = new THREE.Quaternion().fromArray(prop.qua).normalize()
|
|
|
+ if(model.props.baseRotation?.x == 0){ //该模型已经矫正,无需旋转90度,但是场景的数据需要,导致monitor和模型不匹配,需要再旋转
|
|
|
+ qua.copy(Potree.math.convertQuaternion.YupToZup(qua))
|
|
|
+ }
|
|
|
+ prop.rotation = new THREE.Euler().setFromQuaternion(qua)
|
|
|
//prop.url = location.origin + '/oss/scene_view_data/'+ model.props.raw.num + '/user/'+prop.url,
|
|
|
- prop.url = location.origin + sceneJsonPath.replace('data/scene.json','user/'+prop.url), //offline different
|
|
|
-
|
|
|
-
|
|
|
+ prop.url = sceneJsonPath.replace('data/scene.json','user/'+prop.url) //offline different
|
|
|
+
|
|
|
+ if(!prop.url.substr(0,5).includes('http')) prop.url = location.origin + prop.url
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
prop.id = prop.sid
|
|
|
//Potree.settings.urls.getPrefix(8,model)
|
|
|
//isNew:true, //是否新创建而非加载
|