Basic implementation of a 3d chromatin renderer. Essentially just wraps THREE.WebGLRenderer but provides semantics for building chromatin visualization.
Important methods:
- addSegments: adding segments of chromatin with unified visual properties (e.g., specified by a grammar)
- buildStructures, buildPart: turns segments with specific visual attributes into THREE primitives
new
ChromatinBasicRenderer(params?: { canvas?: HTMLCanvasElement; alwaysRedraw?: boolean; })
camera: THREE.PerspectiveCamera
composer: EffectComposer
markSegments: DrawableMarkSegment[]
renderer: THREE.WebGLRenderer
scene: THREE.Scene
ssaoPasses: [N8AOPostPass, N8AOPostPass]
addSegments(newSegments: DrawableMarkSegment[]): void
Entrypoint for adding actual data to show
buildLinks(): void
Utility function for building links between marks (optional)
buildPart(segment: DrawableMarkSegment): void
Turns a singular segment (ie, position+mark+attributes) into THREEjs objects for rendering
buildStructures(): void
Turns all drawable segments into THREE objects to be rendered
endDrawing(): void
render(): void
resizeRendererToDisplaySize(renderer: THREE.WebGLRenderer): boolean
startDrawing(): void
updateViewConfig(): void
Meant to be called directly from client (eg, Observable notebook) to request redraw