molstar
Version:
A comprehensive macromolecular library.
327 lines (326 loc) • 12.9 kB
TypeScript
/**
* Copyright (c) 2022 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 { 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 { 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 VolumeSegmentParams: {
segments: PD.Converted<number[], string[]>;
};
export type VolumeSegmentParams = typeof VolumeSegmentParams;
export type VolumeSegmentProps = PD.Values<VolumeSegmentParams>;
export declare function SegmentVisual(materialId: number, volume: Volume, key: number, props: PD.Values<SegmentMeshParams>, webgl?: WebGLContext): VolumeVisual<{
quality: {
isEssential: boolean;
type: "select";
options: readonly (readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string] | readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string, string | undefined])[];
cycle?: boolean;
isOptional?: boolean;
defaultValue: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
label?: string;
description?: string;
legend?: import("../../mol-util/legend").Legend;
fieldLabels?: {
[name: string]: string;
};
isHidden?: boolean;
shortLabel?: boolean;
twoColumns?: boolean;
category?: string;
hideIf?: (currentGroup: any) => boolean;
help?: (value: any) => {
description?: string;
legend?: import("../../mol-util/legend").Legend;
};
};
tryUseGpu: PD.BooleanParam;
segments: PD.Converted<number[], string[]>;
doubleSided: PD.BooleanParam;
flipSided: PD.BooleanParam;
flatShaded: PD.BooleanParam;
ignoreLight: PD.BooleanParam;
celShaded: PD.BooleanParam;
xrayShaded: PD.Select<boolean | "inverted">;
transparentBackfaces: PD.Select<"off" | "on" | "opaque">;
bumpFrequency: PD.Numeric;
bumpAmplitude: PD.Numeric;
alpha: PD.Numeric;
material: PD.Group<PD.Normalize<{
metalness: number;
roughness: number;
bumpiness: number;
}>>;
clip: PD.Group<PD.Normalize<{
variant: import("../../mol-util/clip").Clip.Variant;
objects: PD.Normalize<{
type: /*elided*/ any;
invert: /*elided*/ any;
position: /*elided*/ any;
rotation: /*elided*/ any;
scale: /*elided*/ any;
transform: /*elided*/ any;
}>[];
}>>;
emissive: PD.Numeric;
density: PD.Numeric;
instanceGranularity: PD.BooleanParam;
lod: PD.Vec3;
cellSize: PD.Numeric;
batchSize: PD.Numeric;
}>;
export declare function eachSegment(loci: Loci, volume: Volume, key: number, props: VolumeSegmentProps, apply: (interval: Interval) => boolean): boolean;
export declare function createVolumeSegmentMesh(ctx: VisualContext, volume: Volume, key: number, theme: Theme, props: VolumeSegmentProps, mesh?: Mesh): Promise<Mesh>;
export declare const SegmentMeshParams: {
quality: {
isEssential: boolean;
type: "select";
options: readonly (readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string] | readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string, string | undefined])[];
cycle?: boolean;
isOptional?: boolean;
defaultValue: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
label?: string;
description?: string;
legend?: import("../../mol-util/legend").Legend;
fieldLabels?: {
[name: string]: string;
};
isHidden?: boolean;
shortLabel?: boolean;
twoColumns?: boolean;
category?: string;
hideIf?: (currentGroup: any) => boolean;
help?: (value: any) => {
description?: string;
legend?: import("../../mol-util/legend").Legend;
};
};
tryUseGpu: PD.BooleanParam;
segments: PD.Converted<number[], string[]>;
doubleSided: PD.BooleanParam;
flipSided: PD.BooleanParam;
flatShaded: PD.BooleanParam;
ignoreLight: PD.BooleanParam;
celShaded: PD.BooleanParam;
xrayShaded: PD.Select<boolean | "inverted">;
transparentBackfaces: PD.Select<"off" | "on" | "opaque">;
bumpFrequency: PD.Numeric;
bumpAmplitude: PD.Numeric;
alpha: PD.Numeric;
material: PD.Group<PD.Normalize<{
metalness: number;
roughness: number;
bumpiness: number;
}>>;
clip: PD.Group<PD.Normalize<{
variant: import("../../mol-util/clip").Clip.Variant;
objects: PD.Normalize<{
type: /*elided*/ any;
invert: /*elided*/ any;
position: /*elided*/ any;
rotation: /*elided*/ any;
scale: /*elided*/ any;
transform: /*elided*/ any;
}>[];
}>>;
emissive: PD.Numeric;
density: PD.Numeric;
instanceGranularity: PD.BooleanParam;
lod: PD.Vec3;
cellSize: PD.Numeric;
batchSize: PD.Numeric;
};
export type SegmentMeshParams = typeof SegmentMeshParams;
export declare function SegmentMeshVisual(materialId: number): VolumeVisual<SegmentMeshParams>;
export declare function SegmentTextureMeshVisual(materialId: number): VolumeVisual<SegmentMeshParams>;
export declare const SegmentParams: {
visuals: PD.MultiSelect<"segment">;
bumpFrequency: PD.Numeric;
quality: {
isEssential: boolean;
type: "select";
options: readonly (readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string] | readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string, string | undefined])[];
cycle?: boolean;
isOptional?: boolean;
defaultValue: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
label?: string;
description?: string;
legend?: import("../../mol-util/legend").Legend;
fieldLabels?: {
[name: string]: string;
};
isHidden?: boolean;
shortLabel?: boolean;
twoColumns?: boolean;
category?: string;
hideIf?: (currentGroup: any) => boolean;
help?: (value: any) => {
description?: string;
legend?: import("../../mol-util/legend").Legend;
};
};
tryUseGpu: PD.BooleanParam;
segments: PD.Converted<number[], string[]>;
doubleSided: PD.BooleanParam;
flipSided: PD.BooleanParam;
flatShaded: PD.BooleanParam;
ignoreLight: PD.BooleanParam;
celShaded: PD.BooleanParam;
xrayShaded: PD.Select<boolean | "inverted">;
transparentBackfaces: PD.Select<"off" | "on" | "opaque">;
bumpAmplitude: PD.Numeric;
alpha: PD.Numeric;
material: PD.Group<PD.Normalize<{
metalness: number;
roughness: number;
bumpiness: number;
}>>;
clip: PD.Group<PD.Normalize<{
variant: import("../../mol-util/clip").Clip.Variant;
objects: PD.Normalize<{
type: /*elided*/ any;
invert: /*elided*/ any;
position: /*elided*/ any;
rotation: /*elided*/ any;
scale: /*elided*/ any;
transform: /*elided*/ any;
}>[];
}>>;
emissive: PD.Numeric;
density: PD.Numeric;
instanceGranularity: PD.BooleanParam;
lod: PD.Vec3;
cellSize: PD.Numeric;
batchSize: PD.Numeric;
};
export type SegmentParams = typeof SegmentParams;
export declare function getSegmentParams(ctx: ThemeRegistryContext, volume: Volume): {
visuals: PD.MultiSelect<"segment">;
bumpFrequency: PD.Numeric;
quality: {
isEssential: boolean;
type: "select";
options: readonly (readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string] | readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string, string | undefined])[];
cycle?: boolean;
isOptional?: boolean;
defaultValue: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
label?: string;
description?: string;
legend?: import("../../mol-util/legend").Legend;
fieldLabels?: {
[name: string]: string;
};
isHidden?: boolean;
shortLabel?: boolean;
twoColumns?: boolean;
category?: string;
hideIf?: (currentGroup: any) => boolean;
help?: (value: any) => {
description?: string;
legend?: import("../../mol-util/legend").Legend;
};
};
tryUseGpu: PD.BooleanParam;
segments: PD.Converted<number[], string[]>;
doubleSided: PD.BooleanParam;
flipSided: PD.BooleanParam;
flatShaded: PD.BooleanParam;
ignoreLight: PD.BooleanParam;
celShaded: PD.BooleanParam;
xrayShaded: PD.Select<boolean | "inverted">;
transparentBackfaces: PD.Select<"off" | "on" | "opaque">;
bumpAmplitude: PD.Numeric;
alpha: PD.Numeric;
material: PD.Group<PD.Normalize<{
metalness: number;
roughness: number;
bumpiness: number;
}>>;
clip: PD.Group<PD.Normalize<{
variant: import("../../mol-util/clip").Clip.Variant;
objects: PD.Normalize<{
type: /*elided*/ any;
invert: /*elided*/ any;
position: /*elided*/ any;
rotation: /*elided*/ any;
scale: /*elided*/ any;
transform: /*elided*/ any;
}>[];
}>>;
emissive: PD.Numeric;
density: PD.Numeric;
instanceGranularity: PD.BooleanParam;
lod: PD.Vec3;
cellSize: PD.Numeric;
batchSize: PD.Numeric;
};
export type SegmentRepresentation = VolumeRepresentation<SegmentParams>;
export declare function SegmentRepresentation(ctx: RepresentationContext, getParams: RepresentationParamsGetter<Volume, SegmentParams>): SegmentRepresentation;
export declare const SegmentRepresentationProvider: VolumeRepresentationProvider<{
visuals: PD.MultiSelect<"segment">;
bumpFrequency: PD.Numeric;
quality: {
isEssential: boolean;
type: "select";
options: readonly (readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string] | readonly ["auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest", string, string | undefined])[];
cycle?: boolean;
isOptional?: boolean;
defaultValue: "auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest";
label?: string;
description?: string;
legend?: import("../../mol-util/legend").Legend;
fieldLabels?: {
[name: string]: string;
};
isHidden?: boolean;
shortLabel?: boolean;
twoColumns?: boolean;
category?: string;
hideIf?: (currentGroup: any) => boolean;
help?: (value: any) => {
description?: string;
legend?: import("../../mol-util/legend").Legend;
};
};
tryUseGpu: PD.BooleanParam;
segments: PD.Converted<number[], string[]>;
doubleSided: PD.BooleanParam;
flipSided: PD.BooleanParam;
flatShaded: PD.BooleanParam;
ignoreLight: PD.BooleanParam;
celShaded: PD.BooleanParam;
xrayShaded: PD.Select<boolean | "inverted">;
transparentBackfaces: PD.Select<"off" | "on" | "opaque">;
bumpAmplitude: PD.Numeric;
alpha: PD.Numeric;
material: PD.Group<PD.Normalize<{
metalness: number;
roughness: number;
bumpiness: number;
}>>;
clip: PD.Group<PD.Normalize<{
variant: import("../../mol-util/clip").Clip.Variant;
objects: PD.Normalize<{
type: /*elided*/ any;
invert: /*elided*/ any;
position: /*elided*/ any;
rotation: /*elided*/ any;
scale: /*elided*/ any;
transform: /*elided*/ any;
}>[];
}>>;
emissive: PD.Numeric;
density: PD.Numeric;
instanceGranularity: PD.BooleanParam;
lod: PD.Vec3;
cellSize: PD.Numeric;
batchSize: PD.Numeric;
}, "segment">;