params.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author Alexander Rose <alexander.rose@weirdbyte.de>
  5. * @author David Sehnal <david.sehnal@gmail.com>
  6. */
  7. import { DirectVolume } from '../../mol-geo/geometry/direct-volume/direct-volume';
  8. import { Lines } from '../../mol-geo/geometry/lines/lines';
  9. import { Mesh } from '../../mol-geo/geometry/mesh/mesh';
  10. import { Points } from '../../mol-geo/geometry/points/points';
  11. import { Spheres } from '../../mol-geo/geometry/spheres/spheres';
  12. import { Text } from '../../mol-geo/geometry/text/text';
  13. import { TextureMesh } from '../../mol-geo/geometry/texture-mesh/texture-mesh';
  14. import { ParamDefinition as PD } from '../../mol-util/param-definition';
  15. import { UnitKind, UnitKindOptions } from './visual/util/common';
  16. export function getUnitKindsParam(defaultValue: UnitKind[]) {
  17. return PD.MultiSelect<UnitKind>(defaultValue, UnitKindOptions, { description: 'For which kinds of units/chains to show the representation visuals.' })
  18. }
  19. export const StructureParams = {
  20. unitKinds: getUnitKindsParam(['atomic', 'spheres']),
  21. }
  22. export type StructureParams = typeof StructureParams
  23. export const StructureMeshParams = { ...Mesh.Params }
  24. export type StructureMeshParams = typeof StructureMeshParams
  25. export const StructureSpheresParams = { ...Spheres.Params }
  26. export type StructureSpheresParams = typeof StructureSpheresParams
  27. export const StructurePointsParams = { ...Points.Params }
  28. export type StructurePointsParams = typeof StructurePointsParams
  29. export const StructureLinesParams = { ...Lines.Params }
  30. export type StructureLinesParams = typeof StructureLinesParams
  31. export const StructureTextParams = { ...Text.Params }
  32. export type StructureTextParams = typeof StructureTextParams
  33. export const StructureDirectVolumeParams = { ...DirectVolume.Params }
  34. export type StructureDirectVolumeParams = typeof StructureDirectVolumeParams
  35. export const StructureTextureMeshParams = { ...TextureMesh.Params }
  36. export type StructureTextureMeshParams = typeof StructureTextureMeshParams