/** * Copyright (c) 2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Ludovic Autin */ import { Mat4 } from '../../../mol-math/linear-algebra.js'; import { Color } from '../../../mol-util/color/index.js'; import { ParamDefinition as PD } from '../../../mol-util/param-definition.js'; import { MolstarSubtree } from '../tree/molstar/molstar-tree.js'; /** The parsed-resource kind a `shape` node sits on, taken from the upstream `parse` node. */ export type ShapeFormat = 'vtp' | 'ply' | 'obj'; /** Create params for the shape representation of a `shape` node. * * These are the params of the format's own shape provider (`createVtpShapeParams` and friends), so * an MVS-loaded shape is the same state object as one opened through the UI and keeps the full * interactive coloring controls. Every value MVS controls is supplied explicitly -- in particular * `colorTheme`/`coloring` is always set, never left to the provider's file-derived default, so the * same MVSJ renders the same way regardless of which arrays the resource happens to contain. */ export declare function shapeRepresentationProps(node: MolstarSubtree<'shape'>, format: ShapeFormat): { colorTheme: PD.NamedParams; alpha: number; clip: PD.Values<{ variant: PD.Select; objects: PD.ObjectList; scale: import("../../../mol-math/linear-algebra.js").Vec3; transform: Mat4; }>>; }> | undefined; } | { coloring: { name: string; params: { color: Color; saturation: number; lightness: number; red?: undefined; green?: undefined; blue?: undefined; }; }; alpha: number; clip: PD.Values<{ variant: PD.Select; objects: PD.ObjectList; scale: import("../../../mol-math/linear-algebra.js").Vec3; transform: Mat4; }>>; }> | undefined; } | { coloring: { name: "material" | "vertex"; params: { red: string; green: string; blue: string; color?: undefined; saturation?: undefined; lightness?: undefined; }; }; alpha: number; clip: PD.Values<{ variant: PD.Select; objects: PD.ObjectList; scale: import("../../../mol-math/linear-algebra.js").Vec3; transform: Mat4; }>>; }> | undefined; } | { coloring: { name: string; params: Record; }; alpha: number; clip: PD.Values<{ variant: PD.Select; objects: PD.ObjectList; scale: import("../../../mol-math/linear-algebra.js").Vec3; transform: Mat4; }>>; }> | undefined; }; /** Compose the `transform` and `instance` children of a `shape` node into instance matrices. * There is no transformer for shapes, so instead of applying a transform node the matrices are * folded into the Shape's own `transforms` array: one entry per instance, each premultiplied by * the accumulated `transform` matrix. */ export declare function shapeTransforms(node: MolstarSubtree<'shape'>): Mat4[] | undefined;