Kaynağa Gözat

fix: guassain js 添加成功

xzw 1 yıl önce
ebeveyn
işleme
44fb105067

+ 404 - 48
public/lib/potree/potree.js

@@ -73865,7 +73865,7 @@ void main()
 
 
 
-	Utils.loadSkybox = function(path, oldSky ) {
+	Utils.loadSkybox = function(path, oldSky, callback ) {
 	    let  camera, scene, parent , cameraOrtho;
 	    if(!oldSky){
 	        parent = new Object3D("skybox_root");
@@ -73918,7 +73918,8 @@ void main()
 	        texture.flipY = false; 
 	        texture.magFilter = LinearFilter;
 	        texture.minFilter = LinearFilter;
-	        scene.children[0].material.uniforms.tDiffuse.value = texture;  
+	        scene.children[0].material.uniforms.tDiffuse.value = texture; 
+	        callback && callback();
 	        viewer.dispatchEvent('content_changed');
 	    },null,(e)=>{//error
 	        console.error('loadSkybox失败',path); 
@@ -77074,6 +77075,75 @@ void main()
 	                
 	            },callback,onprogress);
 	        
+	        }else if(prop.type == 'shp'){ 
+	            viewer.loadModel({  
+	                fileType: 'shp', 
+	                id: prop.id,
+	                name : prop.title, 
+	                url:prop.url,
+	                
+	            },callback,onprogress);
+	  
+	          
+	            //shpModel.position.set(-330000, 900000,10)//尽量移动到原点。原位置在江门那
+	            
+	             
+	         
+	           
+	            
+	 
+	        
+	        }else if(prop.type == '3dgs'){ 
+	        
+	            let callback = (object)=>{ 
+	                object.isModel = true; 
+	                
+	                loadDone(object);
+	            }; 
+	        
+	        
+	            const gsViewer = new GaussianSplats3D.Viewer({ 
+	              rootElement: viewer.renderArea,
+	              threeScene: viewer.scene.scene,
+	              renderer: viewer.renderer,
+	              camera:  viewer.mainViewport.camera,
+	              useBuiltInControls: false,
+	                //dropInMode: true,
+	                // sharedMemoryForWorkers:false  //否则 报错 Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': SharedArrayBuffer transfer requires self.crossOriginIsolated. 
+
+	            });
+	             
+	            //let path = Potree.resourcePath+'/models/gaussian/bonsai.ksplat';
+	             
+	            
+	            gsViewer.addSplatScene(prop.url, {
+	                  'streamView': true
+	                })
+	                .then(() => {
+	                    gsViewer.start();
+	                     
+	                    /* gsViewer.splatMesh.rotation.x = -2.365929590263301
+	                    gsViewer.splatMesh.position.z = 5 */
+	                    gsViewer.splatMesh.updateMatrix();
+	                    gsViewer.splatMesh.updateMatrixWorld();
+	                     
+	                    viewer.mainViewport.view.setView({position: new Vector3(-4.980,  -5.3879,  5.4503095), quaternion:new Quaternion(0.5750,-0.2809,-0.3372,0.6903)});
+	                    //viewer.controls.setTarget(new THREE.Vector3(-0.18587, -0.379014, -1.7))
+	                    gsViewer.splatMesh.onSplatTreeReadyCallback = ()=>{ 
+	                        let {sceneMax,sceneMin} = gsViewer.splatMesh.splatTree.subTrees[0];
+	                        gsViewer.splatMesh.boundingBox.min.copy(sceneMin);
+	                        gsViewer.splatMesh.boundingBox.max.copy(sceneMax);
+	                        callback(gsViewer.splatMesh);
+	                    }; 
+	                });
+	            
+	        
+	            //window.gsViewer = gsViewer
+	         
+	            viewer.addEventListener('render.begin2',(e)=>{
+	                if(e.name == 'scene') gsViewer.selfDrivenUpdate();
+	            });
+	        
 	            
 	        }else {  
 	            
@@ -77702,7 +77772,10 @@ void main()
 	    pickFrontPointRatio:config$1.pickFrontPointRatio, //默认pick点云时选中靠近镜头的点的偏向
 	    dragPolyBeyondPoint: browser.urlHasValue('dragPolyBeyondPoint'),  //ctrlPolygon是否可以拖拽到没点云的地方
 	    panoZoomByPointer: false,//全景图是否定点缩放
-	    areaAtNotPlane: false
+	    areaAtNotPlane: false,
+	    
+	    
+	    fastTran: isTest
 	};
 
 
@@ -81642,8 +81715,7 @@ void main()
             uniform mat4 pano0Matrix;
             
             uniform vec3 pano1Position;
-            uniform mat4 pano1Matrix;
-            //uniform mat4 pano1Matrix2;
+            uniform mat4 pano1Matrix; 
 
            
             varying vec2 vUv; 
@@ -81700,7 +81772,7 @@ void main()
             uniform float modelAlpha;
             uniform float opacity;
             uniform float progress;
-            uniform int blackout;
+            uniform int tranType;
             uniform vec3 pano0Position;
             uniform vec3 pano1Position;
             uniform float maxDistance;
@@ -81708,17 +81780,14 @@ void main()
             uniform float minOpa;
             
           
-       
-            /* uniform sampler2D pano0Map;
-            uniform sampler2D pano1Map;    */   
+          
             uniform samplerCube pano0Map;
             uniform samplerCube pano1Map;
           
             
             varying vec2 vUv; 
             varying vec3 vWorldPosition0;
-            varying vec3 vWorldPosition1;
-            //varying vec3 vWorldPosition12;
+            varying vec3 vWorldPosition1; 
             
           
             /* vec2 getSamplerCoord( vec3 direction ) 
@@ -81761,7 +81830,7 @@ void main()
                     //distance *= 255. * .001;           // distance is now in meters
                     
                     //更改
-                    float distance = (depth.g + depth.r / 256.) * 255.;  //为什么要乘以255 
+                    float distance = (depth.g + depth.r / 256.) * 255.;  
                     
                     if(distance == 0.0){//漫游点底部识别不到的区域,给一个地板高度 
                          if(uv2.y < depthTexUVyLimit) distance = heightUp / dir.y;    
@@ -81773,7 +81842,6 @@ void main()
                     
                     depthValue.x = distance;
                     
-                   // return  r[1] + r[0] / 256  
                     distance += .1;          // add a safety margin
 
                     vec4 eyePos2 = vec4(normalize(eyePos.xyz) * distance, 1.);
@@ -81792,16 +81860,18 @@ void main()
             {
                 vec3 vWorldPosition0N = normalize(vWorldPosition0);
                 vec3 vWorldPosition1N = normalize(vWorldPosition1);
-               
+                float progress_ = progress;
                 
                 vec4 colorFromPano0 = vec4(0.0,0.0,0.0,0.0);
                 #if defined(usePanoMap0)
                     //即progress < 1.0   通常是1
                     colorFromPano0=textureCube(pano0Map,vWorldPosition0N.xyz);
+                #else 
+                    progress_ = 1.0;
                 #endif
                 vec4 colorFromPano1=textureCube(pano1Map,vWorldPosition1N.xyz);
  
-                gl_FragColor = mix(colorFromPano0,colorFromPano1,progress);
+                gl_FragColor = mix(colorFromPano0,colorFromPano1,progress_);
               
               
                 
@@ -81824,7 +81894,7 @@ void main()
                     vec2 depth1 = getDepth(vWorldPosition1N, depthMap1, cameraHeight1, ceilHeight1, eyePos);
                     
                     
-                    gl_FragDepthEXT = mix(depth0.y,depth1.y,progress); 
+                    gl_FragDepthEXT = mix(depth0.y,depth1.y,progress_); 
                     gl_FragDepthEXT = clamp(gl_FragDepthEXT, 0.0, 1.0);    //防止部分手机出现黑块。ios 16  。 因为我给的超远值超出范围
                     
 
@@ -81893,7 +81963,7 @@ void main()
 	                return progress
 	            },
 	            set: e => {
-	                if (e < 1) {
+	                if (e < 1 && !Potree.settings.fastTran ) {
 	                    if (!('usePanoMap0' in this.defines)) {
 	                        this.defines.usePanoMap0 = '';
 	                        this.needsUpdate = true;
@@ -81990,6 +82060,268 @@ void main()
 	    } */
 	}
 
