type ViewerCameraState = { position: [number, number, number]; target: [number, number, number]; fov: number | null; zoom: number; /** * The camera's orbit angles, in radians, captured so setCameraState can * restore the exact rotation (position and target alone are ambiguous * straight above or below the target). Pass the state back as-is; to move * the camera to angles you choose, use orbitTo, which takes degrees. */ azimuthAngle?: number; polarAngle?: number; }; /** Where ModelViewer's camera starts. Setting it skips the automatic fit. */ type ViewerCameraConfig = { position?: [number, number, number]; /** Vertical field of view in degrees. */ fov?: number; near?: number; far?: number; zoom?: number; }; type DeepPartial = T extends readonly unknown[] ? T : T extends object ? { [K in keyof T]?: DeepPartial; } : T; type ObjectBindingSelector = { group: string; } | { tag: string; } | { type: ObjectBindingType; }; type ObjectBindingTarget = string | readonly string[] | ObjectBindingSelector; /** * Resolves IDs and selectors to binding-map keys in stable record order. * Explicit ID arrays keep their supplied order. Duplicate matches are removed. */ declare function selectBindingKeys(bindings: Record, target: ObjectBindingTarget): string[]; /** Selects bindings by ID, group, tag, or binding type. */ declare function selectBindings(bindings: Record, target: ObjectBindingTarget): ObjectBinding[]; type ObjectBindingPatch = DeepPartial; type BindingEdit = { ids: ObjectBindingTarget; patch: ObjectBindingPatch; }; /** * Applies field-level patches to object bindings and returns the updated * record. Pure — nothing is mutated, and the original reference comes back * untouched when no id matched, so React can skip the re-render. * * Ids resolve the same way everywhere else in the library: binding key first, * then `binding.id`, then `binding.modelObjectId`. */ declare function patchBindings(bindings: Record, target: ObjectBindingTarget, patch: ObjectBindingPatch): Record; declare function patchBindings(bindings: Record, edits: BindingEdit[]): Record; /** Shorthand for the common `{ style: { material: … } }` nesting. */ declare function material(value: ObjectBindingMaterial): ObjectBindingPatch; declare const LIGHT_TYPES: readonly ["none", "directional", "point", "spot", "hemisphere"]; type SceneLightType = (typeof LIGHT_TYPES)[number]; type SceneLightAttachment = { /** Binding key, binding id, modelObjectId, or raw model node name. */ objectId: string; /** Local-space offset from the attached model object. */ offset: [number, number, number]; }; type SceneLight = { id: string; type: SceneLightType; color: string; intensity: number; position: [number, number, number]; rotation?: [number, number, number]; /** Point-light range. Zero means no distance limit. */ distance?: number; /** Point-light physically correct decay. */ decay?: number; angle?: number; penumbra?: number; attachedToCamera: boolean; /** Follow a model object instead of using the world-space position. */ attachment?: SceneLightAttachment; castShadow: boolean; shadowBias: number; visible: boolean; }; type SceneLightingConfig = { ambient: { intensity: number; color: string; }; lights: SceneLight[]; }; declare const SCENE_MODEL_RENDERERS: readonly ["pbr", "matcap", "uv-checker"]; type SceneModelRenderer = (typeof SCENE_MODEL_RENDERERS)[number]; type SceneModelConfig = { rotation: [number, number, number]; showAdvancedRotation: boolean; renderer: SceneModelRenderer; shading: "lit" | "unlit" | "normals"; autoRotate?: boolean; autoRotateSpeed?: number; /** * The glTF material variants (KHR_materials_variants) to show, by name: at * most one from each option group (see `MaterialVariantGroup`). Empty, or * left out, for the model's default materials. */ activeVariants?: string[]; }; type SceneCameraConfig = { fieldOfView: number; showAdvancedSettings: boolean; }; type SceneShadowConfig = { enabled: boolean; mapSize: number; bias: number; normalBias: number; radius: number; }; declare const ENVIRONMENT_PRESETS: readonly ["apartment", "city", "dawn", "forest", "lobby", "night", "park", "studio", "sunset", "warehouse"]; type EnvironmentPreset = (typeof ENVIRONMENT_PRESETS)[number]; type SceneEnvironmentConfig = { source: "preset" | "custom"; preset: EnvironmentPreset; customEnvironmentUrl: string; intensity: number; rotation: number; shadowLight: { enabled: boolean; intensity: number; bias: number; }; }; type SceneWireframeConfig = { enabled: boolean; color: string; opacity: number; }; type SceneBackgroundConfig = { enabled: boolean; type: "environment" | "image" | "color"; color: string; imageUrl: string; }; type SceneGroundShadowConfig = { enabled: boolean; mode: "shadowCatcher" | "bakedAO"; intensity: number; borderFade: number; height: number; size: number; }; declare const ANIMATION_LOOP_MODES: readonly ["repeat", "once", "ping-pong"]; type AnimationLoopMode = (typeof ANIMATION_LOOP_MODES)[number]; type SceneAnimationClipConfig = { sourceName: string; displayName: string; hidden: boolean; loopMode: AnimationLoopMode; speed: number; }; type SceneAnimationConfig = { clips: SceneAnimationClipConfig[]; autoplayClip: string | null; }; declare const GLITCH_MODES: readonly ["sporadic", "constantMild", "constantWild"]; type GlitchModeName = (typeof GLITCH_MODES)[number]; declare const RAMP_TYPES: readonly ["linear", "radial", "mirroredLinear"]; type RampTypeName = (typeof RAMP_TYPES)[number]; declare const KERNEL_SIZE_NAMES: readonly ["verySmall", "small", "medium", "large", "veryLarge", "huge"]; type KernelSizeName = (typeof KERNEL_SIZE_NAMES)[number]; type ScenePostProcessingConfig = { autofocus: { enabled: boolean; focusDistance: number; focusRange: number; focalLength: number; bokehScale: number; target: [number, number, number]; mouse: boolean; debug: number; manual: boolean; smoothTime: number; }; toneMapping: { enabled: boolean; mode: "linear" | "reinhard" | "aces"; exposure: number; resolution: number; whitePoint: number; middleGrey: number; minLuminance: number; averageLuminance: number; adaptationRate: number; }; brightnessContrast: { enabled: boolean; brightness: number; contrast: number; }; hueSaturation: { enabled: boolean; hue: number; saturation: number; }; colorAverage: { enabled: boolean; }; dotScreen: { enabled: boolean; angle: number; scale: number; }; glitch: { enabled: boolean; mode: GlitchModeName; delay: [number, number]; duration: [number, number]; strength: [number, number]; chromaticAberrationOffset: [number, number]; columns: number; ratio: number; }; ssao: { enabled: boolean; samples: number; rings: number; intensity: number; radius: number; bias: number; luminanceInfluence: number; fade: number; minRadiusScale: number; worldDistanceThreshold: number; worldDistanceFalloff: number; worldProximityThreshold: number; worldProximityFalloff: number; }; bloom: { enabled: boolean; intensity: number; luminanceThreshold: number; luminanceSmoothing: number; mipmapBlur: boolean; radius: number; levels: number; }; godRays: { enabled: boolean; sunPosition: [number, number, number]; samples: number; density: number; decay: number; weight: number; exposure: number; clampMax: number; blur: boolean; kernelSize: KernelSizeName; }; grid: { enabled: boolean; scale: number; lineWidth: number; }; noise: { enabled: boolean; opacity: number; premultiply: boolean; }; depthOfField: { enabled: boolean; focusDistance: number; focusRange: number; focalLength: number; bokehScale: number; }; chromaticAberration: { enabled: boolean; offsetX: number; offsetY: number; radialModulation: boolean; modulationOffset: number; }; lensflare: { enabled: boolean; lensPosition: [number, number, number]; smoothTime: number; glareSize: number; flareSize: number; flareSpeed: number; flareShape: number; animated: boolean; anamorphic: boolean; colorGain: string; haloScale: number; secondaryGhosts: boolean; aditionalStreaks: boolean; ghostScale: number; opacity: number; starBurst: boolean; }; vignette: { enabled: boolean; offset: number; darkness: number; eskil: boolean; }; smaa: { enabled: boolean; }; sepia: { enabled: boolean; intensity: number; }; scanline: { enabled: boolean; density: number; }; pixelation: { enabled: boolean; granularity: number; }; outline: { enabled: boolean; selectionLayer: number; edgeStrength: number; pulseSpeed: number; visibleEdgeColor: string; hiddenEdgeColor: string; kernelSize: KernelSizeName; blur: boolean; xRay: boolean; }; selectiveBloom: { enabled: boolean; selectionLayer: number; intensity: number; luminanceThreshold: number; luminanceSmoothing: number; kernelSize: KernelSizeName; mipmapBlur: boolean; inverted: boolean; ignoreBackground: boolean; }; ramp: { enabled: boolean; rampType: RampTypeName; rampStart: [number, number]; rampEnd: [number, number]; startColor: string; endColor: string; opacity?: number; rampBias: number; rampGain: number; rampMask: boolean; rampInvert: boolean; }; }; type SceneAnnotationCameraView = { position: [number, number, number]; target: [number, number, number]; azimuthAngle?: number; polarAngle?: number; fov?: number | null; zoom?: number; }; type SceneAnnotationImage = { src: string; alt?: string; }; type SceneAnnotationLink = { href: string; label: string; }; type SceneAnnotationMarker = { id: number; worldPosition: [number, number, number]; localPosition: [number, number, number]; worldNormal?: [number, number, number]; anchorNodeName?: string; anchorLocalPosition?: [number, number, number]; title: string; description: string; /** World-space camera framing restored on selection and during tours. */ cameraView?: SceneAnnotationCameraView; images?: SceneAnnotationImage[]; links?: SceneAnnotationLink[]; category?: string; /** Inclusive camera-to-marker distance bounds, in scene units. */ minDistance?: number; maxDistance?: number; }; type SceneCinematicWaypoint = { position: [number, number, number]; target: [number, number, number]; /** * Orbit angles in radians, captured with the view in BindingBuilder. They * keep the rotation when position and target are vertically aligned; older * scene configs without them still work. */ azimuthAngle?: number; polarAngle?: number; segmentDuration?: number; }; type SceneCinematicConfig = { enabled: boolean; waypoints: SceneCinematicWaypoint[]; duration?: number; loop: boolean; autoPlay: boolean; }; declare const SECTION_AXES: readonly ["x", "y", "z"]; type SceneSectionAxis = (typeof SECTION_AXES)[number]; type SceneSectionConfig = { enabled: boolean; /** The world axis the cut runs across; `"y"` gives a floor-plan cut. */ axis: SceneSectionAxis; /** * Where the cut is along the axis, as a share of the model's size: 0 at * its minimum, 1 at its maximum. */ position: number; /** * Keep the part above the cut (the higher side along the axis) instead of * the part below it. */ flip: boolean; }; declare const DEFAULT_SECTION_CONFIG: SceneSectionConfig; /** * What an object's data must look like for a rule to apply to it. A list * applies when every condition in it matches. */ type SceneStyleCondition = { /** A key of `binding.metrics`. */ metric: string; /** Applies when the value is greater than this. */ above?: number; /** Applies when the value is less than this. */ below?: number; } | { status: ObjectBindingStatus | ObjectBindingStatus[]; } | { /** A key of `binding.metadata`; dots reach into nested objects. */ metadata: string; equals: string | number | boolean | null; }; type SceneStyleColorScale = { /** A key of `binding.metrics`. */ metric: string; /** * `[value, "#rrggbb"]` pairs. Values between two stops blend their colours; * values outside the stops take the nearest one. */ stops: [number, string][]; /** The material colour it sets. Default `"baseColor"`. */ channel?: "baseColor" | "emissive"; }; type SceneStylePulse = { /** The glow colour at the pulse's peak. Default `"#ff3b30"`. */ color?: string; /** Pulses per second. Default `1`. */ speed?: number; }; type SceneStyleRule = { id: string; label?: string; /** The objects the rule considers; every bound object when left out. */ target?: ObjectBindingTarget; /** When the rule applies; always, when left out. */ when?: SceneStyleCondition | SceneStyleCondition[]; /** Material overrides, over the object's own `style.material`. */ material?: ObjectBindingMaterial; /** A colour taken from a metric's value. */ colorScale?: SceneStyleColorScale; /** A glow that fades in and out, to draw attention. */ pulse?: boolean | SceneStylePulse; }; type SceneConfig = { model: SceneModelConfig; camera: SceneCameraConfig; lighting: SceneLightingConfig; wireframe: SceneWireframeConfig; shadows: SceneShadowConfig; environment: SceneEnvironmentConfig; background: SceneBackgroundConfig; groundShadows: SceneGroundShadowConfig; postProcessing: ScenePostProcessingConfig; animations: SceneAnimationConfig; annotations: SceneAnnotationMarker[]; cinematic?: SceneCinematicConfig; /** * Data-driven looks for bound objects, applied in order, so a later rule * wins over an earlier one where both set something. */ styleRules?: SceneStyleRule[]; /** A cut-away view across the model. Off when left out. */ section?: SceneSectionConfig; }; declare const DEFAULT_SCENE_CONFIG: SceneConfig; type SceneConfigPatch = DeepPartial; /** * Applies a nested scene-config patch without mutating either input. Objects * are merged recursively, while arrays and tuples are replaced wholesale. */ declare function patchSceneConfig(sceneConfig: SceneConfig, patch: SceneConfigPatch): SceneConfig; type AnimationClipInfo = { sourceName: string; duration: number; }; /** How `play` starts a clip. */ type AnimationPlayOptions = { /** * Keep the clips already playing, instead of stopping them, so several * clips run at once (a left and a right door, say). Default `false`. */ alongside?: boolean; /** * Seconds to fade the clip in, and to fade out the clips it replaces, for a * smooth blend between them. Default `0`. */ fade?: number; /** * Play backwards, from wherever the clip is, or from its end. Plays a * "door opens" clip as the door closing. Default `false`. */ reverse?: boolean; }; /** * `"finished"`: a play-once clip that reached its end and holds its last pose * until it's stopped or played again. */ type AnimationClipStatus = "playing" | "paused" | "finished"; /** One clip that is playing, paused, or holding its finished pose. */ type AnimationClipState = { clip: string; status: AnimationClipStatus; /** Position in the clip, in seconds. */ time: number; /** Length of the clip, in seconds. */ duration: number; speed: number; reverse: boolean; }; type AnimationPlaybackState = { /** The clip played most recently, while it's active. */ currentClip: string | null; /** Whether any clip is playing. */ isPlaying: boolean; speed: number; time: number; duration: number; /** Every active clip, most recently played last. */ active: AnimationClipState[]; }; /** * Leave out `clip` to act on every active clip; pass one to act on that clip * alone. */ type AnimationControls = { clips: string[]; clipDetails?: AnimationClipInfo[]; play: (clipName: string, options?: AnimationPlayOptions) => void; pause: (clipName?: string) => void; /** Stops and resets the pose. */ stop: (clipName?: string) => void; /** Without a clip, also the speed of clips played later without their own. */ setSpeed: (speed: number, clipName?: string) => void; seek?: (time: number, clipName?: string) => void; getState?: () => AnimationPlaybackState; subscribe?: (listener: (state: AnimationPlaybackState) => void) => () => void; }; type ViewerAnimationsProps = { clips: string[]; clipDetails: AnimationClipInfo[]; currentClip: string | null; isPlaying: boolean; speed: number; time: number; duration: number; /** Every active clip, most recently played last. */ active: AnimationClipState[]; play: (clipName: string, options?: AnimationPlayOptions) => void; pause: (clipName?: string) => void; stop: (clipName?: string) => void; setSpeed: (speed: number, clipName?: string) => void; seek: (time: number, clipName?: string) => void; handleAnimationsReady: (controls: AnimationControls) => void; }; declare function useViewerAnimations(): ViewerAnimationsProps; /** A glow cycling on one object, from its style rules. */ type StyledObjectPulse = { color: string; /** Pulses per second. */ speed: number; }; type StyledObjectBindings = { /** * The bindings as the rules style them. A binding no rule changed is the * same object as the one passed in. */ bindings: Record; /** Pulsing objects, by binding key. */ pulses: Record; /** The binding a styled one came from (itself when no rule changed it). */ sourceOf: (binding: ObjectBinding) => ObjectBinding; }; /** * The colour a colour scale gives a value: a blend of the two stops around it, * or the nearest stop outside them. Null when there's no usable stop. */ declare function colorScaleValue(stops: SceneStyleColorScale["stops"], value: number): string | null; /** * Styles bindings with scene style rules, for rendering. Rules apply in order * over each object's own `style.material`, so a later rule wins where two set * the same thing. The bindings passed in are never changed. */ declare function applyStyleRules(bindings: Record, rules: readonly SceneStyleRule[] | undefined): StyledObjectBindings; /** * Objects to focus on. Everything else is ghosted (drawn faintly) or hidden * until the isolation is cleared, without changing any binding. */ type ViewerIsolation = { /** The objects that stay: an id, a list of ids, `{ group }`, `{ tag }`, or `{ type }`. */ target: ObjectBindingTarget; /** What happens to everything else. Default `"ghost"`. */ mode?: "ghost" | "hide"; /** How visible ghosted objects are, 0–1. Default `0.12`. */ ghostOpacity?: number; }; type IsolatedObjectBindings = StyledObjectBindings & { /** Binding keys that are ghosted or hidden. Pointer picking ignores them. */ setAside: Set; }; /** The binding keys an isolation keeps; empty when it keeps nothing. */ declare function isolatedBindingKeys(bindings: Record, isolation: ViewerIsolation | null | undefined): Set; /** * Ghosts or hides every object an isolation doesn't keep, for rendering. The * bindings passed in are never changed. An isolation that keeps nothing (a * target matching no object) changes nothing either, rather than fading out * the whole model. */ declare function applyIsolation(styled: StyledObjectBindings, isolation: ViewerIsolation | null | undefined): IsolatedObjectBindings; type ObjectBindingsActionEffect = { target: ObjectBindingTarget; objectBindings: ObjectBindingPatch; }; type SceneConfigActionEffect = { sceneConfig: SceneConfigPatch; }; type VisibilityActionEffect = { target: ObjectBindingTarget; visibility: "show" | "hide" | "toggle"; }; type CameraAction = { type: "focus-object"; objectId?: string; } | { type: "fit-scene"; } | { type: "reset"; } | { type: "set-target"; target: [number, number, number]; transition?: boolean; } | { type: "set-state"; state: ViewerCameraState; transition?: boolean; }; type CameraActionEffect = { camera: CameraAction; }; /** * `play` replaces the clips already playing unless `alongside` is set. The * others act on `clip`, or on every active clip when it's left out. */ type AnimationAction = ({ type: "play"; clip: string; } & AnimationPlayOptions) | { type: "pause"; clip?: string; } | { type: "stop"; clip?: string; } | { type: "set-speed"; speed: number; clip?: string; } | { type: "seek"; time: number; clip?: string; }; type AnimationActionEffect = { animation: AnimationAction; }; /** Isolates objects, or with `null` shows everything again. */ type IsolationActionEffect = { isolation: ViewerIsolation | null; }; type ObjectActionEffect = IsolationActionEffect | ObjectBindingsActionEffect | SceneConfigActionEffect | VisibilityActionEffect | CameraActionEffect | AnimationActionEffect; type ObjectBindingAction = { id: "change-color" | "apply-texture" | "toggle-visibility" | string; label: string; type: "command"; effects?: ObjectActionEffect[]; }; /** * What kind of object a binding is, for grouping and filtering. The listed * values are suggestions; any string works. */ type ObjectBindingType = "body" | "other" | "glass" | "windshield" | "rear-windshield" | "window" | "sunroof" | "wheel" | "rim" | "tire" | "brake-caliper" | "brake-disc" | "suspension" | "spring" | "shock-absorber" | "axle" | "control-arm" | "interior" | "seat" | "headrest" | "seatbelt" | "dashboard" | "steering-wheel" | "gear-shift" | "center-console" | "armrest" | "door-panel" | "carpet" | "headliner" | "sun-visor" | "pedal" | "instrument-cluster" | "infotainment" | "glove-box" | "engine" | "gearbox" | "radiator" | "battery" | "fuel-tank" | "air-filter" | "intercooler" | "alternator" | "turbo" | "light" | "headlight" | "taillight" | "fog-light" | "indicator" | "daytime-running-light" | "interior-light" | "ambient-light" | "floor" | "floor-tile" | "floor-board" | "floor-mat" | "ceiling" | "ceiling-tile" | "wall" | "wall-tile" | "wall-panel" | "wall-trim" | "baseboard" | "crown-molding" | "column" | "pillar" | "beam" | "arch" | "stairs" | "step" | "railing" | "balustrade" | "window-frame" | "window-sill" | "blind" | "curtain" | "shutter" | "door" | "door-frame" | "door-knob" | "furniture" | "sofa" | "armchair" | "ottoman" | "bed" | "headboard" | "mattress" | "nightstand" | "dresser" | "wardrobe" | "closet" | "shelf" | "bookcase" | "desk" | "office-chair" | "dining-table" | "dining-chair" | "bar-stool" | "bench" | "cabinet" | "sideboard" | "coffee-table" | "side-table" | "tv-stand" | "kitchen-island" | "countertop" | "sink" | "bathtub" | "shower" | "toilet" | "vanity" | "decor" | "rug" | "cushion" | "throw" | "curtain-rod" | "artwork" | "mirror" | "vase" | "plant" | "pot" | "candle" | "frame" | "sculpture" | "clock" | "lamp" | "floor-lamp" | "table-lamp" | "pendant-light" | "chandelier" | "sconce" | "ceiling-fan" | "electronics" | "tv" | "monitor" | "speaker" | "soundbar" | "projector" | "remote" | "console" | "router" | "smart-hub" | "thermostat" | "appliance" | "refrigerator" | "oven" | "microwave" | "dishwasher" | "washing-machine" | "dryer" | "air-conditioner" | "heater" | "ventilation" | "root" | "bone" | "joint" | "socket" | "pivot" | "head" | "face" | "eye" | "eyelid" | "eyebrow" | "mouth" | "teeth" | "tongue" | "ear" | "nose" | "hair" | "beard" | "neck" | "torso" | "chest" | "abdomen" | "back" | "shoulder" | "upper-arm" | "forearm" | "hand" | "finger" | "thumb" | "hip" | "thigh" | "shin" | "foot" | "toe" | "tail" | "wing" | "tentacle" | "clothing" | "hat" | "helmet" | "visor" | "mask" | "goggles" | "glasses" | "jacket" | "shirt" | "pants" | "skirt" | "shoes" | "boots" | "gloves" | "belt" | "watch" | "bag" | "backpack" | "jewelry" | "necklace" | "ring" | "armor" | "chest-plate" | "pauldron" | "gauntlet" | "greave" | "shield" | "weapon" | "blade" | "edge" | "tip" | "guard" | "grip" | "pommel" | "barrel" | "stock" | "scope" | "trigger" | "magazine" | "muzzle" | "gear" | "piston" | "lever" | "valve" | "pump" | "motor" | "rotor" | "blade-prop" | "nozzle" | "pipe" | "tube" | "cable" | "wire" | "connector" | "panel" | "hatch" | "vent" | "antenna" | "sensor" | "camera" | "screen" | "dial" | "button" | "knob" | "switch" | "gauge" | "terrain" | "ground" | "rock" | "cliff" | "water" | "ocean" | "river" | "lake" | "wave" | "foam" | "sky" | "cloud" | "sun" | "moon" | "star" | "fog" | "foliage" | "tree" | "branch" | "leaf" | "grass" | "bush" | "flower" | "soil" | "sand" | "snow" | "ice" | "facade" | "foundation" | "roof-structure" | "chimney" | "balcony" | "porch" | "pathway" | "fence" | "gate" | "wall-exterior" | (string & {}); type ObjectBindingStatus = "normal" | "hidden" | "selected" | "disabled"; type ObjectBindingTextureSlot = { path: string; /** UV position offset [u, v]. */ offset?: [number, number]; /** UV zoom scale. 1 = default, >1 = zoom in, <1 = zoom out. */ scale?: number; rotation?: number; }; type ObjectBindingTextureChannel = "baseColor" | "metalness" | "roughness" | "emissive" | "alpha" | "normal" | "bump" | "ao" | "displacement" | "clearcoat" | "clearcoatRoughness" | "clearcoatNormal" | "anisotropy" | "transmission" | "thickness" | "sheenColor" | "sheenRoughness" | "specularIntensity" | "specularColor"; type ObjectBindingTransform = { /** Local-space position in model units. */ position?: [number, number, number]; /** Local-space Euler rotation in radians. */ rotation?: [number, number, number]; /** Local-space scale. */ scale?: [number, number, number]; }; declare const MATERIAL_SIDES: readonly ["front", "back", "double"]; type ObjectBindingMaterialSide = (typeof MATERIAL_SIDES)[number]; declare const MATERIAL_BLENDING_MODES: readonly ["normal", "additive"]; type ObjectBindingMaterialBlendingMode = (typeof MATERIAL_BLENDING_MODES)[number]; type ObjectBindingMaterial = { texture?: ObjectBindingTextureSlot; baseColor?: string; metalness?: number; metalnessMap?: ObjectBindingTextureSlot; roughness?: number; roughnessMap?: ObjectBindingTextureSlot; emissive?: string; emissiveIntensity?: number; emissiveMap?: ObjectBindingTextureSlot; opacity?: number; alphaMap?: ObjectBindingTextureSlot; alphaTest?: number; alphaHash?: boolean; dithering?: boolean; blendingMode?: ObjectBindingMaterialBlendingMode; side?: ObjectBindingMaterialSide; normalMap?: ObjectBindingTextureSlot; normalScale?: number; flipNormalY?: boolean; bumpMap?: ObjectBindingTextureSlot; bumpScale?: number; aoMap?: ObjectBindingTextureSlot; aoMapIntensity?: number; displacementMap?: ObjectBindingTextureSlot; displacementScale?: number; displacementBias?: number; clearcoat?: number; clearcoatMap?: ObjectBindingTextureSlot; clearcoatRoughness?: number; clearcoatRoughnessMap?: ObjectBindingTextureSlot; clearcoatNormalMap?: ObjectBindingTextureSlot; clearcoatNormalScale?: number; flipClearcoatNormalY?: boolean; sheen?: number; sheenColor?: string; sheenColorMap?: ObjectBindingTextureSlot; sheenRoughness?: number; sheenRoughnessMap?: ObjectBindingTextureSlot; anisotropy?: number; anisotropyRotation?: number; anisotropyMap?: ObjectBindingTextureSlot; transmission?: number; transmissionMap?: ObjectBindingTextureSlot; thickness?: number; thicknessMap?: ObjectBindingTextureSlot; attenuationColor?: string; attenuationDistance?: number; reflectivity?: number; specularIntensity?: number; specularIntensityMap?: ObjectBindingTextureSlot; specularColor?: string; specularColorMap?: ObjectBindingTextureSlot; }; type ObjectBindingCameraState = { position?: [number, number, number]; target?: [number, number, number]; fov?: number; zoom?: number; }; /** * An image or a line of text printed onto the object's surface: a logo, a * label, a personalisation. */ type ObjectBindingDecal = { id: string; /** The image to show: a URL or public path. */ image?: string; /** Text to show, when there's no image. */ text?: string; /** Text colour. Default `"#ffffff"`. */ color?: string; /** CSS font family for the text. Default `"sans-serif"`. */ fontFamily?: string; /** Default `"bold"`. */ fontWeight?: "normal" | "bold"; /** Where it sits on the object, in the object's own (local) space. */ position: [number, number, number]; /** The way the surface faces there, in the object's own space. */ normal: [number, number, number]; /** Width, in model units; the height follows the image or text's shape. */ size: number; /** A turn around the surface normal, in radians. Default `0`. */ rotation?: number; /** 0–1. Default `1`. */ opacity?: number; }; type ObjectBindingStyle = { material?: ObjectBindingMaterial; }; type ObjectBinding = { id: string; /** Defaults to `"other"`. */ type?: ObjectBindingType; modelObjectId: string; label?: string; group?: string; tags?: string[]; status?: ObjectBindingStatus; visible?: boolean; selectable?: boolean; hoverable?: boolean; transform?: ObjectBindingTransform; style?: ObjectBindingStyle; /** Images and text printed on the object's surface. */ decals?: ObjectBindingDecal[]; actions?: ObjectBindingAction[]; metrics?: Record; metadata?: Record; cameraState?: ObjectBindingCameraState; }; type ObjectActionEvent = { objectId: string; action: ObjectBindingAction; binding?: ObjectBinding; screenX?: number; screenY?: number; }; /** A point on an object's surface, in the object's own (local) space. */ type ObjectSurfacePoint = { position: [number, number, number]; /** The way the surface faces at that point. */ normal: [number, number, number]; }; /** A double-click, right-click, or long-press on a model object. */ type ObjectPointerEvent = { binding: ObjectBinding; /** Viewport coordinates, e.g. to place a menu with `position: fixed`. */ clientX: number; clientY: number; /** `"mouse"`, `"pen"`, or `"touch"`. */ pointerType: string; /** * Where on the object the pointer was, e.g. to place a decal there. Not * reported for streamed (3D Tiles) models. */ surface?: ObjectSurfacePoint; }; /** One bindable object in a model, as reported by `onObjectCatalog`. */ type ViewerObjectInfo = { /** The node identifier bindings are keyed by. */ name: string; triangles: number; /** * Axis-aligned bounds in the model's own units, in Z-up coordinates (the 3D * Tiles convention): a glTF point (x, y, z) is (x, -z, y) here. */ minimum: [number, number, number]; maximum: [number, number, number]; }; /** Which three.js renderer draws a viewer. */ type RendererBackend = "webgl" | "webgpu"; export { type SceneCinematicConfig as $, type AnimationAction as A, type BindingEdit as B, type CameraAction as C, DEFAULT_SCENE_CONFIG as D, type EnvironmentPreset as E, type ObjectBindingTextureChannel as F, type GlitchModeName as G, type ObjectBindingTextureSlot as H, type IsolatedObjectBindings as I, type ObjectBindingTransform as J, type KernelSizeName as K, type ObjectBindingType as L, MATERIAL_BLENDING_MODES as M, type ObjectBindingsActionEffect as N, type ObjectActionEffect as O, type ObjectPointerEvent as P, type ObjectSurfacePoint as Q, type RampTypeName as R, type RendererBackend as S, type SceneAnimationClipConfig as T, type SceneAnimationConfig as U, type SceneAnnotationCameraView as V, type SceneAnnotationImage as W, type SceneAnnotationLink as X, type SceneAnnotationMarker as Y, type SceneBackgroundConfig as Z, type SceneCameraConfig as _, type AnimationActionEffect as a, type SceneCinematicWaypoint as a0, type SceneConfig as a1, type SceneConfigActionEffect as a2, type SceneConfigPatch as a3, type SceneEnvironmentConfig as a4, type SceneGroundShadowConfig as a5, type SceneLight as a6, type SceneLightAttachment as a7, type SceneLightType as a8, type SceneLightingConfig as a9, selectBindingKeys as aA, selectBindings as aB, useViewerAnimations as aC, type SceneModelConfig as aa, type SceneModelRenderer as ab, type ScenePostProcessingConfig as ac, type SceneSectionAxis as ad, type SceneSectionConfig as ae, type SceneShadowConfig as af, type SceneStyleColorScale as ag, type SceneStyleCondition as ah, type SceneStylePulse as ai, type SceneStyleRule as aj, type SceneWireframeConfig as ak, type StyledObjectBindings as al, type StyledObjectPulse as am, type ViewerAnimationsProps as an, type ViewerCameraConfig as ao, type ViewerCameraState as ap, type ViewerIsolation as aq, type ViewerObjectInfo as ar, type VisibilityActionEffect as as, applyIsolation as at, applyStyleRules as au, colorScaleValue as av, isolatedBindingKeys as aw, material as ax, patchBindings as ay, patchSceneConfig as az, type AnimationClipInfo as b, type AnimationClipState as c, type AnimationClipStatus as d, type AnimationControls as e, type AnimationLoopMode as f, type AnimationPlayOptions as g, type AnimationPlaybackState as h, type CameraActionEffect as i, DEFAULT_SECTION_CONFIG as j, type DeepPartial as k, type IsolationActionEffect as l, MATERIAL_SIDES as m, type ObjectActionEvent as n, type ObjectBinding as o, type ObjectBindingAction as p, type ObjectBindingCameraState as q, type ObjectBindingDecal as r, type ObjectBindingMaterial as s, type ObjectBindingMaterialBlendingMode as t, type ObjectBindingMaterialSide as u, type ObjectBindingPatch as v, type ObjectBindingSelector as w, type ObjectBindingStatus as x, type ObjectBindingStyle as y, type ObjectBindingTarget as z };