From ef30146195b0f697fe060beb169a7fca446d888e Mon Sep 17 00:00:00 2001
From: Mourtz <alex.mourtziapis@gmail.com>
Date: Tue, 16 Apr 2019 20:00:06 +0200
Subject: [PATCH] Backup Changes

---
 js/scripts/JSRootGeoPainter.js       | 32 +++++++++++++---------------
 ui5/eve7/controller/GL.controller.js |  2 +-
 ui5/eve7/lib/EveScene.js             |  3 +--
 ui5/eve7/lib/OutlinePass.js          |  7 +++---
 4 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/js/scripts/JSRootGeoPainter.js b/js/scripts/JSRootGeoPainter.js
index 7154b32692e..532bdfe5822 100644
--- a/js/scripts/JSRootGeoPainter.js
+++ b/js/scripts/JSRootGeoPainter.js
@@ -1921,22 +1921,20 @@
       this._effectComposer = new THREE.EffectComposer( this._renderer );
       this._effectComposer.addPass( new THREE.RenderPass( this._scene, this._camera ) );
 
-      this.outlinePass = new THREE.OutlinePass( new THREE.Vector2( w, h ), this._scene, this._camera );
-      this.outlinePass.edgeStrength = 7.5;
-      this.outlinePass.edgeGlow = 0.5;
-      this.outlinePass.edgeThickness = 1.0;
-      this.outlinePass.usePatternTexture = false;
-      this.outlinePass.downSampleRatio = 2;
-      this.outlinePass.visibleEdgeColor.set('#dd1111');
-      this.outlinePass.hiddenEdgeColor.set('#1111dd');
-      this._effectComposer.addPass( this.outlinePass );
-
-      this.effectFXAA = new THREE.ShaderPass( THREE.FXAAShader );
-      this.effectFXAA.uniforms[ 'resolution' ].value.set( 1 / w, 1 / h );
-      this.effectFXAA.renderToScreen = true;
-      this._effectComposer.addPass( this.effectFXAA );
-
-      // this.composer.addPass( new THREE.ShaderPass( THREE.CopyShader ) );
+      this._outlinePass = new THREE.OutlinePass( new THREE.Vector2( w, h ), this._scene, this._camera );
+      this._outlinePass.edgeStrength = 7.5;
+      this._outlinePass.edgeGlow = 0.5;
+      this._outlinePass.edgeThickness = 1.0;
+      this._outlinePass.usePatternTexture = false;
+      this._outlinePass.downSampleRatio = 2;
+      this._outlinePass.visibleEdgeColor.set('#dd1111');
+      this._outlinePass.hiddenEdgeColor.set('#1111dd');
+      this._effectComposer.addPass( this._outlinePass );
+
+      this._effectFXAA = new THREE.ShaderPass( THREE.FXAAShader );
+      this._effectFXAA.uniforms[ 'resolution' ].value.set( 1 / w, 1 / h );
+      this._effectFXAA.renderToScreen = true;
+      this._effectComposer.addPass( this._effectFXAA );
 
       if (this._enableSSAO)
          this.createSSAO();
@@ -3626,7 +3624,7 @@
          this._camera.updateProjectionMatrix();
          this._renderer.setSize( this._scene_width, this._scene_height, !this._fit_main_area );
          this._effectComposer.setSize( this._scene_width, this._scene_height );
-         this.effectFXAA.uniforms[ 'resolution' ].value.set( 1 / this._scene_width, 1 / this._scene_height );
+         this._effectFXAA.uniforms[ 'resolution' ].value.set( 1 / this._scene_width, 1 / this._scene_height );
 
          if (!this.drawing_stage) this.Render3D();
       }
diff --git a/ui5/eve7/controller/GL.controller.js b/ui5/eve7/controller/GL.controller.js
index 40c184d8c6e..8d1681f3dc4 100644
--- a/ui5/eve7/controller/GL.controller.js
+++ b/ui5/eve7/controller/GL.controller.js
@@ -326,7 +326,7 @@ sap.ui.define([
          this.last_highlight = null;
 
          // outlinePass passthrough
-         this.outlinePass = this.geo_painter.outlinePass;
+         this.outlinePass = this.geo_painter._outlinePass;
 
          // create only when geo painter is ready
          this.createScenes();
diff --git a/ui5/eve7/lib/EveScene.js b/ui5/eve7/lib/EveScene.js
index fc6df77e732..6f4c0ce2caa 100644
--- a/ui5/eve7/lib/EveScene.js
+++ b/ui5/eve7/lib/EveScene.js
@@ -481,8 +481,7 @@ sap.ui.define([
          console.log("draw for selection exit ", x);
          // AMT for debugging purposes take only first child
          // this.viewer.getThreejsContainer("scene" + this.element_id).add(x[0]);
-         this.viewer.outlinePass.sec_sel = x;
-         dest[element_id] = x;
+         this.viewer.outlinePass.sec_sel = (dest[element_id] = x);
       }
 
       this.viewer.render();
diff --git a/ui5/eve7/lib/OutlinePass.js b/ui5/eve7/lib/OutlinePass.js
index 3e7f660a033..3c94c1b0682 100644
--- a/ui5/eve7/lib/OutlinePass.js
+++ b/ui5/eve7/lib/OutlinePass.js
@@ -186,10 +186,9 @@ THREE.OutlinePass.prototype = Object.assign( Object.create( THREE.Pass.prototype
 		}
 		*/
 
-		let groups = [];
-		
+		this.groups = [];
 		for (const obj of this.selectedObjects)
-			this.parseAtts(obj, groups);
+			this.parseAtts(obj, this.groups);
 	
 		// for (let i = 0; i < this.selectedObjects.length; ++i){
 		// 	const object = this.selectedObjects[i];
@@ -240,7 +239,7 @@ THREE.OutlinePass.prototype = Object.assign( Object.create( THREE.Pass.prototype
 		// 		groups[0].push(object);
 		// 	}
 		// }
-		this.groups = groups.filter(Array);
+		// this.groups = groups.filter(Array);
 	},
 
 	dispose: function () {
-- 
GitLab