+	class FastTranPass {
+	    
+	    constructor(renderer){
+	       
+	        
+	        this.renderer = renderer;
+	        
+	        this.coverRenderTarget = new WebGLRenderTarget( 100, 100, { 
+	            minFilter: LinearFilter, magFilter: LinearFilter,
+	            format: RGBAFormat 
+	        });
+	        
+	        this.coverTex = this.coverRenderTarget.texture; 
+	        
+	        this.enabled = false;
+	        
+	        
+	        /* this.oldClearColor = new THREE.Color();
+	        this.oldClearAlpha = 1;
+
+	        this.camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );
+	        this.scene = new THREE.Scene(); */
+
+
+	        this.material = this.getMaskMaterial();
+	         /* var copyShader = THREE.CopyShader;
+	        this.materialCopy = new THREE.ShaderMaterial( {
+	            uniforms: this.copyUniforms,
+	            vertexShader: copyShader.vertexShader,
+	            fragmentShader: copyShader.fragmentShader,
+	            blending: THREE.NoBlending,
+	            depthTest: false,
+	            depthWrite: false,
+	            transparent: true
+	        } );
+
+
+	        this.quad = new THREE.Mesh( new THREE.PlaneBufferGeometry( 2, 2 ), this.material);
+	        this.quad.frustumCulled = false; // Avoid getting clipped
+	        this.scene.add( this.quad ); 
+	        
+	        
+	        this.renderToScreen = true*/
+	    }
+	    
+	    setSize( width, height ) {
+	        
+	        this.coverRenderTarget.setSize( width, height );
+	        
+	    } 
+	    
+	    
+	    start(){
+	        this.enabled = true;
+	        
+	        
+	        
+	        let {x,y} = viewer.mainViewport.resolution2;
+	        this.setSize(x,y);
+	        
+	        //draw coverTex
+	        let oldTarget = this.renderer.getRenderTarget();
+	        
+	        
+	        //let oldClearColor = this.renderer.getClearColor()
+	        
+	        
+	        
+	        this.renderer.setRenderTarget(this.coverRenderTarget);
+	        //this.renderer.setClearColor( 0x000000, 0)
+	        let oldLayer = viewer.mainViewport.camera.layers.mask; 
+	        Potree.Utils.setCameraLayers(viewer.mainViewport.camera, ['skybox']);
+	        this.renderer.render( viewer.scene.scene, viewer.mainViewport.camera );
+	        
+	        //this.renderer.setClearColor( 0x000000, 0)
+	        this.renderer.setRenderTarget(oldTarget); 
+	        viewer.mainViewport.camera.layers.mask = oldLayer;
+	        
+	        
+	        this.material.uniforms.progress.value = 1;
+	        console.log('start111');
+	        
+	    } 
+	    
+	    
+	    
+	    render( scene, camera, viewports, renderer, writeBuffer, readBuffer  ) {
+	        /* var oldAutoClear = renderer.autoClear; 
+	        renderer.autoClear = false;
+	         */
+	        
+	        let {x,y} = viewer.mainViewport.resolution2;
+	        var uniforms = this.material.uniforms;
+	        //uniforms.bgTex.value = readBuffer.texture; //更新
+	        uniforms.coverTex.value = this.coverTex; 
+	        
+	        uniforms.progress.value = viewer.images360.cube.material.uniforms.progress.value; 
+	        uniforms.screenRatio.value = x / y; // 使波纹为圆形
+	        uniforms.screenRatio.value *= uniforms.screenRatio.value;
+	        
+	        Potree.Utils.screenPass.render(viewer.renderer, viewer.images360.fastTranMaskPass.material);
+	        
+	        //renderer.autoClear = oldAutoClear;
+	        
+	        
+	    }
+	    
+	    stop(){
+	        this.enabled = false;
+	        console.log('stop111');
+	    }
+	    
+	    getMaskMaterial(){
+	        return new ShaderMaterial( {
+
+	            uniforms: {
+	                coverTex: {
+	                    type: "t",
+	                    value: null
+	                }, 
+	                progress:{
+	                    type: "f",
+	                    value: 0
+	                },
+	                screenRatio:{
+	                    type: "f",
+	                    value: 1
+	                }
+	            },
+
+	            vertexShader: ` 
+                varying vec2 vUv;
+                 
+                void main() 
+                {
+                    vUv = uv;
+                    
+                    gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
+                } 
+               
+            `,
+	            fragmentShader: ` 
+                uniform sampler2D coverTex; 
+                uniform float progress; 
+                uniform float screenRatio;
+                varying vec2 vUv;
+               
+                void main() {
+                    
+                    const float maxRadius = 0.708;      // sqrt(0.5^2+0.5^2)
+                    const float minRadius = 0.0 ;
+                     
+                    float radius = screenRatio>1.0 ? sqrt((vUv.x - 0.5)*(vUv.x - 0.5) + (vUv.y - 0.5)*(vUv.y - 0.5)/screenRatio) : sqrt((vUv.x - 0.5)*(vUv.x - 0.5)*screenRatio+ (vUv.y - 0.5)*(vUv.y - 0.5));
+                    float diff = 0.292;    //1.0-maxRadius;
+                    float radiusIn = maxRadius * progress + minRadius * (1.0-progress);
+                    float radiusOut = radiusIn + diff;
+                    if(radius < radiusIn) {
+                        
+                        discard;
+                        
+                    }else if(radius>radiusOut){
+                        gl_FragColor = texture2D(coverTex, vUv)  ;
+                        //gl_FragColor = vec4(1.0,1.0,0.0,1.0);//
+                        
+                    }else{
+                        
+                        /* vec4 color1 = texture2D(bgTex, vUv);
+                        vec4 color2 = texture2D(coverTex, vUv);
+                        float rotio = smoothstep(radiusIn ,radiusOut,radius);
+                       
+                        gl_FragColor = mix(color1, color2, rotio); */
+                        
+                        float rotio = smoothstep(radiusIn ,radiusOut, radius);
+                        
+                        vec4 color2 = texture2D(coverTex, vUv);
+                        color2.a = rotio;
+                        
+                        
+                    }
+                }
+             `
+
+	        } );
+	        
+	    }
+	    
+	    /* getMaskMaterial(){
+	        return new THREE.ShaderMaterial( {
+
+	            uniforms: {
+	                coverTex: {
+	                    type: "t",
+	                    value: null
+	                },
+	                bgTex: {
+	                    type: "t",
+	                    value: null
+	                },
+	                progress:{
+	                    type: "f",
+	                    value: 0
+	                },
+	                screenRatio:{
+	                    type: "f",
+	                    value: 1
+	                }
+	            },
+
+	            vertexShader: ` 
+	                varying vec2 vUv;
+	                 
+	                void main() 
+	                {
+	                    vUv = uv;
+	                    
+	                    gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
+	                } 
+	               
+	            `,
+	            fragmentShader: ` 
+	                uniform sampler2D coverTex;
+	                uniform sampler2D bgTex;
+	                uniform float progress; 
+	                uniform float screenRatio;
+	                varying vec2 vUv;
+	               
+	                void main() {
+	                    
+	                    const float maxRadius = 0.708;      // sqrt(0.5^2+0.5^2)
+	                    const float minRadius = 0.0 ;
+	                     
+	                    float radius = screenRatio>1.0 ? sqrt((vUv.x - 0.5)*(vUv.x - 0.5) + (vUv.y - 0.5)*(vUv.y - 0.5)/screenRatio) : sqrt((vUv.x - 0.5)*(vUv.x - 0.5)*screenRatio+ (vUv.y - 0.5)*(vUv.y - 0.5));
+	                    float diff = 0.292;    //1.0-maxRadius;
+	                    float radiusIn = maxRadius * progress + minRadius * (1.0-progress);
+	                    float radiusOut = radiusIn + diff;
+	                    if(radius < radiusIn) {
+	                        
+	                        gl_FragColor = texture2D(bgTex, vUv);
+	                        //gl_FragColor = vec4(0.0,0.0,1.0,1.0);//
+	                        
+	                    }else if(radius>radiusOut){
+	                        gl_FragColor = texture2D(coverTex, vUv)  ;
+	                        //gl_FragColor = vec4(1.0,1.0,0.0,1.0);//
+	                        
+	                    }else{
+	                        
+	                        vec4 color1 = texture2D(bgTex, vUv);
+	                        vec4 color2 = texture2D(coverTex, vUv);
+	                        float rotio = smoothstep(radiusIn ,radiusOut,radius);
+	                       
+	                        gl_FragColor = mix(color1, color2, rotio);
+	                    }
+	                }
+	             `
+
+	        } );
+	        
+	    } */
+
+	    
+	}
+
 	let GLCubeFaces$1 = Potree.defines.GLCubeFaces;
 
 	var TileUtils = {};
@@ -86311,7 +86643,7 @@ void main()
 	            if (!(x < 0 || y < 0 || x >= this.canvas.width || y >= this.canvas.height)){  
 	                let blockIndex = this.canvas.width * y + x;
 	                let color = imgData.data.slice(blockIndex*4, (blockIndex+1)*4);
-	                return color[1] + color[0] / 256
+	                return color[1] + color[0] / 256            //为什么不是除以255见聊天记录.(验证过比点云的远一点点)
 	            }
 	        };
 	         
@@ -86506,7 +86838,8 @@ void main()
 	}
 
 	let {PanoSizeClass: PanoSizeClass$3,Vectors: Vectors$1,GLCubeFaces: GLCubeFaces$3, PanoramaEvents: PanoramaEvents$1} = Potree.defines;
-	 
+
+	    
 
 	 
 	var rot90$1 = new Quaternion().setFromAxisAngle(new Vector3(0,0,1),  Math.PI/2 ); //使用的是刚好适合全景图的,给cube贴图需要转90°
@@ -86555,7 +86888,7 @@ void main()
 	        this.node.name = 'ImagesNode';
 	         
 	        this.cubePanos = [];
-	        
+	        this.fastTranMaskPass = new FastTranPass(viewer.renderer);
 	        
 	        {
 	            this.cube = new Mesh(new BoxBufferGeometry(1,1,1,1),new ModelTextureMaterial());
@@ -87181,7 +87514,7 @@ void main()
 	            }
 	           
 	            this.dispatchEvent({type:'flyToPanoDone', makeIt, disturb});
