Skip to content
Snippets Groups Projects
Commit e049e0e0 authored by Alexander Rose's avatar Alexander Rose
Browse files

fixed spheres geo updating issue

parent 54629e42
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,7 @@ export namespace SpheresBuilder { ...@@ -54,7 +54,7 @@ export namespace SpheresBuilder {
kind: 'spheres', kind: 'spheres',
sphereCount: centers.elementCount / 4, sphereCount: centers.elementCount / 4,
centerBuffer: spheres ? ValueCell.update(spheres.centerBuffer, cb) : ValueCell.create(cb), 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), indexBuffer: spheres ? ValueCell.update(spheres.indexBuffer, ib) : ValueCell.create(ib),
groupBuffer: spheres ? ValueCell.update(spheres.groupBuffer, gb) : ValueCell.create(gb), groupBuffer: spheres ? ValueCell.update(spheres.groupBuffer, gb) : ValueCell.create(gb),
} }
......
...@@ -55,7 +55,7 @@ export function createElementSphereImpostor(ctx: VisualContext, unit: Unit, stru ...@@ -55,7 +55,7 @@ export function createElementSphereImpostor(ctx: VisualContext, unit: Unit, stru
const { elements } = unit; const { elements } = unit;
const elementCount = elements.length; const elementCount = elements.length;
const builder = SpheresBuilder.create(elementCount, elementCount / 2) const builder = SpheresBuilder.create(elementCount, elementCount / 2, spheres)
const v = Vec3.zero() const v = Vec3.zero()
const pos = unit.conformation.invariantPosition const pos = unit.conformation.invariantPosition
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment