UNPKG

molstar

Version:

A comprehensive macromolecular library.

176 lines (175 loc) 8.56 kB
/** * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ import { ParamDefinition as PD } from '../../mol-util/param-definition'; import { Volume } from '../../mol-model/volume'; import { RuntimeContext } from '../../mol-task'; import { WebGLContext } from '../../mol-gl/webgl/context'; import { DirectVolume } from '../../mol-geo/geometry/direct-volume/direct-volume'; import { VisualContext } from '../visual'; import { Theme, ThemeRegistryContext } from '../../mol-theme/theme'; import { VolumeVisual, VolumeRepresentation, VolumeRepresentationProvider } from './representation'; import { RepresentationContext, RepresentationParamsGetter } from '../representation'; import { Interval } from '../../mol-data/int'; import { Loci } from '../../mol-model/loci'; import { PickingId } from '../../mol-geo/geometry/picking'; export declare function createDirectVolume2d(ctx: RuntimeContext, webgl: WebGLContext, volume: Volume, directVolume?: DirectVolume): DirectVolume; export declare function createDirectVolume3d(ctx: RuntimeContext, webgl: WebGLContext, volume: Volume, directVolume?: DirectVolume): DirectVolume; export declare function createDirectVolume(ctx: VisualContext, volume: Volume, theme: Theme, props: PD.Values<DirectVolumeParams>, directVolume?: DirectVolume): Promise<DirectVolume>; export declare function getDirectVolumeLoci(pickingId: PickingId, volume: Volume, props: DirectVolumeProps, id: number): { kind: "empty-loci"; } | Volume.Cell.Loci; export declare function eachDirectVolume(loci: Loci, volume: Volume, props: DirectVolumeProps, apply: (interval: Interval) => boolean): boolean; export declare const DirectVolumeParams: { quality: { isEssential: boolean; type: "select"; options: readonly (readonly ["custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest", string] | readonly ["custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest", string, string | undefined])[]; cycle?: boolean | undefined; isOptional?: boolean | undefined; defaultValue: "custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest"; label?: string | undefined; description?: string | undefined; legend?: import("../../mol-util/legend").Legend | undefined; fieldLabels?: { [name: string]: string; } | undefined; isHidden?: boolean | undefined; shortLabel?: boolean | undefined; twoColumns?: boolean | undefined; category?: string | undefined; hideIf?: ((currentGroup: any) => boolean) | undefined; help?: ((value: any) => { description?: string | undefined; legend?: import("../../mol-util/legend").Legend | undefined; }) | undefined; }; doubleSided: PD.BooleanParam; flipSided: PD.BooleanParam; flatShaded: PD.BooleanParam; ignoreLight: PD.BooleanParam; xrayShaded: PD.BooleanParam; renderMode: PD.Mapped<PD.NamedParams<PD.Normalize<{ controlPoints: import("../../mol-math/linear-algebra/3d/vec2").Vec2[]; list: { kind: "set" | "interpolate"; colors: import("../../mol-util/color/color").ColorListEntry[]; }; }>, "volume"> | PD.NamedParams<PD.Normalize<{ isoValue: Readonly<{ kind: "absolute"; absoluteValue: number; }> | Readonly<{ kind: "relative"; relativeValue: number; }>; singleLayer: boolean; }>, "isosurface">>; stepsPerCell: PD.Numeric; jumpLength: PD.Numeric; alpha: PD.Numeric; }; export declare type DirectVolumeParams = typeof DirectVolumeParams; export declare function getDirectVolumeParams(ctx: ThemeRegistryContext, volume: Volume): { quality: { isEssential: boolean; type: "select"; options: readonly (readonly ["custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest", string] | readonly ["custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest", string, string | undefined])[]; cycle?: boolean | undefined; isOptional?: boolean | undefined; defaultValue: "custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest"; label?: string | undefined; description?: string | undefined; legend?: import("../../mol-util/legend").Legend | undefined; fieldLabels?: { [name: string]: string; } | undefined; isHidden?: boolean | undefined; shortLabel?: boolean | undefined; twoColumns?: boolean | undefined; category?: string | undefined; hideIf?: ((currentGroup: any) => boolean) | undefined; help?: ((value: any) => { description?: string | undefined; legend?: import("../../mol-util/legend").Legend | undefined; }) | undefined; }; doubleSided: PD.BooleanParam; flipSided: PD.BooleanParam; flatShaded: PD.BooleanParam; ignoreLight: PD.BooleanParam; xrayShaded: PD.BooleanParam; renderMode: PD.Mapped<PD.NamedParams<PD.Normalize<{ controlPoints: import("../../mol-math/linear-algebra/3d/vec2").Vec2[]; list: { kind: "set" | "interpolate"; colors: import("../../mol-util/color/color").ColorListEntry[]; }; }>, "volume"> | PD.NamedParams<PD.Normalize<{ isoValue: Readonly<{ kind: "absolute"; absoluteValue: number; }> | Readonly<{ kind: "relative"; relativeValue: number; }>; singleLayer: boolean; }>, "isosurface">>; stepsPerCell: PD.Numeric; jumpLength: PD.Numeric; alpha: PD.Numeric; }; export declare type DirectVolumeProps = PD.Values<DirectVolumeParams>; export declare function DirectVolumeVisual(materialId: number): VolumeVisual<DirectVolumeParams>; export declare function DirectVolumeRepresentation(ctx: RepresentationContext, getParams: RepresentationParamsGetter<Volume, DirectVolumeParams>): VolumeRepresentation<DirectVolumeParams>; export declare const DirectVolumeRepresentationProvider: VolumeRepresentationProvider<{ quality: { isEssential: boolean; type: "select"; options: readonly (readonly ["custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest", string] | readonly ["custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest", string, string | undefined])[]; cycle?: boolean | undefined; isOptional?: boolean | undefined; defaultValue: "custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest"; label?: string | undefined; description?: string | undefined; legend?: import("../../mol-util/legend").Legend | undefined; fieldLabels?: { [name: string]: string; } | undefined; isHidden?: boolean | undefined; shortLabel?: boolean | undefined; twoColumns?: boolean | undefined; category?: string | undefined; hideIf?: ((currentGroup: any) => boolean) | undefined; help?: ((value: any) => { description?: string | undefined; legend?: import("../../mol-util/legend").Legend | undefined; }) | undefined; }; doubleSided: PD.BooleanParam; flipSided: PD.BooleanParam; flatShaded: PD.BooleanParam; ignoreLight: PD.BooleanParam; xrayShaded: PD.BooleanParam; renderMode: PD.Mapped<PD.NamedParams<PD.Normalize<{ controlPoints: import("../../mol-math/linear-algebra/3d/vec2").Vec2[]; list: { kind: "set" | "interpolate"; colors: import("../../mol-util/color/color").ColorListEntry[]; }; }>, "volume"> | PD.NamedParams<PD.Normalize<{ isoValue: Readonly<{ kind: "absolute"; absoluteValue: number; }> | Readonly<{ kind: "relative"; relativeValue: number; }>; singleLayer: boolean; }>, "isosurface">>; stepsPerCell: PD.Numeric; jumpLength: PD.Numeric; alpha: PD.Numeric; }, "direct-volume">;