-	             
+	            this.fastTranMaskPass.stop(); 
 	            toPano.deferred && toPano.deferred.resolve(makeIt);  //测量线截图时发现,resolve需要写在flying=false 后才行。
 	        };
 	        
@@ -87264,16 +87597,6 @@ void main()
 	        }  
 	                   
 	        
-	        if(config.transition.showSkybox || config.transition.pointUsePanoTex){
-	             this.setProjectedPanos({
-	                progress:0,
-	                ifSkybox: this.cube.visible,
-	                ifPointcloud : config.transition.pointUsePanoTex,
-	                easeInOutRatio : pointcloudVisi ? 0.3 : 0,
-	                pano0:this.currentPano,
-	                pano1:pano
-	            });  
-	        }
 	        
 	        const endPosition = pano.position.clone(); 
 	        let T = Potree.config.transitionsTime;
@@ -87286,7 +87609,26 @@ void main()
 	        
 	        let maxDis = 7;
 	        let duration = toPano.duration == void 0 ? Math.min(dis, maxDis) * T.flytimeDistanceMultiplier + T.flyMinTime : toPano.duration; 
+	        
+	        
 	         
+	        if(config.transition.showSkybox || config.transition.pointUsePanoTex){
+	            
+	             if(Potree.settings.fastTran ){
+	                this.fastTranMaskPass.start(); //截图当前画面
+	                viewer.scene.view.position.copy(endPosition);
+	             }
+	            
+	            
+	             this.setProjectedPanos({
+	                progress: 0,
+	                ifSkybox: this.cube.visible,
+	                ifPointcloud : config.transition.pointUsePanoTex,
+	                easeInOutRatio : pointcloudVisi ? 0.3 : 0,
+	                pano0:this.currentPano,
+	                pano1:pano
+	            });  
+	        }
 	        
 	        
 	        if(toPano.useBound){
@@ -87364,6 +87706,9 @@ void main()
 	            this.dispatchEvent({type:'flyToPano', toPano});
 	            
 	             
+	            
+	             
+	             
 	            viewer.scene.view.setView({position:endPosition, target, quaternion:toPano.quaternion , duration:toPano.duration,  
 	                onUpdate:(progress_, delta)=>{
 	                    
@@ -104727,6 +105072,7 @@ void main()
 	                var rtEDL = this.getRtEDL(params.viewport);
 	                if(rtEDL){
 	                    renderer.setRenderTarget( rtEDL );
+	                    renderer.setClearAlpha(0);
 	                    renderer.clear( true, true, true );
 	                }
 	                
@@ -104858,10 +105204,17 @@ void main()
 	                    }else {
 	                        viewer.renderer.render(viewer.scene.scene, camera);
 	                    }
-	                    if(Potree.settings.displayMode == 'showPanos' )return
+	                    
 	                }else {
 	                    viewer.renderer.render(viewer.scene.scene, camera);
 	                }     
+	                if(Potree.settings.displayMode == 'showPanos' ){
+	                    if(Potree.settings.fastTran && viewer.images360.fastTranMaskPass.enabled){
+	                        viewer.images360.fastTranMaskPass.render();
+	                    } 
+	                    return
+	                }
+	                 
 	                 
 	            }
 	            
@@ -121050,7 +121403,7 @@ ENDSEC
 	                    
 	                }));
 	                viewer.scene.scene.add(this.groundPlane);
