diff --git a/src/mol-gl/renderer.ts b/src/mol-gl/renderer.ts index bf91fda29..05b5ef282 100644 --- a/src/mol-gl/renderer.ts +++ b/src/mol-gl/renderer.ts @@ -441,7 +441,6 @@ namespace Renderer { } ValueCell.update(globalUniforms.uIsAsymmetricProjection, camera.isAsymmetricProjection); - }; const updateInternal = (group: Scene.Group, camera: ICamera, depthTexture: Texture | null, renderMask: Mask, markingDepthTest: boolean) => { diff --git a/src/mol-gl/shader/chunks/assign-position.glsl.ts b/src/mol-gl/shader/chunks/assign-position.glsl.ts index 4e11d8d0c..12011897f 100644 --- a/src/mol-gl/shader/chunks/assign-position.glsl.ts +++ b/src/mol-gl/shader/chunks/assign-position.glsl.ts @@ -11,9 +11,9 @@ mat4 modelView = uView * model; #else vec3 position = aPosition; #endif -// #ifndef dGeometryType_image +#ifndef dGeometryType_image position = applyWiggle(position, group, aInstance); -// #endif +#endif vec4 position4 = vec4(position, 1.0); // for accessing tColorGrid in vert shader and for clipping in frag shader vModelPosition = (model * position4).xyz; diff --git a/src/mol-gl/shader/chunks/common-animation.glsl.ts b/src/mol-gl/shader/chunks/common-animation.glsl.ts index 32487b3df..67cb91ada 100644 --- a/src/mol-gl/shader/chunks/common-animation.glsl.ts +++ b/src/mol-gl/shader/chunks/common-animation.glsl.ts @@ -52,13 +52,13 @@ vec3 applyWiggle(vec3 pos, float groupId, float instanceId) { return pos; } -mat4 applyTumble(mat4 transform, float instanceIndex, float uObjectId) { +mat4 applyTumble(mat4 transform, float instanceIndex, float objectId) { if (!uEnableAnimation) return transform; if (uTumbleAmplitude > 0.0 && uTumbleSpeed > 0.0 && uTumbleFrequency > 0.0) { // Scale amplitude inversely with bounding-sphere radius (Stokes-Einstein: D ~ 1/r) float amplitude = uTumbleAmplitude / max(uInvariantBoundingSphere.w, 1.0); float t = uTime * uTumbleSpeed; - float seed = (instanceIndex * 127.1 + uObjectId * 311.7) * uTumbleFrequency; + float seed = (instanceIndex * 127.1 + objectId * 311.7) * uTumbleFrequency; // Per-instance rotation angles from layered noise (Brownian-like) float angleX = (fbm(vec3(seed, t, 0.0)) / 0.4375 - 1.0) * amplitude; diff --git a/src/mol-repr/structure/complex-representation.ts b/src/mol-repr/structure/complex-representation.ts index 35fa46674..46625ec0d 100644 --- a/src/mol-repr/structure/complex-representation.ts +++ b/src/mol-repr/structure/complex-representation.ts @@ -140,6 +140,7 @@ export function ComplexRepresentation
(label: string, visual.setClipping(remappedClipping); } if (state.wiggle !== undefined && visual) { + // Remap loci from equivalent structure to the current structure const remappedWiggle = Wiggle.remap(state.wiggle, _structure); visual.setWiggle(remappedWiggle, webgl); }