diff --git a/src/mol-geo/geometry/geometry.ts b/src/mol-geo/geometry/geometry.ts index 6b5c7253ce0a342f31745056bb1caff41b033466..7a3879effdba26117a00537759c8df5f32a88633 100644 --- a/src/mol-geo/geometry/geometry.ts +++ b/src/mol-geo/geometry/geometry.ts @@ -17,6 +17,7 @@ import { SizeType } from './size-data'; import { Lines } from './lines/lines'; import { paramDefaultValues, RangeParam, BooleanParam, SelectParam, ColorParam, StructureParam } from 'mol-view/parameter' import { Structure } from 'mol-model/structure'; +import { DirectVolume2d, DirectVolume3d } from './direct-volume/direct-volume'; // @@ -37,7 +38,13 @@ export const VisualQualityOptions = VisualQualityNames.map(n => [n, n] as [Visua // -export type GeometryKindType = { 'mesh': Mesh, 'points': Points, 'lines': Lines } +export type GeometryKindType = { + 'mesh': Mesh, + 'points': Points, + 'lines': Lines, + 'direct-volume-2d': DirectVolume2d, + 'direct-volume-3d': DirectVolume3d +} export type GeometryKind = keyof GeometryKindType export type Geometry = Helpers.ValueOf<GeometryKindType> @@ -47,6 +54,8 @@ export namespace Geometry { case 'mesh': return geometry.triangleCount * 3 case 'points': return geometry.pointCount case 'lines': return geometry.lineCount * 2 * 3 + case 'direct-volume-2d': return 12 * 3 + case 'direct-volume-3d': return 12 * 3 } } diff --git a/src/mol-geo/representation/structure/units-visual.ts b/src/mol-geo/representation/structure/units-visual.ts index 08f3eedd1a0b119fc3be8ba907f237f860b9d67d..dd1eaafad5d9fdaa35bf2e193764f2714bcbec31 100644 --- a/src/mol-geo/representation/structure/units-visual.ts +++ b/src/mol-geo/representation/structure/units-visual.ts @@ -8,7 +8,7 @@ import { Unit, Structure } from 'mol-model/structure'; import { RepresentationProps, Visual } from '../'; -import { VisualUpdateState, StructureMeshParams, StructurePointsParams, StructureLinesParams, StructureDirectVolumeParams } from '.'; +import { VisualUpdateState, StructureMeshParams, StructurePointsParams, StructureLinesParams, StructureDirectVolumeParams, StructureProps } from '.'; import { RuntimeContext } from 'mol-task'; import { PickingId } from '../../geometry/picking'; import { LocationIterator } from '../../util/location-iterator'; @@ -20,7 +20,7 @@ import { createUnitsMeshRenderObject, createUnitsPointsRenderObject, createUnits import { deepEqual, ValueCell, UUID } from 'mol-util'; import { Interval } from 'mol-data/int'; import { Points } from '../../geometry/points/points'; -import { updateRenderableState } from '../../geometry/geometry'; +import { updateRenderableState, Geometry } from '../../geometry/geometry'; import { createColors, ColorProps } from '../../geometry/color-data'; import { createSizes, SizeProps } from '../../geometry/size-data'; import { Lines } from '../../geometry/lines/lines'; @@ -71,26 +71,31 @@ function colorChanged(oldProps: ColorProps, newProps: ColorProps) { ) } -// mesh - -export const UnitsMeshParams = { - ...StructureMeshParams, +const UnitsParams = { unitKinds: MultiSelectParam<UnitKind>('Unit Kind', '', [ 'atomic', 'spheres' ], UnitKindOptions), } -export const DefaultUnitsMeshProps = paramDefaultValues(UnitsMeshParams) -export type UnitsMeshProps = typeof DefaultUnitsMeshProps -export interface UnitsMeshVisualBuilder<P extends UnitsMeshProps> { +interface UnitsVisualBuilder<P extends StructureProps, G extends Geometry> { defaultProps: P - createMesh(ctx: RuntimeContext, unit: Unit, structure: Structure, props: P, mesh?: Mesh): Promise<Mesh> + createGeometry(ctx: RuntimeContext, unit: Unit, structure: Structure, props: P, geometry?: G): Promise<G> createLocationIterator(group: Unit.SymmetryGroup): LocationIterator getLoci(pickingId: PickingId, group: Unit.SymmetryGroup, id: number): Loci mark(loci: Loci, group: Unit.SymmetryGroup, apply: (interval: Interval) => boolean): boolean setUpdateState(state: VisualUpdateState, newProps: P, currentProps: P): void } +// mesh + +export const UnitsMeshParams = { + ...StructureMeshParams, + ...UnitsParams, +} +export const DefaultUnitsMeshProps = paramDefaultValues(UnitsMeshParams) +export type UnitsMeshProps = typeof DefaultUnitsMeshProps +export interface UnitsMeshVisualBuilder<P extends UnitsMeshProps> extends UnitsVisualBuilder<P, Mesh> { } + export function UnitsMeshVisual<P extends UnitsMeshProps>(builder: UnitsMeshVisualBuilder<P>): UnitsVisual<P> { - const { defaultProps, createMesh, createLocationIterator, getLoci, mark, setUpdateState } = builder + const { defaultProps, createGeometry, createLocationIterator, getLoci, mark, setUpdateState } = builder const updateState = VisualUpdateState.create() let renderObject: MeshRenderObject | undefined @@ -108,7 +113,7 @@ export function UnitsMeshVisual<P extends UnitsMeshProps>(builder: UnitsMeshVisu const unit = group.units[0] currentConformationId = Unit.conformationId(unit) mesh = includesUnitKind(currentProps.unitKinds, unit) - ? await createMesh(ctx, unit, currentStructure, currentProps, mesh) + ? await createGeometry(ctx, unit, currentStructure, currentProps, mesh) : Mesh.createEmpty(mesh) // TODO create empty location iterator when not in unitKinds @@ -150,7 +155,7 @@ export function UnitsMeshVisual<P extends UnitsMeshProps>(builder: UnitsMeshVisu if (updateState.createGeometry) { mesh = includesUnitKind(newProps.unitKinds, unit) - ? await createMesh(ctx, unit, currentStructure, newProps, mesh) + ? await createGeometry(ctx, unit, currentStructure, newProps, mesh) : Mesh.createEmpty(mesh) ValueCell.update(renderObject.values.drawCount, mesh.triangleCount * 3) updateState.updateColor = true @@ -225,22 +230,14 @@ export function UnitsMeshVisual<P extends UnitsMeshProps>(builder: UnitsMeshVisu export const UnitsPointsParams = { ...StructurePointsParams, - unitKinds: MultiSelectParam<UnitKind>('Unit Kind', '', [ 'atomic', 'spheres' ], UnitKindOptions), + ...UnitsParams, } export const DefaultUnitsPointsProps = paramDefaultValues(UnitsPointsParams) export type UnitsPointsProps = typeof DefaultUnitsPointsProps - -export interface UnitsPointVisualBuilder<P extends UnitsPointsProps> { - defaultProps: P - createPoints(ctx: RuntimeContext, unit: Unit, structure: Structure, props: P, points?: Points): Promise<Points> - createLocationIterator(group: Unit.SymmetryGroup): LocationIterator - getLoci(pickingId: PickingId, group: Unit.SymmetryGroup, id: number): Loci - mark(loci: Loci, group: Unit.SymmetryGroup, apply: (interval: Interval) => boolean): boolean - setUpdateState(state: VisualUpdateState, newProps: P, currentProps: P): void -} +export interface UnitsPointVisualBuilder<P extends UnitsPointsProps> extends UnitsVisualBuilder<P, Points> { } export function UnitsPointsVisual<P extends UnitsPointsProps>(builder: UnitsPointVisualBuilder<P>): UnitsVisual<P> { - const { defaultProps, createPoints, createLocationIterator, getLoci, mark, setUpdateState } = builder + const { defaultProps, createGeometry, createLocationIterator, getLoci, mark, setUpdateState } = builder const updateState = VisualUpdateState.create() let renderObject: PointsRenderObject | undefined @@ -258,7 +255,7 @@ export function UnitsPointsVisual<P extends UnitsPointsProps>(builder: UnitsPoin const unit = group.units[0] currentConformationId = Unit.conformationId(unit) points = includesUnitKind(currentProps.unitKinds, unit) - ? await createPoints(ctx, unit, currentStructure, currentProps, points) + ? await createGeometry(ctx, unit, currentStructure, currentProps, points) : Points.createEmpty(points) // TODO create empty location iterator when not in unitKinds @@ -300,7 +297,7 @@ export function UnitsPointsVisual<P extends UnitsPointsProps>(builder: UnitsPoin if (updateState.createGeometry) { points = includesUnitKind(newProps.unitKinds, unit) - ? await createPoints(ctx, unit, currentStructure, newProps, points) + ? await createGeometry(ctx, unit, currentStructure, newProps, points) : Points.createEmpty(points) ValueCell.update(renderObject.values.drawCount, points.pointCount) updateState.updateColor = true @@ -379,22 +376,14 @@ export function UnitsPointsVisual<P extends UnitsPointsProps>(builder: UnitsPoin export const UnitsLinesParams = { ...StructureLinesParams, - unitKinds: MultiSelectParam<UnitKind>('Unit Kind', '', [ 'atomic', 'spheres' ], UnitKindOptions), + ...UnitsParams, } export const DefaultUnitsLinesProps = paramDefaultValues(UnitsLinesParams) export type UnitsLinesProps = typeof DefaultUnitsLinesProps - -export interface UnitsLinesVisualBuilder<P extends UnitsLinesProps> { - defaultProps: P - createLines(ctx: RuntimeContext, unit: Unit, structure: Structure, props: P, lines?: Lines): Promise<Lines> - createLocationIterator(group: Unit.SymmetryGroup): LocationIterator - getLoci(pickingId: PickingId, group: Unit.SymmetryGroup, id: number): Loci - mark(loci: Loci, group: Unit.SymmetryGroup, apply: (interval: Interval) => boolean): boolean - setUpdateState(state: VisualUpdateState, newProps: P, currentProps: P): void -} +export interface UnitsLinesVisualBuilder<P extends UnitsLinesProps> extends UnitsVisualBuilder<P, Lines> { } export function UnitsLinesVisual<P extends UnitsLinesProps>(builder: UnitsLinesVisualBuilder<P>): UnitsVisual<P> { - const { defaultProps, createLines, createLocationIterator, getLoci, mark, setUpdateState } = builder + const { defaultProps, createGeometry, createLocationIterator, getLoci, mark, setUpdateState } = builder const updateState = VisualUpdateState.create() let renderObject: LinesRenderObject | undefined @@ -412,7 +401,7 @@ export function UnitsLinesVisual<P extends UnitsLinesProps>(builder: UnitsLinesV const unit = group.units[0] currentConformationId = Unit.conformationId(unit) lines = includesUnitKind(currentProps.unitKinds, unit) - ? await createLines(ctx, unit, currentStructure, currentProps, lines) + ? await createGeometry(ctx, unit, currentStructure, currentProps, lines) : Lines.createEmpty(lines) // TODO create empty location iterator when not in unitKinds @@ -454,7 +443,7 @@ export function UnitsLinesVisual<P extends UnitsLinesProps>(builder: UnitsLinesV if (updateState.createGeometry) { lines = includesUnitKind(newProps.unitKinds, unit) - ? await createLines(ctx, unit, currentStructure, newProps, lines) + ? await createGeometry(ctx, unit, currentStructure, newProps, lines) : Lines.createEmpty(lines) ValueCell.update(renderObject.values.drawCount, lines.lineCount * 2 * 3) updateState.updateColor = true @@ -533,22 +522,14 @@ export function UnitsLinesVisual<P extends UnitsLinesProps>(builder: UnitsLinesV export const UnitsDirectVolumeParams = { ...StructureDirectVolumeParams, - unitKinds: MultiSelectParam<UnitKind>('Unit Kind', '', [ 'atomic', 'spheres' ], UnitKindOptions), + ...UnitsParams, } export const DefaultUnitsDirectVolumeProps = paramDefaultValues(UnitsDirectVolumeParams) export type UnitsDirectVolumeProps = typeof DefaultUnitsDirectVolumeProps - -export interface UnitsDirectVolumeVisualBuilder<P extends UnitsDirectVolumeProps> { - defaultProps: P - createDirectVolume(ctx: RuntimeContext, unit: Unit, structure: Structure, props: P, directVolume?: DirectVolume2d): Promise<DirectVolume2d> - createLocationIterator(group: Unit.SymmetryGroup): LocationIterator - getLoci(pickingId: PickingId, group: Unit.SymmetryGroup, id: number): Loci - mark(loci: Loci, group: Unit.SymmetryGroup, apply: (interval: Interval) => boolean): boolean - setUpdateState(state: VisualUpdateState, newProps: P, currentProps: P): void -} +export interface UnitsDirectVolumeVisualBuilder<P extends UnitsDirectVolumeProps> extends UnitsVisualBuilder<P, DirectVolume2d> { } export function UnitsDirectVolumeVisual<P extends UnitsDirectVolumeProps>(builder: UnitsDirectVolumeVisualBuilder<P>): UnitsVisual<P> { - const { defaultProps, createDirectVolume, createLocationIterator, getLoci, setUpdateState } = builder + const { defaultProps, createGeometry, createLocationIterator, getLoci, setUpdateState } = builder const updateState = VisualUpdateState.create() let renderObject: DirectVolume2dRenderObject | undefined @@ -566,7 +547,7 @@ export function UnitsDirectVolumeVisual<P extends UnitsDirectVolumeProps>(builde const unit = group.units[0] currentConformationId = Unit.conformationId(unit) directVolume = includesUnitKind(currentProps.unitKinds, unit) - ? await createDirectVolume(ctx, unit, currentStructure, currentProps, directVolume) + ? await createGeometry(ctx, unit, currentStructure, currentProps, directVolume) : DirectVolume2d.createEmpty(directVolume) // TODO create empty location iterator when not in unitKinds @@ -608,7 +589,7 @@ export function UnitsDirectVolumeVisual<P extends UnitsDirectVolumeProps>(builde if (updateState.createGeometry) { directVolume = includesUnitKind(newProps.unitKinds, unit) - ? await createDirectVolume(ctx, unit, currentStructure, newProps, directVolume) + ? await createGeometry(ctx, unit, currentStructure, newProps, directVolume) : DirectVolume2d.createEmpty(directVolume) updateState.updateColor = true } diff --git a/src/mol-geo/representation/structure/visual/element-point.ts b/src/mol-geo/representation/structure/visual/element-point.ts index 76b471b83d66e71d997001b8b1d8d9348d625d51..e6fd797016cc0d882892cf49f4d73ed3e4545aef 100644 --- a/src/mol-geo/representation/structure/visual/element-point.ts +++ b/src/mol-geo/representation/structure/visual/element-point.ts @@ -48,7 +48,7 @@ export async function createElementPoint(ctx: RuntimeContext, unit: Unit, struct export function ElementPointVisual(): UnitsVisual<ElementPointProps> { return UnitsPointsVisual<ElementPointProps>({ defaultProps: DefaultElementPointProps, - createPoints: createElementPoint, + createGeometry: createElementPoint, createLocationIterator: StructureElementIterator.fromGroup, getLoci: getElementLoci, mark: markElement, diff --git a/src/mol-geo/representation/structure/visual/element-sphere.ts b/src/mol-geo/representation/structure/visual/element-sphere.ts index e822105264c6ac5d9fa43fa68f6b20c307813750..5913a0e4a64dd7f8e238dde5a2fcb16b49c86e18 100644 --- a/src/mol-geo/representation/structure/visual/element-sphere.ts +++ b/src/mol-geo/representation/structure/visual/element-sphere.ts @@ -24,7 +24,7 @@ export type ElementSphereProps = typeof DefaultElementSphereProps export function ElementSphereVisual(): UnitsVisual<ElementSphereProps> { return UnitsMeshVisual<ElementSphereProps>({ defaultProps: DefaultElementSphereProps, - createMesh: createElementSphereMesh, + createGeometry: createElementSphereMesh, createLocationIterator: StructureElementIterator.fromGroup, getLoci: getElementLoci, mark: markElement, diff --git a/src/mol-geo/representation/structure/visual/gaussian-density-point.ts b/src/mol-geo/representation/structure/visual/gaussian-density-point.ts index a096d4760510eb48594227d4c70a59dca5adf842..ed7254ae3adebbe7fcb8eeade9bdfe3af2bfbfdb 100644 --- a/src/mol-geo/representation/structure/visual/gaussian-density-point.ts +++ b/src/mol-geo/representation/structure/visual/gaussian-density-point.ts @@ -60,7 +60,7 @@ export async function createGaussianDensityPoint(ctx: RuntimeContext, unit: Unit export function GaussianDensityPointVisual(): UnitsVisual<GaussianDensityPointProps> { return UnitsPointsVisual<GaussianDensityPointProps>({ defaultProps: DefaultGaussianDensityPointProps, - createPoints: createGaussianDensityPoint, + createGeometry: createGaussianDensityPoint, createLocationIterator: StructureElementIterator.fromGroup, getLoci: () => EmptyLoci, mark: () => false, diff --git a/src/mol-geo/representation/structure/visual/gaussian-density-volume.ts b/src/mol-geo/representation/structure/visual/gaussian-density-volume.ts index d8a42b9b7c70c70bf96c69f466b4d2551d21fd03..5f59467b42aaa9ae7c8a48e690a2402893795240 100644 --- a/src/mol-geo/representation/structure/visual/gaussian-density-volume.ts +++ b/src/mol-geo/representation/structure/visual/gaussian-density-volume.ts @@ -59,7 +59,7 @@ export type GaussianDensityVolumeProps = typeof DefaultGaussianDensityVolumeProp export function GaussianDensityVolumeVisual(): UnitsVisual<GaussianDensityVolumeProps> { return UnitsDirectVolumeVisual<GaussianDensityVolumeProps>({ defaultProps: DefaultGaussianDensityVolumeProps, - createDirectVolume: createGaussianDensityVolume, + createGeometry: createGaussianDensityVolume, createLocationIterator: StructureElementIterator.fromGroup, getLoci: getElementLoci, mark: markElement, diff --git a/src/mol-geo/representation/structure/visual/gaussian-surface-mesh.ts b/src/mol-geo/representation/structure/visual/gaussian-surface-mesh.ts index d15b9fe3fe118c58ff7df4d16d4ca3150653db6c..99ef1b785901dafffd99f7a3a953b1ac7963cb53 100644 --- a/src/mol-geo/representation/structure/visual/gaussian-surface-mesh.ts +++ b/src/mol-geo/representation/structure/visual/gaussian-surface-mesh.ts @@ -84,7 +84,7 @@ export type GaussianSurfaceProps = typeof DefaultGaussianSurfaceProps export function GaussianSurfaceVisual(): UnitsVisual<GaussianSurfaceProps> { return UnitsMeshVisual<GaussianSurfaceProps>({ defaultProps: DefaultGaussianSurfaceProps, - createMesh: createGaussianSurfaceMesh, + createGeometry: createGaussianSurfaceMesh, createLocationIterator: StructureElementIterator.fromGroup, getLoci: getElementLoci, mark: markElement, diff --git a/src/mol-geo/representation/structure/visual/gaussian-surface-wireframe.ts b/src/mol-geo/representation/structure/visual/gaussian-surface-wireframe.ts index fe336e779858d09caec284ae7679abd770e97fb7..f14369d6f7aace9d77f1fd021d8d53fd4e0e25a9 100644 --- a/src/mol-geo/representation/structure/visual/gaussian-surface-wireframe.ts +++ b/src/mol-geo/representation/structure/visual/gaussian-surface-wireframe.ts @@ -44,7 +44,7 @@ export type GaussianWireframeProps = typeof DefaultGaussianWireframeProps export function GaussianWireframeVisual(): UnitsVisual<GaussianWireframeProps> { return UnitsLinesVisual<GaussianWireframeProps>({ defaultProps: DefaultGaussianWireframeProps, - createLines: createGaussianWireframe, + createGeometry: createGaussianWireframe, createLocationIterator: StructureElementIterator.fromGroup, getLoci: getElementLoci, mark: markElement, diff --git a/src/mol-geo/representation/structure/visual/intra-unit-link-cylinder.ts b/src/mol-geo/representation/structure/visual/intra-unit-link-cylinder.ts index 417c33d57fcbd8abca783d3118ef24e99d18c75e..005799c8189e223b89800cc327a7049dc35da9fd 100644 --- a/src/mol-geo/representation/structure/visual/intra-unit-link-cylinder.ts +++ b/src/mol-geo/representation/structure/visual/intra-unit-link-cylinder.ts @@ -76,7 +76,7 @@ export type IntraUnitLinkProps = typeof DefaultIntraUnitLinkProps export function IntraUnitLinkVisual(): UnitsVisual<IntraUnitLinkProps> { return UnitsMeshVisual<IntraUnitLinkProps>({ defaultProps: DefaultIntraUnitLinkProps, - createMesh: createIntraUnitLinkCylinderMesh, + createGeometry: createIntraUnitLinkCylinderMesh, createLocationIterator: LinkIterator.fromGroup, getLoci: getLinkLoci, mark: markLink, diff --git a/src/mol-geo/representation/structure/visual/nucleotide-block-mesh.ts b/src/mol-geo/representation/structure/visual/nucleotide-block-mesh.ts index f29a9a3e772d6c72d18b76087e3efd9c9a3f31af..5e778b020dc8c656cc944c2a5735ec216a5e730d 100644 --- a/src/mol-geo/representation/structure/visual/nucleotide-block-mesh.ts +++ b/src/mol-geo/representation/structure/visual/nucleotide-block-mesh.ts @@ -120,7 +120,7 @@ export type NucleotideBlockProps = typeof DefaultNucleotideBlockProps export function NucleotideBlockVisual(): UnitsVisual<NucleotideBlockProps> { return UnitsMeshVisual<NucleotideBlockProps>({ defaultProps: DefaultNucleotideBlockProps, - createMesh: createNucleotideBlockMesh, + createGeometry: createNucleotideBlockMesh, createLocationIterator: NucleotideLocationIterator.fromGroup, getLoci: getNucleotideElementLoci, mark: markNucleotideElement, diff --git a/src/mol-geo/representation/structure/visual/polymer-backbone-cylinder.ts b/src/mol-geo/representation/structure/visual/polymer-backbone-cylinder.ts index e5cbd038cdaf789fd3d1bb0291ab1ee9b92ad5c3..50aea2a8b80e9815a537986803aafeb3b54b4d71 100644 --- a/src/mol-geo/representation/structure/visual/polymer-backbone-cylinder.ts +++ b/src/mol-geo/representation/structure/visual/polymer-backbone-cylinder.ts @@ -77,7 +77,7 @@ export type PolymerBackboneProps = typeof DefaultPolymerBackboneProps export function PolymerBackboneVisual(): UnitsVisual<PolymerBackboneProps> { return UnitsMeshVisual<PolymerBackboneProps>({ defaultProps: DefaultPolymerBackboneProps, - createMesh: createPolymerBackboneCylinderMesh, + createGeometry: createPolymerBackboneCylinderMesh, // TODO create a specialized location iterator createLocationIterator: StructureElementIterator.fromGroup, getLoci: getElementLoci, diff --git a/src/mol-geo/representation/structure/visual/polymer-direction-wedge.ts b/src/mol-geo/representation/structure/visual/polymer-direction-wedge.ts index 99f02d120f74fc912961ffabfa53eb9c62902693..cce1eb9b6c33c0755a32db30f5ebac881d3e23aa 100644 --- a/src/mol-geo/representation/structure/visual/polymer-direction-wedge.ts +++ b/src/mol-geo/representation/structure/visual/polymer-direction-wedge.ts @@ -99,7 +99,7 @@ export type PolymerDirectionProps = typeof DefaultPolymerDirectionProps export function PolymerDirectionVisual(): UnitsVisual<PolymerDirectionProps> { return UnitsMeshVisual<PolymerDirectionProps>({ defaultProps: DefaultPolymerDirectionProps, - createMesh: createPolymerDirectionWedgeMesh, + createGeometry: createPolymerDirectionWedgeMesh, createLocationIterator: PolymerLocationIterator.fromGroup, getLoci: getPolymerElementLoci, mark: markPolymerElement, diff --git a/src/mol-geo/representation/structure/visual/polymer-gap-cylinder.ts b/src/mol-geo/representation/structure/visual/polymer-gap-cylinder.ts index aebd1c37da3ceb6dbe1bdc98c68bbd4bdc8ff6f6..e8b3a62b6151dd89001ad3a1b6246c3d08a7fb01 100644 --- a/src/mol-geo/representation/structure/visual/polymer-gap-cylinder.ts +++ b/src/mol-geo/representation/structure/visual/polymer-gap-cylinder.ts @@ -97,7 +97,7 @@ export type PolymerGapProps = typeof DefaultPolymerGapProps export function PolymerGapVisual(): UnitsVisual<PolymerGapProps> { return UnitsMeshVisual<PolymerGapProps>({ defaultProps: DefaultPolymerGapProps, - createMesh: createPolymerGapCylinderMesh, + createGeometry: createPolymerGapCylinderMesh, createLocationIterator: PolymerGapLocationIterator.fromGroup, getLoci: getPolymerGapElementLoci, mark: markPolymerGapElement, diff --git a/src/mol-geo/representation/structure/visual/polymer-trace-mesh.ts b/src/mol-geo/representation/structure/visual/polymer-trace-mesh.ts index a3d6e7b98b0f1a78ad33ee535a22b7af0dba8e7f..e5380b1bfaf50a749431485aa8dc0e32baed1553 100644 --- a/src/mol-geo/representation/structure/visual/polymer-trace-mesh.ts +++ b/src/mol-geo/representation/structure/visual/polymer-trace-mesh.ts @@ -98,7 +98,7 @@ export type PolymerTraceProps = typeof DefaultPolymerTraceProps export function PolymerTraceVisual(): UnitsVisual<PolymerTraceProps> { return UnitsMeshVisual<PolymerTraceProps>({ defaultProps: DefaultPolymerTraceProps, - createMesh: createPolymerTraceMesh, + createGeometry: createPolymerTraceMesh, createLocationIterator: PolymerLocationIterator.fromGroup, getLoci: getPolymerElementLoci, mark: markPolymerElement,