diff --git a/src/mol-geo/geometry/direct-volume/direct-volume.ts b/src/mol-geo/geometry/direct-volume/direct-volume.ts index 6f25a2e39f0b79dc23f76c5f2b445f3954ec1ddc..c26c7d9c02e93a681a84d899bc35eda7a8bce4f9 100644 --- a/src/mol-geo/geometry/direct-volume/direct-volume.ts +++ b/src/mol-geo/geometry/direct-volume/direct-volume.ts @@ -74,8 +74,8 @@ export namespace DirectVolume { isoValue: PD.Numeric(0.22, { min: -1, max: 1, step: 0.01 }), renderMode: PD.Select('volume', RenderModeOptions), controlPoints: PD.LineGraph([ - Vec2.create(0.19, 0.0), Vec2.create(0.2, 0.15), Vec2.create(0.21, 0.0), - Vec2.create(0.79, 0.0), Vec2.create(0.8, 0.15), Vec2.create(0.81, 0.0), + Vec2.create(0.19, 0.0), Vec2.create(0.2, 0.05), Vec2.create(0.25, 0.05), Vec2.create(0.26, 0.0), + Vec2.create(0.79, 0.0), Vec2.create(0.8, 0.05), Vec2.create(0.85, 0.05), Vec2.create(0.86, 0.0), ]), list: PD.ColorScale<ColorListName>('RedYellowBlue', ColorListOptions), } diff --git a/src/mol-gl/shader/direct-volume.frag b/src/mol-gl/shader/direct-volume.frag index 7eabed7ff24c447579f6aaee2c5505cb71e62cf7..de8f74643629d2ba0c7a66e900580f5d9ae9789e 100644 --- a/src/mol-gl/shader/direct-volume.frag +++ b/src/mol-gl/shader/direct-volume.frag @@ -91,7 +91,7 @@ const float gradOffset = 0.5; vec4 raymarch(vec3 startLoc, vec3 step, vec3 viewDir) { vec3 scaleVol = vec3(1.0) / uGridDim; - vec3 pos = startLoc + scaleVol * 0.5; + vec3 pos = startLoc; float prevValue = -1.0; float value = 0.0; vec4 src = vec4(0.0); diff --git a/src/mol-model/structure/structure/unit.ts b/src/mol-model/structure/structure/unit.ts index 933cd583a02d1194bbabb6ce241899d8e96d5554..cbdf58718698e9342657f0739e5fc4b832ef27ee 100644 --- a/src/mol-model/structure/structure/unit.ts +++ b/src/mol-model/structure/structure/unit.ts @@ -22,8 +22,10 @@ import { GaussianDensityProps, computeUnitGaussianDensityCached } from './unit/g import { RuntimeContext } from 'mol-task'; import { WebGLContext } from 'mol-gl/webgl/context'; -// A building block of a structure that corresponds to an atomic or a coarse grained representation -// 'conveniently grouped together'. +/** + * A building block of a structure that corresponds to an atomic or + * a coarse grained representation 'conveniently grouped together'. + */ type Unit = Unit.Atomic | Unit.Spheres | Unit.Gaussians namespace Unit { @@ -114,13 +116,15 @@ namespace Unit { return (i: number) => 0; } - // A bulding block of a structure that corresponds - // to a "natural group of atoms" (most often a "chain") - // together with a tranformation (rotation and translation) - // that is dynamically applied to the underlying atom set. - // - // An atom set can be referenced by multiple diffrent units which - // makes construction of assemblies and spacegroups very efficient. + /** + * A bulding block of a structure that corresponds + * to a "natural group of atoms" (most often a "chain") + * together with a tranformation (rotation and translation) + * that is dynamically applied to the underlying atom set. + * + * An atom set can be referenced by multiple diffrent units which + * makes construction of assemblies and spacegroups very efficient. + */ export class Atomic implements Base { readonly kind = Kind.Atomic; @@ -130,7 +134,7 @@ namespace Unit { readonly model: Model; readonly conformation: SymmetryOperator.ArrayMapping<ElementIndex>; - // Reference some commonly accessed things for faster access. + /** Reference some commonly accessed things for faster access. */ readonly residueIndex: ArrayLike<ResidueIndex>; readonly chainIndex: ArrayLike<ChainIndex>;