params.ts 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 { Cylinders } from '../../mol-geo/geometry/cylinders/cylinders';
  13. import { Text } from '../../mol-geo/geometry/text/text';
  14. import { TextureMesh } from '../../mol-geo/geometry/texture-mesh/texture-mesh';
  15. import { ParamDefinition as PD } from '../../mol-util/param-definition';
  16. import { UnitKind, UnitKindOptions } from './visual/util/common';
  17. export function getUnitKindsParam(defaultValue: UnitKind[]) {
  18. return PD.MultiSelect<UnitKind>(defaultValue, UnitKindOptions, { description: 'For which kinds of units/chains to show the representation visuals.' });
  19. }
  20. export const StructureParams = {
  21. unitKinds: getUnitKindsParam(['atomic', 'spheres']),
  22. };
  23. export type StructureParams = typeof StructureParams
  24. export const StructureMeshParams = { ...Mesh.Params };
  25. export type StructureMeshParams = typeof StructureMeshParams
  26. export const StructureSpheresParams = { ...Spheres.Params };
  27. export type StructureSpheresParams = typeof StructureSpheresParams
  28. export const StructureCylindersParams = { ...Cylinders.Params };
  29. export type StructureCylindersParams = typeof StructureCylindersParams
  30. export const StructurePointsParams = { ...Points.Params };
  31. export type StructurePointsParams = typeof StructurePointsParams
  32. export const StructureLinesParams = { ...Lines.Params };
  33. export type StructureLinesParams = typeof StructureLinesParams
  34. export const StructureTextParams = { ...Text.Params };
  35. export type StructureTextParams = typeof StructureTextParams
  36. export const StructureDirectVolumeParams = { ...DirectVolume.Params };
  37. export type StructureDirectVolumeParams = typeof StructureDirectVolumeParams
  38. export const StructureTextureMeshParams = { ...TextureMesh.Params };
  39. export type StructureTextureMeshParams = typeof StructureTextureMeshParams