Browse Source

tweaked polymer trace for coarse units

Alexander Rose 6 years ago
parent
commit
5a80def1d8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/mol-geo/representation/structure/visual/polymer-trace-mesh.ts

+ 2 - 0
src/mol-geo/representation/structure/visual/polymer-trace-mesh.ts

@@ -36,6 +36,7 @@ async function createPolymerTraceMesh(ctx: RuntimeContext, unit: Unit, structure
     const vertexCount = linearSegments * radialSegments * polymerElementCount + (radialSegments + 1) * polymerElementCount * 2
     const builder = MeshBuilder.create(vertexCount, vertexCount / 10, mesh)
 
+    const isCoarse = Unit.isCoarse(unit)
     const state = createCurveSegmentState(linearSegments)
     const { curvePoints, normalVectors, binormalVectors } = state
 
@@ -54,6 +55,7 @@ async function createPolymerTraceMesh(ctx: RuntimeContext, unit: Unit, structure
         interpolateCurveSegment(state, v, tension, shift)
 
         let width = sizeTheme.size(v.center)
+        if (isCoarse) width *= aspectRatio / 2
 
         if (isSheet) {
             const height = width * aspectRatio