index.ts 732 B

123456789101112131415161718192021
  1. /**
  2. * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author Alexander Rose <alexander.rose@weirdbyte.de>
  5. */
  6. import { Task } from 'mol-task'
  7. import { RenderObject } from 'mol-gl/render-object'
  8. import { PickingId } from '../util/picking';
  9. import { Loci } from 'mol-model/loci';
  10. import { FlagAction } from '../util/flag-data';
  11. export interface RepresentationProps {}
  12. export interface Representation<D, P extends RepresentationProps = {}> {
  13. renderObjects: ReadonlyArray<RenderObject>
  14. create: (data: D, props?: P) => Task<void>
  15. update: (props: P) => Task<void>
  16. getLoci: (pickingId: PickingId) => Loci | null
  17. applyFlags: (loci: Loci, action: FlagAction) => void
  18. }