Browse Source

fixed spheres geo updating issue

Alexander Rose 6 years ago
parent
commit
e049e0e0f2

+ 1 - 1
src/mol-geo/geometry/spheres/spheres-builder.ts

@@ -54,7 +54,7 @@ export namespace SpheresBuilder {
                     kind: 'spheres',
                     sphereCount: centers.elementCount / 4,
                     centerBuffer: spheres ? ValueCell.update(spheres.centerBuffer, cb) : ValueCell.create(cb),
-                    mappingBuffer: spheres ? ValueCell.update(spheres.centerBuffer, mb) : ValueCell.create(mb),
+                    mappingBuffer: spheres ? ValueCell.update(spheres.mappingBuffer, mb) : ValueCell.create(mb),
                     indexBuffer: spheres ? ValueCell.update(spheres.indexBuffer, ib) : ValueCell.create(ib),
                     groupBuffer: spheres ? ValueCell.update(spheres.groupBuffer, gb) : ValueCell.create(gb),
                 }

+ 1 - 1
src/mol-repr/structure/visual/util/element.ts

@@ -55,7 +55,7 @@ export function createElementSphereImpostor(ctx: VisualContext, unit: Unit, stru
 
     const { elements } = unit;
     const elementCount = elements.length;
-    const builder = SpheresBuilder.create(elementCount, elementCount / 2)
+    const builder = SpheresBuilder.create(elementCount, elementCount / 2, spheres)
 
     const v = Vec3.zero()
     const pos = unit.conformation.invariantPosition