import * as THREE from "three"; import { Subscribe } from '../../utils/subscribe'; import type { PanoId } from '../../utils/pano'; export type PBMMeshShaderType = 'none' | 'basic' | 'phong' | 'standard'; export type PBMPointCloudShaderType = 'pointcloud'; export type PBMAlphaMode = 'OPAQUE' | 'MASK' | 'BLEND'; export type PBMTransition = 'BLACK' | 'SPREAD' | 'FADE'; export type PBMFloorStyle = 'VISIBILITY' | 'OPACITY'; /** * 屋顶样式(仅在 vertexMarks 为 true、即模型带屋顶标记时生效) * - AUTO: 根据相机俯仰角渐进裁切屋顶(默认,原有行为) * - HIDE: 始终隐藏屋顶,与视角无关 */ export type PBMRoofStyle = 'AUTO' | 'HIDE'; export type PBMColorStyle = 'RGB' | 'ALTITUDE' | 'CONSTANT'; export type PBMPointShape = 'SQUARE' | 'CIRCLE'; export type PBMPointSize = 'FIXED' | 'ATTENUATION'; export type PBMPointBack = 'VISIBLE' | 'HIDDEN' | 'DARK'; export declare class PBMUpdateable extends Subscribe<{ "update": () => void; }> { } export interface PBMCustomShaderSlots { vertex: { mainBefore: string; mainStart: string; mainEnd: string; }; fragment: { mainBefore: string; mainStart: string; mainModelColor: string; mainPanoColor: string; mainEnd: string; }; } export interface PBMCustomShaderInitArgs { type: Array<'none' | 'basic' | 'phong' | 'standard' | 'pointcloud'>; vertex?: Partial; fragment?: Partial; uniforms?: { [key: string]: THREE.IUniform; }; defines?: { [key: string]: any; }; } export declare class PBMCustomShader extends PBMUpdateable { id: string; version: number; uniforms: { [key: string]: THREE.IUniform; }; defines: { [key: string]: any; }; type: PBMCustomShaderInitArgs['type']; vertex: PBMCustomShaderSlots['vertex']; fragment: PBMCustomShaderSlots['fragment']; constructor(initArgs: PBMCustomShaderInitArgs); get needsUpdate(): boolean; set needsUpdate(value: boolean); onBeforeCompile(shader: THREE.Shader, renderer: THREE.WebGLRenderer): void; } export interface PBMPanoFilterValue { saturationSaturationBias: number; contrastContrastBias: number; highlightShadowLutMap: THREE.Texture; colorTemperatureBias: number; colorTintBias: number; } export declare class PBMPanoFilter extends PBMUpdateable { readonly id: string; /** 对比度 */ readonly contrast: { /** 对比偏移 [-1, 1] */ contrastBias: number; }; /** 饱和度 */ readonly saturation: { /** 饱和偏移 [-1, 1] */ saturationBias: number; }; /** 颜色 */ readonly color: { /** 色温偏移 [-100, 100] */ temperatureBias: number; /** 色調偏移 [-100, 100] */ tintBias: number; }; /** 高光阴影 */ readonly highlightShadow: { /** 高光偏移 [-255, 255] */ highlightBias: number; /** 阴影偏移 [-255, 255] */ shadowBias: number; /** 全局亮度偏移 [-255, 255] */ globalBias: number; /** 高光阴影的颜色对照表 */ readonly lutMap: THREE.Texture; }; /** 计算调色 LUT */ static computeLut(highlightBias: number, shadowBias: number, globalBias: number, width?: number, itemSize?: number, target?: Float32Array, offset?: number): Float32Array; constructor(); toValue(): PBMPanoFilterValue; } export interface PBMClipperParameter { clippingBoxMatrix: THREE.Matrix4; floorIndex?: number; } export interface PBMPanoPicture { /** 点位 Id */ panoId: PanoId; /** 全景图 */ map: THREE.CubeTexture; /** 图片直方图 peak mean min max */ mapHistogram: THREE.Vector4; /** 图片尺寸 */ mapSize: number; /** 全景图变换矩阵 4x4 */ matrix: THREE.Matrix4; /** 缩放 */ zoom: number; } export interface PBMPanoDepth { /** 点位 Id */ panoId: PanoId; /** 深度图 */ map: THREE.CubeTexture; /** 图片尺寸 */ mapSize: number; /** 图片最大深度 */ maxDepth: number; } export interface PBMRefinedScreen { projectionMatrix: THREE.Matrix4; matrixInverse: THREE.Matrix4; map: THREE.Texture | null; pano: number; opacity: number; } export declare class PBMMaterial extends THREE.Material { }