Skip to main content

Library for visualization of 3D genomic data.

This package works with BrowsersIt is unknown whether this package works with Cloudflare Workers, Deno, Bun
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
94%
Published
4 months ago (0.0.10)
class ChromatinBasicRenderer

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

Constructors

new
ChromatinBasicRenderer(params?: { canvas?: HTMLCanvasElement; alwaysRedraw?: boolean; })

Properties

camera: THREE.PerspectiveCamera
composer: EffectComposer
markSegments: DrawableMarkSegment[]
renderer: THREE.WebGLRenderer
scene: THREE.Scene
ssaoPasses: [N8AOPostPass, N8AOPostPass]

Methods

addSegments(newSegments: DrawableMarkSegment[]): void

Entrypoint for adding actual data to show

buildPart(segment: DrawableMarkSegment): void

Turns a singular segment (ie, position+mark+attributes) into THREEjs objects for rendering

Turns all drawable segments into THREE objects to be rendered

endDrawing(): void
render(): void
resizeRendererToDisplaySize(renderer: THREE.WebGLRenderer): boolean

Meant to be called directly from client (eg, Observable notebook) to request redraw

Add Package

deno add jsr:@chromospace/chromospace

Import symbol

import { ChromatinBasicRenderer } from "@chromospace/chromospace";

---- OR ----

Import directly with a jsr specifier

import { ChromatinBasicRenderer } from "jsr:@chromospace/chromospace";

Add Package

bunx jsr add @chromospace/chromospace

Import symbol

import { ChromatinBasicRenderer } from "@chromospace/chromospace";