UNPKG

molstar

Version:

A comprehensive macromolecular library.

36 lines (35 loc) 1.76 kB
/** * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> * @author David Sehnal <david.sehnal@gmail.com> */ import { ValueCell } from '../../mol-util'; import { TextureImage } from '../../mol-gl/renderable/util'; import { Color } from '../../mol-util/color'; import { Vec2, Vec3, Vec4 } from '../../mol-math/linear-algebra'; import { LocationIterator } from '../util/location-iterator'; import { ColorTheme } from '../../mol-theme/color'; import { Texture } from '../../mol-gl/webgl/texture'; export declare type ColorType = 'uniform' | 'instance' | 'group' | 'groupInstance' | 'vertex' | 'vertexInstance' | 'volume' | 'volumeInstance'; export declare type ColorData = { uColor: ValueCell<Vec3>; tColor: ValueCell<TextureImage<Uint8Array>>; tColorGrid: ValueCell<Texture>; tPalette: ValueCell<TextureImage<Uint8Array>>; uColorTexDim: ValueCell<Vec2>; uColorGridDim: ValueCell<Vec3>; uColorGridTransform: ValueCell<Vec4>; dColorType: ValueCell<string>; dUsePalette: ValueCell<boolean>; }; export declare function createColors(locationIt: LocationIterator, positionIt: LocationIterator, colorTheme: ColorTheme<any>, colorData?: ColorData): ColorData; export declare function createValueColor(value: Color, colorData?: ColorData): ColorData; export declare function createTextureColor(colors: TextureImage<Uint8Array>, type: ColorType, colorData?: ColorData): ColorData; interface ColorVolume { colors: Texture; dimension: Vec3; transform: Vec4; } export declare function createGridColor(grid: ColorVolume, type: ColorType, colorData?: ColorData): ColorData; export {};