molstar
Version:
A comprehensive macromolecular library.
52 lines (51 loc) • 2.12 kB
TypeScript
/**
* Copyright (c) 2019-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
import { ValueCell } from '../../../mol-util';
import { Sphere3D } from '../../../mol-math/geometry';
import { ParamDefinition as PD } from '../../../mol-util/param-definition';
import { GeometryUtils } from '../geometry';
import { Texture } from '../../../mol-gl/webgl/texture';
import { Vec2 } from '../../../mol-math/linear-algebra';
export interface TextureMesh {
readonly kind: 'texture-mesh';
/** Number of vertices in the texture-mesh */
vertexCount: number;
/** Number of groups in the texture-mesh */
groupCount: number;
readonly geoTextureDim: ValueCell<Vec2>;
readonly vertexTexture: ValueCell<Texture>;
readonly groupTexture: ValueCell<Texture>;
readonly normalTexture: ValueCell<Texture>;
readonly doubleBuffer: TextureMesh.DoubleBuffer;
readonly boundingSphere: Sphere3D;
meta?: unknown;
}
export declare namespace TextureMesh {
class DoubleBuffer {
private index;
private textures;
get(): {
vertex: Texture;
group: Texture;
normal: Texture;
} | undefined;
set(vertex: Texture, group: Texture, normal: Texture): void;
destroy(): void;
}
function create(vertexCount: number, groupCount: number, vertexTexture: Texture, groupTexture: Texture, normalTexture: Texture, boundingSphere: Sphere3D, textureMesh?: TextureMesh): TextureMesh;
function createEmpty(textureMesh?: TextureMesh): TextureMesh;
const Params: {
doubleSided: PD.BooleanParam;
flipSided: PD.BooleanParam;
flatShaded: PD.BooleanParam;
ignoreLight: PD.BooleanParam;
xrayShaded: PD.BooleanParam;
alpha: PD.Numeric;
quality: PD.Select<"custom" | "auto" | "highest" | "higher" | "high" | "medium" | "low" | "lower" | "lowest">;
};
type Params = typeof Params;
const Utils: GeometryUtils<TextureMesh, Params>;
}