|
@@ -64142,6 +64142,24 @@ void main() {
|
|
|
#ifdef HasMap
|
|
|
vec4 texColor = texture2D(map, vUv);
|
|
|
gl_FragColor = texColor * color_;
|
|
|
+
|
|
|
+ /*#ifdef InverseColor
|
|
|
+ bool inverse = false; //gl_FragColor.r < 0.3 || gl_FragColor.g < 0.3 || gl_FragColor.b < 0.3 ||
|
|
|
+
|
|
|
+ //深色字和白色地面要反转
|
|
|
+
|
|
|
+ if(gl_FragColor.r > 0.9 && gl_FragColor.g > 0.9 && gl_FragColor.b > 0.9){
|
|
|
+ //gl_FragColor.r = 1.0 - gl_FragColor.r;
|
|
|
+ //gl_FragColor.g = 1.0 - gl_FragColor.g;
|
|
|
+ //gl_FragColor.b = 1.0 - gl_FragColor.b;
|
|
|
+ gl_FragColor = vec4(0.07,0.22, 0.5,1.0);
|
|
|
+ }else{//海和草坪颜色加深
|
|
|
+
|
|
|
+ gl_FragColor = texColor * vec4(0.3,0.5,0.7,1.0);
|
|
|
+ }
|
|
|
+
|
|
|
+ #endif*/
|
|
|
+
|
|
|
#else
|
|
|
gl_FragColor = color_;
|
|
|
#endif
|
|
@@ -77757,6 +77775,65 @@ void main()
|
|
|
settings.webSite = 'datav1';
|
|
|
}
|
|
|
|
|
|
+ /* let sid = 0
|
|
|
+ let getName = ()=>{
|
|
|
+ return sid ++
|
|
|
+ } */
|
|
|
+
|
|
|
+
|
|
|
+ class BasicMaterial extends ShaderMaterial{
|
|
|
+ constructor(o={}){
|
|
|
+
|
|
|
+ super( Object.assign({},{
|
|
|
+ uniforms:{
|
|
|
+ color: {type:'v3', value: o.color || new Color("#FFF")} ,
|
|
|
+ map: {type: 't', value: o.map },
|
|
|
+ opacity : {type:'f', value : o.opacity == void 0 ? 1 : o.opacity }
|
|
|
+ },
|
|
|
+ vertexShader: Shaders['basicTextured.vs'],
|
|
|
+ fragmentShader: Shaders['basicTextured.fs'],
|
|
|
+ defines:{HasColor:'' }
|
|
|
+ },o));
|
|
|
+ //this.name111 = getName()
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ copy(source){
|
|
|
+ super.copy(source);
|
|
|
+ //console.log('copy', source.name111, this.name111, !!source.map )
|
|
|
+
|
|
|
+
|
|
|
+ this.map = source.map;
|
|
|
+
|
|
|
+ return this
|
|
|
+ }
|
|
|
+
|
|
|
+ set opacity(o){
|
|
|
+ this.uniforms && (this.uniforms.opacity.value = o);
|
|
|
+
|
|
|
+ }
|
|
|
+ get opacity(){
|
|
|
+ return this.uniforms.opacity.value
|
|
|
+ }
|
|
|
+
|
|
|
+ set map(o){
|
|
|
+ this.uniforms.map.value = o;
|
|
|
+ if(o){
|
|
|
+ this.defines.HasMap = '';
|
|
|
+ }else {
|
|
|
+ delete this.defines.HasMap;
|
|
|
+ }
|
|
|
+ //可能需要needsUpdate
|
|
|
+ //console.log('hasMap', !!o, this.name111 )
|
|
|
+ }
|
|
|
+ get map(){
|
|
|
+ return this.uniforms.map.value
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
let texLoader$2 = new TextureLoader();
|
|
|
texLoader$2.crossOrigin = "anonymous";
|
|
|
|
|
@@ -78414,7 +78491,18 @@ void main()
|
|
|
opacity: 0,
|
|
|
side: DoubleSide,
|
|
|
|
|
|
- });
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ /* var t = new BasicMaterial({
|
|
|
+ transparent: !0,
|
|
|
+ depthWrite: !1,
|
|
|
+ depthTest: !0,
|
|
|
+ opacity: 0,
|
|
|
+ side: THREE.DoubleSide
|
|
|
+ })
|
|
|
+ t.defines.InverseColor = '' */
|
|
|
+
|
|
|
if(Potree.settings.isTest) {
|
|
|
var colorHue = Math.random();
|
|
|
t.color = new Color().setHSL(colorHue, 0.6, 0.92);
|
|
@@ -78551,11 +78639,16 @@ void main()
|
|
|
if(style == 'satellite'){//卫星
|
|
|
this.maxDepth = 18;
|
|
|
this.baseUrl = "https://webst01.is.autonavi.com/appmaptile?lang=zh_cn&style=6&yrs=m&x=${x}&y=${y}&z=${z}";
|
|
|
+ }else if(style == 'dark-standard'){
|
|
|
+ this.maxDepth = 18;
|
|
|
+ this.baseUrl = "https://wprd01.is.autonavi.com/appmaptile?lang=zh_cn&style=8&size=1&yrs=m&x=${x}&y=${y}&z=${z}"; //路网 加上scl=2后去掉名字
|
|
|
}else {
|
|
|
this.maxDepth = 19;
|
|
|
- this.baseUrl = "https://wprd04.is.autonavi.com/appmaptile?lang=zh_cn&style=7&yrs=m&x=${x}&y=${y}&z=${z}"; //
|
|
|
+ this.baseUrl = "https://wprd04.is.autonavi.com/appmaptile?lang=zh_cn&style=7&yrs=m&x=${x}&y=${y}&z=${z}"; //
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
- }
|
|
|
+ }//详解 https://www.cnblogs.com/lucio110/p/17310054.html
|
|
|
}
|
|
|
|
|
|
this.style = style;
|
|
@@ -85234,65 +85327,6 @@ void main()
|
|
|
return Math.pow(c, t) * e
|
|
|
};
|
|
|
|
|
|
- /* let sid = 0
|
|
|
- let getName = ()=>{
|
|
|
- return sid ++
|
|
|
- } */
|
|
|
-
|
|
|
-
|
|
|
- class BasicMaterial extends ShaderMaterial{
|
|
|
- constructor(o={}){
|
|
|
-
|
|
|
- super( Object.assign({},{
|
|
|
- uniforms:{
|
|
|
- color: {type:'v3', value: o.color || new Color("#FFF")} ,
|
|
|
- map: {type: 't', value: o.map },
|
|
|
- opacity : {type:'f', value : o.opacity == void 0 ? 1 : o.opacity }
|
|
|
- },
|
|
|
- vertexShader: Shaders['basicTextured.vs'],
|
|
|
- fragmentShader: Shaders['basicTextured.fs'],
|
|
|
- defines:{HasColor:'' }
|
|
|
- },o));
|
|
|
- //this.name111 = getName()
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- copy(source){
|
|
|
- super.copy(source);
|
|
|
- //console.log('copy', source.name111, this.name111, !!source.map )
|
|
|
-
|
|
|
-
|
|
|
- this.map = source.map;
|
|
|
-
|
|
|
- return this
|
|
|
- }
|
|
|
-
|
|
|
- set opacity(o){
|
|
|
- this.uniforms && (this.uniforms.opacity.value = o);
|
|
|
-
|
|
|
- }
|
|
|
- get opacity(){
|
|
|
- return this.uniforms.opacity.value
|
|
|
- }
|
|
|
-
|
|
|
- set map(o){
|
|
|
- this.uniforms.map.value = o;
|
|
|
- if(o){
|
|
|
- this.defines.HasMap = '';
|
|
|
- }else {
|
|
|
- delete this.defines.HasMap;
|
|
|
- }
|
|
|
- //可能需要needsUpdate
|
|
|
- //console.log('hasMap', !!o, this.name111 )
|
|
|
- }
|
|
|
- get map(){
|
|
|
- return this.uniforms.map.value
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
let {PanoSizeClass: PanoSizeClass$2, PanoRendererEvents: PanoRendererEvents$1 , Vectors,SceneRendererEvents,TileDownloaderEvents: TileDownloaderEvents$1, GLCubeFaces: GLCubeFaces$2} = Potree.defines;
|
|
|
|
|
|
|