diff --git a/src/mol-geo/geometry/spheres/spheres-builder.ts b/src/mol-geo/geometry/spheres/spheres-builder.ts index b4fb62c2ade317ad82e988e6e5db2cf4a36580c5..9050e723a3bbb0f0d8ce415ebbf19b5078d651a7 100644 --- a/src/mol-geo/geometry/spheres/spheres-builder.ts +++ b/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), } diff --git a/src/mol-repr/structure/visual/util/element.ts b/src/mol-repr/structure/visual/util/element.ts index 58b60b13ecca87b1e7ed65ac3925d160ee66c538..baab3d964710402313240eeacac172c7b3fe5a5a 100644 --- a/src/mol-repr/structure/visual/util/element.ts +++ b/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