|
@@ -92184,14 +92184,14 @@ ENDSEC
|
|
|
|
|
|
|
|
|
if(pano0){
|
|
|
- this.uniforms.pano0Map.value = pano0.getSkyboxTexture();//pano0.texture
|
|
|
+ this.uniforms.pano0Map.value = pano0.skyboxTex ;
|
|
|
this.uniforms.pano0Position.value.copy(pano0.position);
|
|
|
this.uniforms.pano0Matrix.value.copy(pano0.panoMatrix/* pano0.mesh.matrixWorld */ );
|
|
|
//pano1.ensureSkyboxReadyForRender();
|
|
|
}
|
|
|
|
|
|
|
|
|
- this.uniforms.pano1Map.value = pano1.getSkyboxTexture();//pano1.texture;
|
|
|
+ this.uniforms.pano1Map.value = pano1.skyboxTex;
|
|
|
this.uniforms.pano1Position.value.copy(pano1.position);
|
|
|
this.uniforms.pano1Matrix.value.copy(pano1.panoMatrix /* pano1.mesh.matrixWorld */ );
|
|
|
|
|
@@ -92340,8 +92340,8 @@ ENDSEC
|
|
|
|
|
|
this.panosData = o;
|
|
|
|
|
|
- this.originPosition = new Vector3().fromArray(o.pose.translation);
|
|
|
- this.originFloorPosition = new Vector3().fromArray(o.puck);
|
|
|
+ this.originPosition = new Vector3().copy(o.pose.translation);
|
|
|
+ this.originFloorPosition = new Vector3().copy(o.puck);
|
|
|
|
|
|
this.originID = parseInt(o.id);// uuid "file_id":"00022"对应是原本的4dkk的id --来自vision.txt
|
|
|
|
|
@@ -92382,7 +92382,7 @@ ENDSEC
|
|
|
|
|
|
this.rotation = new Euler().setFromQuaternion(this.quaternion);
|
|
|
this.build();
|
|
|
- this.transformByPointcloud(); //初始化位移
|
|
|
+ this.setPosition(this.originPosition, this.originFloorPosition );//this.transformByPointcloud() //初始化位移
|
|
|
|
|
|
|
|
|
|
|
@@ -92424,7 +92424,7 @@ ENDSEC
|
|
|
loadTex(){
|
|
|
if(this.skyboxTex || this.texLoading)return
|
|
|
this.texLoading = true;
|
|
|
- let src = `${Potree.settings.urls.prefix1}\${this.id}.jpg`; //`server\test\SS-t-P1d6CwREny2\${this.id}.jpg` //`${Potree.settings.urls.prefix1}/${Potree.settings.webSite}/${this.pointcloud.sceneCode}/data/${this.pointcloud.sceneCode}/depthmap/${this.originID}.png`
|
|
|
+ let src = `${Potree.settings.urls.prefix1}/images/${this.originID}.jpg`; //`server\test\SS-t-P1d6CwREny2\${this.id}.jpg` //`${Potree.settings.urls.prefix1}/${Potree.settings.webSite}/${this.pointcloud.sceneCode}/data/${this.pointcloud.sceneCode}/depthmap/${this.originID}.png`
|
|
|
//console.log('开始下载depthImg', this.id)
|
|
|
let texture = texLoader$4.load( src, ()=>{
|
|
|
this.skyboxTex = texture;
|
|
@@ -92449,7 +92449,7 @@ ENDSEC
|
|
|
this.depthTexLoading = true;
|
|
|
let src = //Potree.settings.number == 'SS-t-7DUfWAUZ3V' ? `${Potree.scriptPath}/data/${Potree.settings.number}/depthMap/${this.originID}.png` :
|
|
|
//`${Potree.settings.urls.prefix1}/${Potree.settings.webSite}/${this.pointcloud.sceneCode}/data/${this.pointcloud.sceneCode}/depthmap/${this.originID}.png`
|
|
|
- `server\test\SS-t-P1d6CwREny2\depthmap\${this.id}.png`;
|
|
|
+ `${Potree.settings.urls.prefix1}/depthmap/${this.originID}.png`;
|
|
|
|
|
|
//console.log('开始下载depthImg', this.id)
|
|
|
let texture = texLoader$4.load( src, ()=>{
|
|
@@ -92479,10 +92479,7 @@ ENDSEC
|
|
|
this.oriPanoMatrix = this.panoMatrix.clone();
|
|
|
|
|
|
if(this.quaternion2)this.oriPanoMatrix2 = new Matrix4().makeRotationFromQuaternion(this.quaternion2);
|
|
|
-
|
|
|
-
|
|
|
- //console.log(this.quaternion)
|
|
|
- //this.quaternion = quaternion
|
|
|
+
|
|
|
}
|
|
|
|
|
|
let marker = new Mesh(planeGeo$1, this.getMarkerMat() );
|
|
@@ -92502,25 +92499,27 @@ ENDSEC
|
|
|
|
|
|
marker.addEventListener('mouseover', this.hoverOn.bind(this));
|
|
|
marker.addEventListener('mouseleave', this.hoverOff.bind(this));
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- transformByPointcloud(){
|
|
|
+ /* transformByPointcloud(){
|
|
|
|
|
|
let position = this.originPosition.clone().applyMatrix4(this.pointcloud.transformMatrix);//也可以用datasetPosTransform算
|
|
|
let floorPosition = this.originFloorPosition.clone().applyMatrix4(this.pointcloud.transformMatrix);
|
|
|
- this.setPosition(position, floorPosition);
|
|
|
- this.panoMatrix = new Matrix4().multiplyMatrices(this.pointcloud.rotateMatrix, this.oriPanoMatrix );
|
|
|
+ this.setPosition(position, floorPosition)
|
|
|
+ this.panoMatrix = new THREE.Matrix4().multiplyMatrices(this.pointcloud.rotateMatrix, this.oriPanoMatrix )
|
|
|
//this.panoMatrix2 = Potree.Utils.datasetRotTransform({fromDataset:true, pointcloud:this.pointcloud, matrix:this.oriPanoMatrix, getMatrix:true}) //和上一行结果一样
|
|
|
//quaternion也变下
|
|
|
if(this.oriPanoMatrix2){
|
|
|
- this.panoMatrix2 = new Matrix4().multiplyMatrices(this.pointcloud.rotateMatrix, this.oriPanoMatrix2 );//供DepthImageSampler使用
|
|
|
+ this.panoMatrix2 = new THREE.Matrix4().multiplyMatrices(this.pointcloud.rotateMatrix, this.oriPanoMatrix2 )//供DepthImageSampler使用
|
|
|
this.panoMatrix2Inverse = this.panoMatrix2.clone().invert();
|
|
|
}
|
|
|
- this.dispatchEvent('rePos');
|
|
|
- }
|
|
|
+ this.dispatchEvent('rePos')
|
|
|
+ } */
|
|
|
|
|
|
setPosition(position, floorPosition){
|
|
|
this.position = position;
|
|
@@ -93275,9 +93274,13 @@ ENDSEC
|
|
|
return this.currentPano.loadDepthImg()
|
|
|
}
|
|
|
//this.updateDepthTex()
|
|
|
- if(this.checkAndWaitForPanoLoad(this.currentPano, this.basePanoSize, wait)){
|
|
|
+ /* if(this.checkAndWaitForPanoLoad(this.currentPano, this.basePanoSize, wait)){
|
|
|
return
|
|
|
- }
|
|
|
+ } */
|
|
|
+ if(!this.currentPano.skyboxTex){
|
|
|
+ this.addEventListener('loadedTex', wait, {once:true});
|
|
|
+ this.currentPano.loadTex();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -93647,7 +93650,7 @@ ENDSEC
|
|
|
|
|
|
if(!pano.skyboxTex){
|
|
|
this.addEventListener('loadedTex', wait, {once:true});
|
|
|
- this.loadTex();
|
|
|
+ pano.loadTex();
|
|
|
}
|
|
|
/* if(this.checkAndWaitForPanoLoad(pano, toPano.basePanoSize || this.basePanoSize, wait )){
|
|
|
return
|
|
@@ -135601,7 +135604,7 @@ ENDSEC
|
|
|
if(Common$1.getDifferenceSet(at, this.atDatasets).length){
|
|
|
//console.log('atDatasets', at)
|
|
|
this.atDatasets = at;
|
|
|
- if(Potree.settings.editType != 'pano' && Potree.settings.editType != 'merge')this.updateFpVisiDatasets();
|
|
|
+
|
|
|
this.dispatchEvent({type:'pointcloudAtChange',pointclouds:at});
|
|
|
}
|
|
|
force = false;
|