From ec3cae815a08af1af991b0c617d42c361fc3dbc6 Mon Sep 17 00:00:00 2001
From: Alexander Rose <alex.rose@rcsb.org>
Date: Tue, 18 Sep 2018 10:07:24 -0700
Subject: [PATCH] fixed normal dir in normal calculation

---
 src/mol-geo/geometry/mesh/mesh.ts                               | 2 +-
 .../representation/structure/visual/gaussian-surface-mesh.ts    | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/mol-geo/geometry/mesh/mesh.ts b/src/mol-geo/geometry/mesh/mesh.ts
index ed8f545de..255cff2cc 100644
--- a/src/mol-geo/geometry/mesh/mesh.ts
+++ b/src/mol-geo/geometry/mesh/mesh.ts
@@ -80,7 +80,7 @@ export namespace Mesh {
             Vec3.fromArray(y, v, b);
             Vec3.fromArray(z, v, c);
             Vec3.sub(d1, z, y);
-            Vec3.sub(d2, y, x);
+            Vec3.sub(d2, x, y);
             Vec3.cross(n, d1, d2);
 
             normals[a] += n[0]; normals[a + 1] += n[1]; normals[a + 2] += n[2];
diff --git a/src/mol-geo/representation/structure/visual/gaussian-surface-mesh.ts b/src/mol-geo/representation/structure/visual/gaussian-surface-mesh.ts
index 59485b672..6c9cb6e04 100644
--- a/src/mol-geo/representation/structure/visual/gaussian-surface-mesh.ts
+++ b/src/mol-geo/representation/structure/visual/gaussian-surface-mesh.ts
@@ -32,8 +32,6 @@ async function createGaussianSurfaceMesh(ctx: RuntimeContext, unit: Unit, struct
 export const DefaultGaussianSurfaceProps = {
     ...DefaultUnitsMeshProps,
     ...DefaultGaussianDensityProps,
-
-    flipSided: true, // TODO should not be required
 }
 export type GaussianSurfaceProps = typeof DefaultGaussianSurfaceProps
 
-- 
GitLab