UNPKG

videx-3d

Version:

React 3D component library designed for sub surface visualizations in the browser

46 lines (45 loc) 1.93 kB
import { Texture } from 'three'; import { PointerEvents } from '../../events/interaction-events'; import { SurfaceMeta, Vec2 } from '../../sdk'; import { CommonComponentProps } from '../common'; import { ContourColorMode } from './SurfaceMaterial'; /** * Surface props * @expand */ export type SurfaceProps = CommonComponentProps & PointerEvents & { meta: SurfaceMeta; color?: string; colorRamp?: number; rampMin?: number; rampMax?: number; reverseRamp?: boolean; useColorRamp?: boolean; showContours?: boolean; contoursInterval?: number; contoursColorMode?: ContourColorMode; contoursColorModeFactor?: number; contoursThickness?: number; contoursColor?: string; opacity?: number; priority?: number; maxError?: number; doubleSide?: boolean; wireframe?: boolean; normalMap?: Texture; normalScale?: Vec2; }; /** * This component renderes a TIN model from an elevation map, according to the `SurfaceMeta` and `SurfaveValues` data types. * * It has several customization options for rendering the surfaces, including color ramps, contour lines and transparency. * * Surface values are expected to be in a regular grid. An optimized triangulation is used for the geometry, but color ramp * values and contour lines are always using the full resolution of the data for accuracy. * * @example * <Surface meta={meta} /> * * @group Components */ export declare const Surface: ({ meta, color, colorRamp, rampMin, rampMax, reverseRamp, useColorRamp, showContours, contoursInterval, contoursColorMode, contoursColorModeFactor, contoursThickness, contoursColor, opacity, priority, maxError, doubleSide, wireframe, normalMap, normalScale, name, userData, receiveShadow, castShadow, layers, position, renderOrder, visible, onPointerClick, onPointerEnter, onPointerLeave, onPointerMove, }: SurfaceProps) => import("react/jsx-runtime").JSX.Element;