@liveroom-tech/react-immersive 3.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,563 @@
1
+ declare const LIGHT_TYPES: readonly ["none", "directional", "point", "spot", "hemisphere"];
2
+ type SceneLightType = (typeof LIGHT_TYPES)[number];
3
+ type SceneLightAttachment = {
4
+ /** Binding key, binding id, modelObjectId, or raw model node name. */
5
+ objectId: string;
6
+ /** Local-space offset from the attached model object. */
7
+ offset: [number, number, number];
8
+ };
9
+ type SceneLight = {
10
+ id: string;
11
+ type: SceneLightType;
12
+ color: string;
13
+ intensity: number;
14
+ position: [number, number, number];
15
+ /** Point-light range. Zero means no distance limit. */
16
+ distance?: number;
17
+ /** Point-light physically correct decay. */
18
+ decay?: number;
19
+ angle?: number;
20
+ penumbra?: number;
21
+ attachedToCamera: boolean;
22
+ /** Follow a model object instead of using the world-space position. */
23
+ attachment?: SceneLightAttachment;
24
+ castShadow: boolean;
25
+ shadowBias: number;
26
+ visible: boolean;
27
+ };
28
+ type SceneLightingConfig = {
29
+ ambient: {
30
+ intensity: number;
31
+ color: string;
32
+ };
33
+ lights: SceneLight[];
34
+ };
35
+ declare const SCENE_MODEL_RENDERERS: readonly ["pbr", "matcap", "uv-checker"];
36
+ type SceneModelRenderer = (typeof SCENE_MODEL_RENDERERS)[number];
37
+ type SceneModelConfig = {
38
+ rotation: [number, number, number];
39
+ showAdvancedRotation: boolean;
40
+ renderer: SceneModelRenderer;
41
+ shading: "lit" | "unlit" | "normals";
42
+ };
43
+ type SceneCameraConfig = {
44
+ fieldOfView: number;
45
+ showAdvancedSettings: boolean;
46
+ };
47
+ type SceneShadowConfig = {
48
+ enabled: boolean;
49
+ mapSize: number;
50
+ bias: number;
51
+ normalBias: number;
52
+ radius: number;
53
+ };
54
+ declare const ENVIRONMENT_PRESETS: readonly ["apartment", "city", "dawn", "forest", "lobby", "night", "park", "studio", "sunset", "warehouse"];
55
+ type EnvironmentPreset = (typeof ENVIRONMENT_PRESETS)[number];
56
+ type SceneEnvironmentConfig = {
57
+ source: "preset" | "custom";
58
+ preset: EnvironmentPreset;
59
+ customEnvironmentUrl: string;
60
+ intensity: number;
61
+ rotation: number;
62
+ shadowLight: {
63
+ enabled: boolean;
64
+ intensity: number;
65
+ bias: number;
66
+ };
67
+ };
68
+ type SceneWireframeConfig = {
69
+ enabled: boolean;
70
+ color: string;
71
+ opacity: number;
72
+ };
73
+ type SceneBackgroundConfig = {
74
+ enabled: boolean;
75
+ type: "environment" | "image" | "color";
76
+ color: string;
77
+ imageUrl: string;
78
+ };
79
+ type SceneGroundShadowConfig = {
80
+ enabled: boolean;
81
+ mode: "shadowCatcher" | "bakedAO";
82
+ intensity: number;
83
+ borderFade: number;
84
+ height: number;
85
+ size: number;
86
+ };
87
+ declare const ANIMATION_LOOP_MODES: readonly ["repeat", "once"];
88
+ type AnimationLoopMode = (typeof ANIMATION_LOOP_MODES)[number];
89
+ type SceneAnimationClipConfig = {
90
+ sourceName: string;
91
+ displayName: string;
92
+ hidden: boolean;
93
+ loopMode: AnimationLoopMode;
94
+ speed: number;
95
+ };
96
+ type SceneAnimationConfig = {
97
+ clips: SceneAnimationClipConfig[];
98
+ autoplayClip: string | null;
99
+ };
100
+ declare const GLITCH_MODES: readonly ["sporadic", "constantMild", "constantWild"];
101
+ type GlitchModeName = (typeof GLITCH_MODES)[number];
102
+ declare const RAMP_TYPES: readonly ["linear", "radial", "mirroredLinear"];
103
+ type RampTypeName = (typeof RAMP_TYPES)[number];
104
+ declare const KERNEL_SIZE_NAMES: readonly ["verySmall", "small", "medium", "large", "veryLarge", "huge"];
105
+ type KernelSizeName = (typeof KERNEL_SIZE_NAMES)[number];
106
+ type ScenePostProcessingConfig = {
107
+ autofocus: {
108
+ enabled: boolean;
109
+ focusDistance: number;
110
+ focusRange: number;
111
+ focalLength: number;
112
+ bokehScale: number;
113
+ target: [number, number, number];
114
+ mouse: boolean;
115
+ debug: number;
116
+ manual: boolean;
117
+ smoothTime: number;
118
+ };
119
+ toneMapping: {
120
+ enabled: boolean;
121
+ mode: "linear" | "reinhard" | "aces";
122
+ exposure: number;
123
+ resolution: number;
124
+ whitePoint: number;
125
+ middleGrey: number;
126
+ minLuminance: number;
127
+ averageLuminance: number;
128
+ adaptationRate: number;
129
+ };
130
+ brightnessContrast: {
131
+ enabled: boolean;
132
+ brightness: number;
133
+ contrast: number;
134
+ };
135
+ hueSaturation: {
136
+ enabled: boolean;
137
+ hue: number;
138
+ saturation: number;
139
+ };
140
+ colorAverage: {
141
+ enabled: boolean;
142
+ };
143
+ dotScreen: {
144
+ enabled: boolean;
145
+ angle: number;
146
+ scale: number;
147
+ };
148
+ glitch: {
149
+ enabled: boolean;
150
+ mode: GlitchModeName;
151
+ delay: [number, number];
152
+ duration: [number, number];
153
+ strength: [number, number];
154
+ chromaticAberrationOffset: [number, number];
155
+ columns: number;
156
+ ratio: number;
157
+ };
158
+ ssao: {
159
+ enabled: boolean;
160
+ samples: number;
161
+ rings: number;
162
+ intensity: number;
163
+ radius: number;
164
+ bias: number;
165
+ luminanceInfluence: number;
166
+ fade: number;
167
+ minRadiusScale: number;
168
+ worldDistanceThreshold: number;
169
+ worldDistanceFalloff: number;
170
+ worldProximityThreshold: number;
171
+ worldProximityFalloff: number;
172
+ };
173
+ bloom: {
174
+ enabled: boolean;
175
+ intensity: number;
176
+ luminanceThreshold: number;
177
+ luminanceSmoothing: number;
178
+ mipmapBlur: boolean;
179
+ radius: number;
180
+ levels: number;
181
+ };
182
+ godRays: {
183
+ enabled: boolean;
184
+ sunPosition: [number, number, number];
185
+ samples: number;
186
+ density: number;
187
+ decay: number;
188
+ weight: number;
189
+ exposure: number;
190
+ clampMax: number;
191
+ blur: boolean;
192
+ kernelSize: KernelSizeName;
193
+ };
194
+ grid: {
195
+ enabled: boolean;
196
+ scale: number;
197
+ lineWidth: number;
198
+ };
199
+ noise: {
200
+ enabled: boolean;
201
+ opacity: number;
202
+ premultiply: boolean;
203
+ };
204
+ depthOfField: {
205
+ enabled: boolean;
206
+ focusDistance: number;
207
+ focusRange: number;
208
+ focalLength: number;
209
+ bokehScale: number;
210
+ };
211
+ chromaticAberration: {
212
+ enabled: boolean;
213
+ offsetX: number;
214
+ offsetY: number;
215
+ radialModulation: boolean;
216
+ modulationOffset: number;
217
+ };
218
+ lensflare: {
219
+ enabled: boolean;
220
+ lensPosition: [number, number, number];
221
+ smoothTime: number;
222
+ glareSize: number;
223
+ flareSize: number;
224
+ flareSpeed: number;
225
+ flareShape: number;
226
+ animated: boolean;
227
+ anamorphic: boolean;
228
+ colorGain: string;
229
+ haloScale: number;
230
+ secondaryGhosts: boolean;
231
+ aditionalStreaks: boolean;
232
+ ghostScale: number;
233
+ opacity: number;
234
+ starBurst: boolean;
235
+ };
236
+ vignette: {
237
+ enabled: boolean;
238
+ offset: number;
239
+ darkness: number;
240
+ eskil: boolean;
241
+ };
242
+ smaa: {
243
+ enabled: boolean;
244
+ };
245
+ sepia: {
246
+ enabled: boolean;
247
+ intensity: number;
248
+ };
249
+ scanline: {
250
+ enabled: boolean;
251
+ density: number;
252
+ };
253
+ pixelation: {
254
+ enabled: boolean;
255
+ granularity: number;
256
+ };
257
+ outline: {
258
+ enabled: boolean;
259
+ selectionLayer: number;
260
+ edgeStrength: number;
261
+ pulseSpeed: number;
262
+ visibleEdgeColor: string;
263
+ hiddenEdgeColor: string;
264
+ kernelSize: KernelSizeName;
265
+ blur: boolean;
266
+ xRay: boolean;
267
+ };
268
+ selectiveBloom: {
269
+ enabled: boolean;
270
+ selectionLayer: number;
271
+ intensity: number;
272
+ luminanceThreshold: number;
273
+ luminanceSmoothing: number;
274
+ kernelSize: KernelSizeName;
275
+ mipmapBlur: boolean;
276
+ inverted: boolean;
277
+ ignoreBackground: boolean;
278
+ };
279
+ ramp: {
280
+ enabled: boolean;
281
+ rampType: RampTypeName;
282
+ rampStart: [number, number];
283
+ rampEnd: [number, number];
284
+ startColor: string;
285
+ endColor: string;
286
+ opacity?: number;
287
+ rampBias: number;
288
+ rampGain: number;
289
+ rampMask: boolean;
290
+ rampInvert: boolean;
291
+ };
292
+ };
293
+ type SceneAnnotationMarker = {
294
+ id: number;
295
+ worldPosition: [number, number, number];
296
+ localPosition: [number, number, number];
297
+ worldNormal?: [number, number, number];
298
+ anchorNodeName?: string;
299
+ anchorLocalPosition?: [number, number, number];
300
+ title: string;
301
+ description: string;
302
+ };
303
+ type SceneCinematicWaypoint = {
304
+ position: [number, number, number];
305
+ target: [number, number, number];
306
+ azimuthAngle?: number;
307
+ polarAngle?: number;
308
+ segmentDuration?: number;
309
+ };
310
+ type SceneCinematicConfig = {
311
+ enabled: boolean;
312
+ waypoints: SceneCinematicWaypoint[];
313
+ duration?: number;
314
+ loop: boolean;
315
+ autoPlay: boolean;
316
+ };
317
+ type SceneConfig = {
318
+ model: SceneModelConfig;
319
+ camera: SceneCameraConfig;
320
+ lighting: SceneLightingConfig;
321
+ wireframe: SceneWireframeConfig;
322
+ shadows: SceneShadowConfig;
323
+ environment: SceneEnvironmentConfig;
324
+ background: SceneBackgroundConfig;
325
+ groundShadows: SceneGroundShadowConfig;
326
+ postProcessing: ScenePostProcessingConfig;
327
+ animations: SceneAnimationConfig;
328
+ annotations: SceneAnnotationMarker[];
329
+ cinematic?: SceneCinematicConfig;
330
+ };
331
+ declare const DEFAULT_SCENE_CONFIG: SceneConfig;
332
+
333
+ type ViewerCameraState = {
334
+ position: [number, number, number];
335
+ target: [number, number, number];
336
+ fov: number | null;
337
+ zoom: number;
338
+ azimuthAngle?: number;
339
+ polarAngle?: number;
340
+ };
341
+
342
+ type DeepPartial<T> = T extends readonly unknown[] ? T : T extends object ? {
343
+ [K in keyof T]?: DeepPartial<T[K]>;
344
+ } : T;
345
+
346
+ type ObjectBindingSelector = {
347
+ group: string;
348
+ } | {
349
+ tag: string;
350
+ } | {
351
+ type: ObjectBindingType;
352
+ };
353
+ type ObjectBindingTarget = string | readonly string[] | ObjectBindingSelector;
354
+ /**
355
+ * Resolves IDs and selectors to binding-map keys in stable record order.
356
+ * Explicit ID arrays keep their supplied order. Duplicate matches are removed.
357
+ */
358
+ declare function selectBindingKeys(bindings: Record<string, ObjectBinding>, target: ObjectBindingTarget): string[];
359
+ /** Selects bindings by ID, group, tag, or binding type. */
360
+ declare function selectBindings(bindings: Record<string, ObjectBinding>, target: ObjectBindingTarget): ObjectBinding[];
361
+
362
+ type ObjectBindingPatch = DeepPartial<ObjectBinding>;
363
+ type BindingEdit = {
364
+ ids: ObjectBindingTarget;
365
+ patch: ObjectBindingPatch;
366
+ };
367
+ /**
368
+ * Applies field-level patches to object bindings and returns the updated
369
+ * record. Pure — nothing is mutated, and the original reference comes back
370
+ * untouched when no id matched, so React can skip the re-render.
371
+ *
372
+ * Ids resolve the same way everywhere else in the library: binding key first,
373
+ * then `binding.id`, then `binding.modelObjectId`.
374
+ */
375
+ declare function patchBindings(bindings: Record<string, ObjectBinding>, target: ObjectBindingTarget, patch: ObjectBindingPatch): Record<string, ObjectBinding>;
376
+ declare function patchBindings(bindings: Record<string, ObjectBinding>, edits: BindingEdit[]): Record<string, ObjectBinding>;
377
+ /** Shorthand for the common `{ style: { material: … } }` nesting. */
378
+ declare function material(value: ObjectBindingMaterial): ObjectBindingPatch;
379
+
380
+ type SceneConfigPatch = DeepPartial<SceneConfig>;
381
+ /**
382
+ * Applies a nested scene-config patch without mutating either input. Objects
383
+ * are merged recursively, while arrays and tuples are replaced wholesale.
384
+ */
385
+ declare function patchSceneConfig(sceneConfig: SceneConfig, patch: SceneConfigPatch): SceneConfig;
386
+
387
+ type ObjectBindingsActionEffect = {
388
+ target: ObjectBindingTarget;
389
+ objectBindings: ObjectBindingPatch;
390
+ };
391
+ type SceneConfigActionEffect = {
392
+ sceneConfig: SceneConfigPatch;
393
+ };
394
+ type VisibilityActionEffect = {
395
+ target: ObjectBindingTarget;
396
+ visibility: "show" | "hide" | "toggle";
397
+ };
398
+ type CameraAction = {
399
+ type: "focus-object";
400
+ objectId?: string;
401
+ } | {
402
+ type: "fit-scene";
403
+ } | {
404
+ type: "reset";
405
+ } | {
406
+ type: "set-target";
407
+ target: [number, number, number];
408
+ transition?: boolean;
409
+ } | {
410
+ type: "set-state";
411
+ state: ViewerCameraState;
412
+ transition?: boolean;
413
+ };
414
+ type CameraActionEffect = {
415
+ camera: CameraAction;
416
+ };
417
+ type AnimationAction = {
418
+ type: "play";
419
+ clip: string;
420
+ } | {
421
+ type: "pause";
422
+ } | {
423
+ type: "stop";
424
+ } | {
425
+ type: "set-speed";
426
+ speed: number;
427
+ } | {
428
+ type: "seek";
429
+ time: number;
430
+ };
431
+ type AnimationActionEffect = {
432
+ animation: AnimationAction;
433
+ };
434
+ type ObjectActionEffect = ObjectBindingsActionEffect | SceneConfigActionEffect | VisibilityActionEffect | CameraActionEffect | AnimationActionEffect;
435
+
436
+ type ObjectBindingAction = {
437
+ id: "change-color" | "apply-texture" | "toggle-visibility" | string;
438
+ label: string;
439
+ type: "command";
440
+ effects?: ObjectActionEffect[];
441
+ };
442
+ 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";
443
+ type ObjectBindingStatus = "normal" | "hidden" | "selected" | "disabled";
444
+ type ObjectBindingTextureSlot = {
445
+ path: string;
446
+ };
447
+ type ObjectBindingTextureChannel = "baseColor" | "metalness" | "roughness" | "emissive" | "alpha" | "normal" | "bump" | "ao" | "displacement" | "clearcoat" | "clearcoatRoughness" | "clearcoatNormal" | "anisotropy" | "transmission" | "thickness" | "sheenColor" | "sheenRoughness" | "specularIntensity" | "specularColor";
448
+ type ObjectBindingTransform = {
449
+ /** Local-space position in model units. */
450
+ position?: [number, number, number];
451
+ /** Local-space Euler rotation in radians. */
452
+ rotation?: [number, number, number];
453
+ /** Local-space scale. */
454
+ scale?: [number, number, number];
455
+ };
456
+ declare const MATERIAL_SIDES: readonly ["front", "back", "double"];
457
+ type ObjectBindingMaterialSide = (typeof MATERIAL_SIDES)[number];
458
+ declare const MATERIAL_BLENDING_MODES: readonly ["normal", "additive"];
459
+ type ObjectBindingMaterialBlendingMode = (typeof MATERIAL_BLENDING_MODES)[number];
460
+ type ObjectBindingMaterial = {
461
+ texture?: ObjectBindingTextureSlot;
462
+ baseColor?: string;
463
+ metalness?: number;
464
+ metalnessMap?: ObjectBindingTextureSlot;
465
+ roughness?: number;
466
+ roughnessMap?: ObjectBindingTextureSlot;
467
+ emissive?: string;
468
+ emissiveIntensity?: number;
469
+ emissiveMap?: ObjectBindingTextureSlot;
470
+ opacity?: number;
471
+ alphaMap?: ObjectBindingTextureSlot;
472
+ alphaTest?: number;
473
+ alphaHash?: boolean;
474
+ dithering?: boolean;
475
+ blendingMode?: ObjectBindingMaterialBlendingMode;
476
+ side?: ObjectBindingMaterialSide;
477
+ normalMap?: ObjectBindingTextureSlot;
478
+ normalScale?: number;
479
+ flipNormalY?: boolean;
480
+ bumpMap?: ObjectBindingTextureSlot;
481
+ bumpScale?: number;
482
+ aoMap?: ObjectBindingTextureSlot;
483
+ aoMapIntensity?: number;
484
+ displacementMap?: ObjectBindingTextureSlot;
485
+ displacementScale?: number;
486
+ displacementBias?: number;
487
+ clearcoat?: number;
488
+ clearcoatMap?: ObjectBindingTextureSlot;
489
+ clearcoatRoughness?: number;
490
+ clearcoatRoughnessMap?: ObjectBindingTextureSlot;
491
+ clearcoatNormalMap?: ObjectBindingTextureSlot;
492
+ clearcoatNormalScale?: number;
493
+ flipClearcoatNormalY?: boolean;
494
+ sheen?: number;
495
+ sheenColor?: string;
496
+ sheenColorMap?: ObjectBindingTextureSlot;
497
+ sheenRoughness?: number;
498
+ sheenRoughnessMap?: ObjectBindingTextureSlot;
499
+ anisotropy?: number;
500
+ anisotropyRotation?: number;
501
+ anisotropyMap?: ObjectBindingTextureSlot;
502
+ transmission?: number;
503
+ transmissionMap?: ObjectBindingTextureSlot;
504
+ thickness?: number;
505
+ thicknessMap?: ObjectBindingTextureSlot;
506
+ attenuationColor?: string;
507
+ attenuationDistance?: number;
508
+ reflectivity?: number;
509
+ specularIntensity?: number;
510
+ specularIntensityMap?: ObjectBindingTextureSlot;
511
+ specularColor?: string;
512
+ specularColorMap?: ObjectBindingTextureSlot;
513
+ };
514
+ type ObjectBindingCameraState = {
515
+ position?: [number, number, number];
516
+ target?: [number, number, number];
517
+ fov?: number;
518
+ zoom?: number;
519
+ };
520
+ type ObjectBindingStyle = {
521
+ material?: ObjectBindingMaterial;
522
+ };
523
+ type ObjectBinding = {
524
+ id: string;
525
+ type: ObjectBindingType;
526
+ modelObjectId: string;
527
+ label?: string;
528
+ group?: string;
529
+ tags?: string[];
530
+ status?: ObjectBindingStatus;
531
+ visible?: boolean;
532
+ selectable?: boolean;
533
+ hoverable?: boolean;
534
+ transform?: ObjectBindingTransform;
535
+ style?: ObjectBindingStyle;
536
+ actions?: ObjectBindingAction[];
537
+ metrics?: Record<string, number>;
538
+ metadata?: Record<string, unknown>;
539
+ cameraState?: ObjectBindingCameraState;
540
+ };
541
+ type ObjectActionEvent = {
542
+ objectId: string;
543
+ action: ObjectBindingAction;
544
+ binding?: ObjectBinding;
545
+ screenX?: number;
546
+ screenY?: number;
547
+ };
548
+
549
+ /**
550
+ * Validates an object-bindings literal while preserving its exact keys and
551
+ * literal values for TypeScript autocomplete and derived union types.
552
+ *
553
+ * This is an identity function at runtime.
554
+ */
555
+ declare function defineObjectBindings<const TBindings extends Record<string, ObjectBinding>>(bindings: TBindings): TBindings;
556
+ /** Binding-map keys preserved by defineObjectBindings. */
557
+ type ObjectBindingKey<TBindings extends Record<string, ObjectBinding>> = Extract<keyof TBindings, string>;
558
+ /** Action ids declared on one binding in a defined bindings map. */
559
+ type ObjectBindingActionId<TBindings extends Record<string, ObjectBinding>, TKey extends ObjectBindingKey<TBindings>> = TBindings[TKey]["actions"] extends readonly (infer TAction)[] ? TAction extends {
560
+ id: infer TId extends string;
561
+ } ? TId : never : never;
562
+
563
+ export { type AnimationAction as A, type BindingEdit as B, type CameraAction as C, DEFAULT_SCENE_CONFIG as D, type SceneLight as E, type SceneLightAttachment as F, type SceneLightType as G, type SceneModelRenderer as H, type VisibilityActionEffect as I, defineObjectBindings as J, material as K, patchBindings as L, MATERIAL_BLENDING_MODES as M, patchSceneConfig as N, type ObjectActionEffect as O, selectBindingKeys as P, selectBindings as Q, type SceneAnimationClipConfig as S, type ViewerCameraState as V, type AnimationActionEffect as a, type AnimationLoopMode as b, type CameraActionEffect as c, MATERIAL_SIDES as d, type ObjectActionEvent as e, type ObjectBinding as f, type ObjectBindingAction as g, type ObjectBindingActionId as h, type ObjectBindingKey as i, type ObjectBindingMaterial as j, type ObjectBindingMaterialBlendingMode as k, type ObjectBindingMaterialSide as l, type ObjectBindingPatch as m, type ObjectBindingSelector as n, type ObjectBindingTarget as o, type ObjectBindingTextureChannel as p, type ObjectBindingTextureSlot as q, type ObjectBindingTransform as r, type ObjectBindingsActionEffect as s, type SceneAnimationConfig as t, type SceneAnnotationMarker as u, type SceneCinematicConfig as v, type SceneCinematicWaypoint as w, type SceneConfig as x, type SceneConfigActionEffect as y, type SceneConfigPatch as z };