molstar
Version:
A comprehensive macromolecular library.
384 lines (383 loc) • 16.1 kB
TypeScript
/**
* Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
import { ParamDefinition as PD } from '../../mol-util/param-definition';
import { Volume } from '../../mol-model/volume';
import { VisualContext } from '../visual';
import { Theme, ThemeRegistryContext } from '../../mol-theme/theme';
import { Mesh } from '../../mol-geo/geometry/mesh/mesh';
import { VolumeVisual, VolumeRepresentation, VolumeRepresentationProvider } from './representation';
import { Lines } from '../../mol-geo/geometry/lines/lines';
import { RepresentationContext, RepresentationParamsGetter } from '../representation';
import { Loci } from '../../mol-model/loci';
import { Interval } from '../../mol-data/int';
import { WebGLContext } from '../../mol-gl/webgl/context';
export declare const VolumeIsosurfaceParams: {
isoValue: PD.Conditioned<Readonly<{
kind: "absolute";
absoluteValue: number;
}> | Readonly<{
kind: "relative";
relativeValue: number;
}>, PD.Base<Readonly<{
kind: "absolute";
absoluteValue: number;
}> | Readonly<{
kind: "relative";
relativeValue: number;
}>>, {
absolute: PD.Converted<Readonly<{
kind: "absolute";
absoluteValue: number;
}>, number>;
relative: PD.Converted<Readonly<{
kind: "relative";
relativeValue: number;
}>, number>;
}>;
};
export declare type VolumeIsosurfaceParams = typeof VolumeIsosurfaceParams;
export declare type VolumeIsosurfaceProps = PD.Values<VolumeIsosurfaceParams>;
export declare function IsosurfaceVisual(materialId: number, volume: Volume, props: PD.Values<IsosurfaceMeshParams>, webgl?: WebGLContext): VolumeVisual<{
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;
};
tryUseGpu: PD.BooleanParam;
isoValue: PD.Conditioned<Readonly<{
kind: "absolute";
absoluteValue: number;
}> | Readonly<{
kind: "relative";
relativeValue: number;
}>, PD.Base<Readonly<{
kind: "absolute";
absoluteValue: number;
}> | Readonly<{
kind: "relative";
relativeValue: number;
}>>, {
absolute: PD.Converted<Readonly<{
kind: "absolute";
absoluteValue: number;
}>, number>;
relative: PD.Converted<Readonly<{
kind: "relative";
relativeValue: number;
}>, number>;
}>;
doubleSided: PD.BooleanParam;
flipSided: PD.BooleanParam;
flatShaded: PD.BooleanParam;
ignoreLight: PD.BooleanParam;
xrayShaded: PD.BooleanParam;
alpha: PD.Numeric;
}>;
export declare function eachIsosurface(loci: Loci, volume: Volume, props: VolumeIsosurfaceProps, apply: (interval: Interval) => boolean): boolean;
export declare function createVolumeIsosurfaceMesh(ctx: VisualContext, volume: Volume, theme: Theme, props: VolumeIsosurfaceProps, mesh?: Mesh): Promise<Mesh>;
export declare const IsosurfaceMeshParams: {
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;
};
tryUseGpu: PD.BooleanParam;
isoValue: PD.Conditioned<Readonly<{
kind: "absolute";
absoluteValue: number;
}> | Readonly<{
kind: "relative";
relativeValue: number;
}>, PD.Base<Readonly<{
kind: "absolute";
absoluteValue: number;
}> | Readonly<{
kind: "relative";
relativeValue: number;
}>>, {
absolute: PD.Converted<Readonly<{
kind: "absolute";
absoluteValue: number;
}>, number>;
relative: PD.Converted<Readonly<{
kind: "relative";
relativeValue: number;
}>, number>;
}>;
doubleSided: PD.BooleanParam;
flipSided: PD.BooleanParam;
flatShaded: PD.BooleanParam;
ignoreLight: PD.BooleanParam;
xrayShaded: PD.BooleanParam;
alpha: PD.Numeric;
};
export declare type IsosurfaceMeshParams = typeof IsosurfaceMeshParams;
export declare function IsosurfaceMeshVisual(materialId: number): VolumeVisual<IsosurfaceMeshParams>;
export declare function IsosurfaceTextureMeshVisual(materialId: number): VolumeVisual<IsosurfaceMeshParams>;
export declare function createVolumeIsosurfaceWireframe(ctx: VisualContext, volume: Volume, theme: Theme, props: VolumeIsosurfaceProps, lines?: Lines): Promise<Lines>;
export declare const IsosurfaceWireframeParams: {
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;
};
sizeFactor: PD.Numeric;
isoValue: PD.Conditioned<Readonly<{
kind: "absolute";
absoluteValue: number;
}> | Readonly<{
kind: "relative";
relativeValue: number;
}>, PD.Base<Readonly<{
kind: "absolute";
absoluteValue: number;
}> | Readonly<{
kind: "relative";
relativeValue: number;
}>>, {
absolute: PD.Converted<Readonly<{
kind: "absolute";
absoluteValue: number;
}>, number>;
relative: PD.Converted<Readonly<{
kind: "relative";
relativeValue: number;
}>, number>;
}>;
lineSizeAttenuation: PD.BooleanParam;
alpha: PD.Numeric;
};
export declare type IsosurfaceWireframeParams = typeof IsosurfaceWireframeParams;
export declare function IsosurfaceWireframeVisual(materialId: number): VolumeVisual<IsosurfaceWireframeParams>;
export declare const IsosurfaceParams: {
visuals: PD.MultiSelect<"wireframe" | "solid">;
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;
};
sizeFactor: PD.Numeric;
isoValue: PD.Conditioned<Readonly<{
kind: "absolute";
absoluteValue: number;
}> | Readonly<{
kind: "relative";
relativeValue: number;
}>, PD.Base<Readonly<{
kind: "absolute";
absoluteValue: number;
}> | Readonly<{
kind: "relative";
relativeValue: number;
}>>, {
absolute: PD.Converted<Readonly<{
kind: "absolute";
absoluteValue: number;
}>, number>;
relative: PD.Converted<Readonly<{
kind: "relative";
relativeValue: number;
}>, number>;
}>;
lineSizeAttenuation: PD.BooleanParam;
alpha: PD.Numeric;
tryUseGpu: PD.BooleanParam;
doubleSided: PD.BooleanParam;
flipSided: PD.BooleanParam;
flatShaded: PD.BooleanParam;
ignoreLight: PD.BooleanParam;
xrayShaded: PD.BooleanParam;
};
export declare type IsosurfaceParams = typeof IsosurfaceParams;
export declare function getIsosurfaceParams(ctx: ThemeRegistryContext, volume: Volume): {
visuals: PD.MultiSelect<"wireframe" | "solid">;
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;
};
sizeFactor: PD.Numeric;
isoValue: PD.Conditioned<Readonly<{
kind: "absolute";
absoluteValue: number;
}> | Readonly<{
kind: "relative";
relativeValue: number;
}>, PD.Base<Readonly<{
kind: "absolute";
absoluteValue: number;
}> | Readonly<{
kind: "relative";
relativeValue: number;
}>>, {
absolute: PD.Converted<Readonly<{
kind: "absolute";
absoluteValue: number;
}>, number>;
relative: PD.Converted<Readonly<{
kind: "relative";
relativeValue: number;
}>, number>;
}>;
lineSizeAttenuation: PD.BooleanParam;
alpha: PD.Numeric;
tryUseGpu: PD.BooleanParam;
doubleSided: PD.BooleanParam;
flipSided: PD.BooleanParam;
flatShaded: PD.BooleanParam;
ignoreLight: PD.BooleanParam;
xrayShaded: PD.BooleanParam;
};
export declare type IsosurfaceRepresentation = VolumeRepresentation<IsosurfaceParams>;
export declare function IsosurfaceRepresentation(ctx: RepresentationContext, getParams: RepresentationParamsGetter<Volume, IsosurfaceParams>): IsosurfaceRepresentation;
export declare const IsosurfaceRepresentationProvider: VolumeRepresentationProvider<{
visuals: PD.MultiSelect<"wireframe" | "solid">;
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;
};
sizeFactor: PD.Numeric;
isoValue: PD.Conditioned<Readonly<{
kind: "absolute";
absoluteValue: number;
}> | Readonly<{
kind: "relative";
relativeValue: number;
}>, PD.Base<Readonly<{
kind: "absolute";
absoluteValue: number;
}> | Readonly<{
kind: "relative";
relativeValue: number;
}>>, {
absolute: PD.Converted<Readonly<{
kind: "absolute";
absoluteValue: number;
}>, number>;
relative: PD.Converted<Readonly<{
kind: "relative";
relativeValue: number;
}>, number>;
}>;
lineSizeAttenuation: PD.BooleanParam;
alpha: PD.Numeric;
tryUseGpu: PD.BooleanParam;
doubleSided: PD.BooleanParam;
flipSided: PD.BooleanParam;
flatShaded: PD.BooleanParam;
ignoreLight: PD.BooleanParam;
xrayShaded: PD.BooleanParam;
}, "isosurface">;