-	                this.groundPlane.position.z = -1;
+	                this.groundPlane.position.z = 0.1;
 	            }else {
 	                this.groundPlane.material.map = map;
 	            }
@@ -135718,7 +136071,7 @@ ENDSEC
 	const maxVertexVisi = 5e6;
 	const maxTexVisi = 500;
 
-	const maxDepth = 100;
+	let maxDepth = 100;
 
 	function getGpuMemoryUsage(win = window){//总的
 	    let c = 0;
@@ -143232,9 +143585,8 @@ ENDSEC
 	      const tile = node.item;
 	      node = node.next;
 	      this.unloadTile(tileset, tile, unloadCallback); 
-	        //add:  针对部分特别精细的如  https://4dkk.4dage.com/scene_view_data/SG-t-WReTBN204dQ/images/3dtiles/tileset.json
 	        
-	        if(viewer.visiVertexCount > 1500000){ 
+	        if(viewer.visiVertexCount > 1500000){ //add:  针对部分特别精细的很卡如  https://4dkk.4dage.com/scene_view_data/SG-t-WReTBN204dQ/images/3dtiles/tileset.json
 	            tileset.options.maximumScreenSpaceError *= 1.1;
 	            tileset.options.maximumScreenSpaceError = Math.min(1000, tileset.options.maximumScreenSpaceError); 
 	        }
@@ -159505,10 +159857,12 @@ ENDSEC
 	                this.fxaaPass.renderToScreen = true;
 	                
 					this.composer.addPass( this.fxaaPass );  */
-	                //抗锯齿截图 效果时而好时而不好,文字比较模糊
+	                //抗锯齿截图 效果时而好时而不好,文字比较模糊 
+	                //这两个暂时不能一起用。目前刚好不需要一起用
 	                
+	                /* this.images360.fastTranMaskPass = new FastTranPass( this.renderer )
+	                this.composer.addPass(this.images360.fastTranMaskPass)//add */
 	                
-	                //这两个暂时不能一起用。目前刚好不需要一起用
 	                
 	            }
 	            
@@ -160687,10 +161041,11 @@ ENDSEC
 
 			if(bg === "skybox"){
 	            if(!src)src = Potree.resourcePath+'/textures/skybox/xingkong.jpg';
-				this.skybox = Utils.loadSkybox(src, this.skybox);
-			} 
-
-			this.background = bg;
+				this.skybox = Utils.loadSkybox(src, this.skybox, ()=>{
+	                this.background = bg;
+	            });
+			}else {  this.background = bg;
+	        }
 	        this.backgroundOpacity = 1;//add
 			this.dispatchEvent({'type': 'background_changed', 'viewer': this});
 		}
