context.ts 616 B

12345678910111213141516171819202122232425262728
  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 { BehaviorSubject } from 'rxjs';
  7. import { UUID } from 'mol-util'
  8. import { AnyEntity } from './entity';
  9. import Viewer from '../viewer';
  10. import { Progress } from 'mol-task';
  11. // TODO
  12. export type StateTree = {}
  13. export class StateContext {
  14. id = UUID.create()
  15. change = new BehaviorSubject(0)
  16. tree: StateTree = {}
  17. entities: Set<AnyEntity> = new Set()
  18. viewer: Viewer
  19. constructor(readonly log: (p: Progress) => void) {
  20. }
  21. }