@@ -162371,7 +162726,7 @@ ENDSEC
 	                
 	            } 
 	                 
-	             if(Potree.settings.notAdditiveBlending){ // 融合页面才用到
+	            if(Potree.settings.notAdditiveBlending){ // 融合页面才用到
 	                params.renderBeforeCloud = false;
 	                this.renderOverlay1(params); 
 	                this.renderOverlay2(params);  
@@ -162627,7 +162982,9 @@ ENDSEC
 	            viewports = viewports.filter(v=>v.active); 
 	            if(viewports.length > 0){   
 	                params.viewports = viewports;  
-	                if(this.outlinePass.selectedObjects.length && this.outlinePass.edgeStrength > 0 && !params.screenshot){  
+	                if(this.outlinePass.selectedObjects.length && this.outlinePass.edgeStrength > 0 && !params.screenshot 
+	                   // || this.images360.fastTranMaskPass.enabled
+	                ){  
 	                    let scenes = this.inputHandler.interactiveScenes.concat(this.scene.scene).concat(viewer.scene.scenePointCloud); 
 	                    this.composer.render(scenes, null, this.viewports, this.renderDefault.bind(this));  
 	                }else {  
@@ -164336,11 +164693,10 @@ ENDSEC
 	                    //console.log(child.name, 'roughness',child.material.roughness,'metalness',child.material.metalness)
 	                       
 
-	                     //暂时用这种材质:
-	                    if(fileInfo_.unlit && (!(child.material instanceof MeshBasicMaterial) || object.fileType == 'glb')){
+	                     
+	                    if(fileInfo_.unlit && (!(child.material instanceof BasicMaterial) /* || object.fileType == 'glb' */)){ //注释掉是因为已经写入到loader文件里了
 	                        //let material = new THREE.MeshBasicMaterial({map:child.material.map})
-	                        let material = new BasicMaterial({map : child.material.map});  //很奇怪glb的图会使原本的MeshBasicMaterial 会偏暗,所以自己重新写
-	                        
+	                        let material = new BasicMaterial({map : child.material.map, opacity:child.material.opacity, color:child.material.color});  //很奇怪glb的图会使原本的MeshBasicMaterial 会偏暗,所以自己重新写
 	                        //child.material.dispose()
 	                        child.material = material; 
 	                    } 

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
public/lib/potree/potree.js.map


+ 1 - 1
src/sdk/cover/index.js

@@ -1,7 +1,7 @@
 import mitt from 'mitt'
 
 import axios from 'axios' //{ axios } from '@/api'
-import * as THREE from '@/assets/lib/three.module.min.js'
+//import * as THREE from '@/assets/lib/three.module.min.js'
 
 /* 
 

+ 4 - 2
src/sdk/index.ts

@@ -1,6 +1,8 @@
 import { initialSDK as initialSDKRaw, sdk } from './sdk'
 import { setupAssociation } from './association'
-import {  } from '@/assets//lib/gaussian/gaussian-splats-3d.module.js'
+
+
+//import * as GaussianSplats3D from '@/assets//lib/gaussian/gaussian-splats-3d.module.js' 
 
 const presetViewElement = (layout: HTMLDivElement) => {
   const style = getComputedStyle(layout)
@@ -25,7 +27,7 @@ const presetViewElement = (layout: HTMLDivElement) => {
 
 
 export const initialSDK: typeof initialSDKRaw = async (props) => {
-  const sdk = await initialSDKRaw(props)
+  const sdk = await initialSDKRaw(props, GaussianSplats3D)
   setupAssociation(presetViewElement(props.layout), sdk)
   return sdk
 }