@liveroom-tech/react-immersive 5.3.0 → 6.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.
- package/dist/binding-builder.css +1 -1
- package/dist/binding-builder.d.mts +5 -1
- package/dist/binding-builder.d.ts +5 -1
- package/dist/binding-builder.js +23 -20
- package/dist/binding-builder.mjs +1 -1
- package/dist/chunk-2JFUMJUP.mjs +1 -0
- package/dist/chunk-4JMJALRO.mjs +2 -0
- package/dist/chunk-OTSCPJWF.mjs +1 -0
- package/dist/chunk-P2JZ5Z7I.mjs +1 -0
- package/dist/chunk-UGPR4EPP.mjs +81 -0
- package/dist/chunk-V7WZUWJ5.mjs +1 -0
- package/dist/chunk-VQGYZOMX.mjs +3 -0
- package/dist/hosted.css +1 -1
- package/dist/hosted.d.mts +44 -17
- package/dist/hosted.d.ts +44 -17
- package/dist/hosted.js +22 -19
- package/dist/hosted.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.mts +70 -12
- package/dist/index.d.ts +70 -12
- package/dist/index.js +21 -18
- package/dist/index.mjs +1 -1
- package/dist/{materialVariants-DjTuiWmN.d.mts → modelFileResolver-Co7j1tdQ.d.mts} +122 -29
- package/dist/{materialVariants-DjTuiWmN.d.ts → modelFileResolver-Co7j1tdQ.d.ts} +122 -29
- package/dist/modelViewerProps-BibuMND7.d.ts +1988 -0
- package/dist/modelViewerProps-Ce4-wb57.d.mts +1988 -0
- package/dist/{publicProps-tJuWZgT3.d.ts → publicProps-BaJHCDa_.d.mts} +7 -0
- package/dist/{publicProps-tJuWZgT3.d.mts → publicProps-CP18d_mt.d.ts} +7 -0
- package/dist/simple-model-viewer.d.mts +2 -4
- package/dist/simple-model-viewer.d.ts +2 -4
- package/dist/simple-model-viewer.js +3 -3
- package/dist/simple-model-viewer.mjs +1 -1
- package/dist/utils.d.mts +62 -4
- package/dist/utils.d.ts +62 -4
- package/dist/utils.js +2 -1
- package/dist/utils.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-4FDMYUGT.mjs +0 -3
- package/dist/chunk-CV4E7DOO.mjs +0 -79
- package/dist/chunk-F4WT3HEK.mjs +0 -1
- package/dist/chunk-FPJZDEON.mjs +0 -1
- package/dist/chunk-JHKMRMJH.mjs +0 -1
- package/dist/chunk-TW2M4UXT.mjs +0 -1
- package/dist/chunk-W24UP6NM.mjs +0 -1
- package/dist/modelInfo-BQ5UZu95.d.ts +0 -43
- package/dist/modelInfo-CcYpydB7.d.mts +0 -43
- package/dist/modelViewerProps-BalkRDni.d.ts +0 -618
- package/dist/modelViewerProps-DdsJDRB7.d.mts +0 -618
- package/dist/rendererBackend-C_Jb4_Jy.d.mts +0 -917
- package/dist/rendererBackend-C_Jb4_Jy.d.ts +0 -917
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export { A as AnnotationMarker, C as CameraControllerType,
|
|
4
|
-
import { o as ObjectBinding, z as ObjectBindingTarget, v as ObjectBindingPatch, B as BindingEdit, s as ObjectBindingMaterial, H as ObjectBindingTextureSlot, F as ObjectBindingTextureChannel, J as ObjectBindingTransform, r as ObjectBindingDecal, a1 as SceneConfig, a3 as SceneConfigPatch, a6 as SceneLight, a7 as SceneLightAttachment, aq as ViewerIsolation, p as ObjectBindingAction, n as ObjectActionEvent, an as ViewerAnimationsProps, ar as ViewerObjectInfo, ap as ViewerCameraState } from './rendererBackend-C_Jb4_Jy.js';
|
|
5
|
-
export { A as AnimationAction, a as AnimationActionEffect, b as AnimationClipInfo, c as AnimationClipState, d as AnimationClipStatus, e as AnimationControls, f as AnimationLoopMode, g as AnimationPlayOptions, h as AnimationPlaybackState, C as CameraAction, i as CameraActionEffect, D as DEFAULT_SCENE_CONFIG, j as DEFAULT_SECTION_CONFIG, k as DeepPartial, E as EnvironmentPreset, G as GlitchModeName, I as IsolatedObjectBindings, l as IsolationActionEffect, K as KernelSizeName, M as MATERIAL_BLENDING_MODES, m as MATERIAL_SIDES, O as ObjectActionEffect, q as ObjectBindingCameraState, t as ObjectBindingMaterialBlendingMode, u as ObjectBindingMaterialSide, w as ObjectBindingSelector, x as ObjectBindingStatus, y as ObjectBindingStyle, L as ObjectBindingType, N as ObjectBindingsActionEffect, P as ObjectPointerEvent, Q as ObjectSurfacePoint, R as RampTypeName, S as RendererBackend, T as SceneAnimationClipConfig, U as SceneAnimationConfig, V as SceneAnnotationCameraView, W as SceneAnnotationImage, X as SceneAnnotationLink, Y as SceneAnnotationMarker, Z as SceneBackgroundConfig, _ as SceneCameraConfig, $ as SceneCinematicConfig, a0 as SceneCinematicWaypoint, a2 as SceneConfigActionEffect, a4 as SceneEnvironmentConfig, a5 as SceneGroundShadowConfig, a8 as SceneLightType, a9 as SceneLightingConfig, aa as SceneModelConfig, ab as SceneModelRenderer, ac as ScenePostProcessingConfig, ad as SceneSectionAxis, ae as SceneSectionConfig, af as SceneShadowConfig, ag as SceneStyleColorScale, ah as SceneStyleCondition, ai as SceneStylePulse, aj as SceneStyleRule, ak as SceneWireframeConfig, al as StyledObjectBindings, am as StyledObjectPulse, ao as ViewerCameraConfig, as as VisibilityActionEffect, at as applyIsolation, au as applyStyleRules, av as colorScaleValue, aw as isolatedBindingKeys, ax as material, ay as patchBindings, az as patchSceneConfig, aA as selectBindingKeys, aB as selectBindings, aC as useViewerAnimations } from './rendererBackend-C_Jb4_Jy.js';
|
|
2
|
+
import { ag as ModelViewerProps, bk as SemanticComparisonOptions, K as ConfigurationComparisonReport, ao as ObjectBinding, az as ObjectBindingTarget, av as ObjectBindingPatch, B as BindingEdit, as as ObjectBindingMaterial, aB as ObjectBindingTextureSlot, aA as ObjectBindingTextureChannel, aC as ObjectBindingTransform, ar as ObjectBindingDecal, aX as SceneConfig, aZ as SceneConfigPatch, b0 as SceneLight, b1 as SceneLightAttachment, bI as ViewerIsolation, ap as ObjectBindingAction, an as ObjectActionEvent, bB as ViewerAnimationsProps, bE as ViewerCameraProps, bK as ViewerReadyState, x as CaptureImageOptions, y as CaptureVideoOptions, bJ as ViewerObjectInfo, bA as UseViewerCameraOptions, bv as ShareableViewerState, bF as ViewerCameraState, bG as ViewerConfiguration, bM as ViewerStateStorage, ad as ModelViewerModelEntry, t as AssetTransform, q as AssetDiagnosticsReport, bL as ViewerRuntimeStats, bm as SequenceControls, bq as SequencePlaybackState } from './modelViewerProps-BibuMND7.js';
|
|
3
|
+
export { A as ARExportOptions, a as ARHandoffOptions, b as ARHandoffRequest, c as ARHandoffStatus, d as ARSnapshot, e as ARSnapshotSource, f as AnimationAction, g as AnimationActionEffect, h as AnimationClipInfo, i as AnimationClipState, j as AnimationClipStatus, k as AnimationControls, l as AnimationLoopMode, m as AnimationPlayOptions, n as AnimationPlaybackState, o as AnnotationMarker, p as AssetDiagnosticIssue, r as AssetDiagnosticsSource, s as AssetTextureDiagnostic, C as CameraAction, u as CameraActionEffect, v as CameraControllerType, w as CameraLimits, z as CinematicConfig, D as CinematicWaypoint, E as ComparisonCategory, F as ComparisonChange, G as ComparisonHighlight, H as ComparisonObject, I as ComparisonStatus, J as ConfigurationComparisonInput, L as CustomObjectBindingDataPanelProps, M as CustomSceneObjectsPanelProps, N as DEFAULT_SCENE_CONFIG, O as DEFAULT_SECTION_CONFIG, P as DecalMoveTarget, Q as DeepPartial, R as EnvironmentPreset, S as GlitchModeName, T as GroupedModelViewerProps, U as HomeCameraState, V as InspectAssetOptions, W as IsolatedObjectBindings, X as IsolationActionEffect, Y as KernelSizeName, Z as MATERIAL_BLENDING_MODES, _ as MATERIAL_SIDES, $ as MAX_VIEWER_STATE_BYTES, a0 as MODEL_VIEWER_PRESETS, a1 as MeasurementAnchor, a2 as MeasurementCollection, a3 as MeasurementPoint, a4 as MeasurementPosition, a5 as MeasurementResult, a6 as MeasurementSettings, a7 as MeasurementStatus, a8 as MeasurementTool, a9 as MeasurementUnit, aa as ModelMergeSource, ab as ModelViewerControlsOptions, ac as ModelViewerDecoderOptions, ae as ModelViewerPerfOptions, af as ModelViewerPreset, ah as ModelViewerTilesOptions, ai as ModelViewerToolsOptions, aj as ModelViewerUiOptions, ak as ModelViewerXrOptions, al as MouseControllerPosition, am as ObjectActionEffect, aq as ObjectBindingCameraState, at as ObjectBindingMaterialBlendingMode, au as ObjectBindingMaterialSide, aw as ObjectBindingSelector, ax as ObjectBindingStatus, ay as ObjectBindingStyle, aD as ObjectBindingType, aE as ObjectBindingsActionEffect, aF as ObjectPointerEvent, aG as ObjectSurfacePoint, aH as ObjectTransformSpace, aI as PerformanceProfile, aJ as RampTypeName, aK as RendererBackend, aL as SavedMeasurement, aM as SceneAnimationClipConfig, aN as SceneAnimationConfig, aO as SceneAnnotationCameraView, aP as SceneAnnotationImage, aQ as SceneAnnotationLink, aR as SceneAnnotationMarker, aS as SceneBackgroundConfig, aT as SceneCameraConfig, aU as SceneCinematicConfig, aV as SceneCinematicWaypoint, aY as SceneConfigActionEffect, a_ as SceneEnvironmentConfig, a$ as SceneGroundShadowConfig, b2 as SceneLightType, b3 as SceneLightingConfig, b4 as SceneModelConfig, b5 as SceneModelRenderer, b6 as ScenePostProcessingConfig, b7 as SceneSectionAxis, b8 as SceneSectionConfig, b9 as SceneSectionPlane, ba as SceneSectionPreset, bb as SceneSectionSettings, bc as SceneSelectionSet, bd as SceneSequence, be as SceneShadowConfig, bf as SceneStyleColorScale, bg as SceneStyleCondition, bh as SceneStylePulse, bi as SceneStyleRule, bj as SceneWireframeConfig, bl as SequenceCameraView, bn as SequenceEasing, bo as SequenceKeyframe, bp as SequenceObjectProperty, br as SequenceTarget, bs as SequenceTrack, bt as SequenceValue, bu as SequenceVector3, bw as StreamingDiagnostics, bx as StyledObjectBindings, by as StyledObjectPulse, bz as TexturePositioningControls, bC as ViewerCameraConfig, bD as ViewerCameraPreset, bH as ViewerEngagementEvent, bN as VisibilityActionEffect, bO as XRScaleMode, bP as applyIsolation, bQ as applyStyleRules, bR as colorScaleValue, bS as compareViewerConfigurations, bT as groundAsset, bU as isolatedBindingKeys, bV as material, bW as parseAssetTransform, bX as parseSelectionSets, bY as parseViewerState, bZ as patchBindings, b_ as patchSceneConfig, b$ as prepareViewerState, c0 as selectBindingKeys, c1 as selectBindings, c2 as serializeViewerState, c3 as snapAssetToGrid, c4 as useViewerAnimations, c5 as useViewerCamera } from './modelViewerProps-BibuMND7.js';
|
|
6
4
|
import { SceneLightInput } from './utils.js';
|
|
7
|
-
export { ACTION_CATALOG, ActionCatalogEntry, ActionHandling, ObjectBindingActionId, ObjectBindingKey, buildBindingsFromNodes, createDefaultBinding, defineObjectBindings, findCatalogAction, inferType, sceneLight } from './utils.js';
|
|
8
|
-
import {
|
|
9
|
-
export {
|
|
10
|
-
import { M as MaterialVariantGroup } from './materialVariants-DjTuiWmN.js';
|
|
11
|
-
export { D as DEFAULT_MODEL_VIEWER_LABELS, a as MaterialVariantOption, b as ModelViewerLabelKey, c as ModelViewerLabels, R as ReducedMotionSetting, d as chooseMaterialVariant } from './materialVariants-DjTuiWmN.js';
|
|
5
|
+
export { ACTION_CATALOG, ActionCatalogEntry, ActionHandling, MEASUREMENT_UNITS, ObjectBindingActionId, ObjectBindingKey, SEQUENCE_EASINGS, SEQUENCE_OBJECT_PROPERTIES, ViewerHierarchyNode, buildBindingsFromNodes, calibrateMeasurements, collectObjectHierarchy, copyBindingStyle, createARHandoffUrl, createDefaultBinding, defineObjectBindings, exportConfiguredUSDZ, findCatalogAction, inferType, inspectAsset, measurementResult, measurementScale, measurementValue, measurementsToCsv, parseMeasurements, parseSectionConfig, parseSequences, pasteBindingStyle, readARHandoffUrl, sampleSequenceTrack, sceneLight, sectionSnapshot, serializeMeasurements, upsertSequenceKeyframe } from './utils.js';
|
|
6
|
+
import { e as ViewerModelBounds, M as MaterialVariantGroup, f as ViewerModelInfo } from './modelFileResolver-Co7j1tdQ.js';
|
|
7
|
+
export { D as DEFAULT_MODEL_VIEWER_LABELS, a as MaterialVariantOption, b as ModelFormat, c as ModelViewerLabelKey, d as ModelViewerLabels, R as ReducedMotionSetting, V as ViewerLoading, g as ViewerReveal, h as chooseMaterialVariant } from './modelFileResolver-Co7j1tdQ.js';
|
|
12
8
|
import 'three';
|
|
13
9
|
import '@react-three/drei';
|
|
14
10
|
|
|
@@ -21,6 +17,14 @@ type CompareViewerSide = Partial<ModelViewerProps> & {
|
|
|
21
17
|
};
|
|
22
18
|
type CompareViewerProps = Partial<ModelViewerProps> & {
|
|
23
19
|
licenseKey: string;
|
|
20
|
+
/** Opt in to authored object/scene change details and bounds outlines. */
|
|
21
|
+
semanticComparison?: boolean | SemanticComparisonOptions;
|
|
22
|
+
/** Show colored comparison bounds. Default true; controlled when supplied. */
|
|
23
|
+
showComparisonOutlines?: boolean;
|
|
24
|
+
onComparisonOutlinesChange?: (enabled: boolean) => void;
|
|
25
|
+
/** Inspect both sides with the same cut. Defaults to true with semantic comparison. */
|
|
26
|
+
linkSections?: boolean;
|
|
27
|
+
onComparisonChange?: (report: ConfigurationComparisonReport) => void;
|
|
24
28
|
/** The left side: the shared props with these on top. */
|
|
25
29
|
before: CompareViewerSide;
|
|
26
30
|
/** The right side. */
|
|
@@ -414,23 +418,77 @@ type UseShareableViewerStateOptions = {
|
|
|
414
418
|
onObjectBindingsChange: (next: Record<string, ObjectBinding>) => void;
|
|
415
419
|
selectedObjectBinding: ObjectBinding | null;
|
|
416
420
|
setSelectedObjectBinding: (binding: ObjectBinding | null) => void;
|
|
421
|
+
/** Controlled props to include: scene settings, model sources, isolation, etc. */
|
|
422
|
+
configuration?: ViewerConfiguration;
|
|
423
|
+
/** Apply configuration to the same controlled props passed to ModelViewer. */
|
|
424
|
+
onConfigurationChange?: (next: ViewerConfiguration) => void;
|
|
425
|
+
/** Set false while the active model is loading; restoration resumes when true. */
|
|
426
|
+
isReady?: boolean;
|
|
427
|
+
/** Defaults to configuration when configuration is supplied, otherwise compact legacy view mode. */
|
|
428
|
+
mode?: "configuration" | "view";
|
|
429
|
+
/** Application-owned storage for asynchronous short links. No server is required by the SDK. */
|
|
430
|
+
storage?: ViewerStateStorage;
|
|
431
|
+
/** Maximum inline URL length. Default 65536; use storage or JSON for larger states. */
|
|
432
|
+
maxUrlLength?: number;
|
|
433
|
+
/** Reports background auto-sync, hashchange and pending-restore failures. */
|
|
434
|
+
onError?: (error: Error) => void;
|
|
417
435
|
paramKey?: string;
|
|
418
436
|
debounceMs?: number;
|
|
437
|
+
/** Sync starts after the incoming link has been read and fully restored. */
|
|
419
438
|
autoSync?: boolean;
|
|
420
439
|
};
|
|
421
440
|
type ShareableViewerStateProps = {
|
|
441
|
+
/** Detached, versioned snapshot for JSON saving or application persistence. */
|
|
442
|
+
getState: () => ShareableViewerState;
|
|
443
|
+
/** Includes live local texture/decal images as portable data URLs. */
|
|
444
|
+
getStateAsync: () => Promise<ShareableViewerState>;
|
|
445
|
+
/** Restore JSON or parsed saved state. False while waiting for the model/configuration. */
|
|
446
|
+
restoreState: (state: unknown) => Promise<boolean>;
|
|
422
447
|
getShareUrl: () => string;
|
|
448
|
+
/** Uses storage when provided; otherwise returns an inline link. */
|
|
449
|
+
createShareUrl: () => Promise<string>;
|
|
423
450
|
syncUrl: () => void;
|
|
424
451
|
restoreFromUrl: () => Promise<boolean>;
|
|
425
452
|
};
|
|
426
|
-
declare function useShareableViewerState(
|
|
453
|
+
declare function useShareableViewerState(options: UseShareableViewerStateOptions): ShareableViewerStateProps;
|
|
427
454
|
|
|
455
|
+
/** Owns independent instances, their bindings/settings, placement and active selection. */
|
|
428
456
|
declare function useViewerModels(initialModels: ModelViewerModelEntry[]): {
|
|
429
457
|
modelUrl: string;
|
|
430
458
|
models: ModelViewerModelEntry[];
|
|
431
|
-
|
|
459
|
+
activeModelId: string;
|
|
460
|
+
onModelChange: (url: string) => void;
|
|
461
|
+
onActiveModelChange: react.Dispatch<react.SetStateAction<string>>;
|
|
432
462
|
objectBindings: Record<string, ObjectBinding>;
|
|
433
463
|
onObjectBindingsChange: (next: Record<string, ObjectBinding>) => void;
|
|
464
|
+
sceneConfig: SceneConfig | undefined;
|
|
465
|
+
onSceneConfigChange: (sceneConfig: SceneConfig) => void;
|
|
466
|
+
addModel: (model: ModelViewerModelEntry) => string;
|
|
467
|
+
duplicateModel: (id: string) => string | null;
|
|
468
|
+
removeModel: (id: string) => void;
|
|
469
|
+
updateModelTransform: (id: string, transform: AssetTransform) => void;
|
|
434
470
|
};
|
|
435
471
|
|
|
436
|
-
|
|
472
|
+
type AssetDiagnosticsPanelProps = {
|
|
473
|
+
report: AssetDiagnosticsReport | null;
|
|
474
|
+
runtimeStats?: ViewerRuntimeStats | null;
|
|
475
|
+
onRefresh?: () => void;
|
|
476
|
+
onSelectObject?: (name: string) => void;
|
|
477
|
+
};
|
|
478
|
+
/** Read-only report UI, reusable outside the editor. No scene data is sent anywhere. */
|
|
479
|
+
declare function AssetDiagnosticsPanel({ report, runtimeStats: runtime, onRefresh, onSelectObject }: AssetDiagnosticsPanelProps): react.JSX.Element;
|
|
480
|
+
|
|
481
|
+
type ViewerSequencesProps = {
|
|
482
|
+
controls: SequenceControls | null;
|
|
483
|
+
playback: SequencePlaybackState;
|
|
484
|
+
handleSequencesReady: (controls: SequenceControls | null) => void;
|
|
485
|
+
play: (id?: string) => boolean;
|
|
486
|
+
pause: () => void;
|
|
487
|
+
stop: () => void;
|
|
488
|
+
seek: (time: number) => boolean;
|
|
489
|
+
select: (id: string) => boolean;
|
|
490
|
+
};
|
|
491
|
+
/** Connect to ModelViewer.onSequencesReady for programmatic sequence playback. */
|
|
492
|
+
declare function useViewerSequences(): ViewerSequencesProps;
|
|
493
|
+
|
|
494
|
+
export { AssetDiagnosticsPanel, type AssetDiagnosticsPanelProps, AssetDiagnosticsReport, AssetTransform, BindingEdit, CaptureImageOptions, CaptureVideoOptions, CompareViewer, type CompareViewerProps, type CompareViewerSide, ConfigurationComparisonReport, type HiddenObjectsState, MaterialVariantGroup, PublicModelViewer as ModelViewer, ModelViewerModelEntry, ModelViewerProps, ObjectActionEvent, ObjectBinding, ObjectBindingAction, ObjectBindingDecal, ObjectBindingMaterial, ObjectBindingPatch, ObjectBindingTarget, ObjectBindingTextureChannel, ObjectBindingTextureSlot, ObjectBindingTransform, type ObjectBindingsController, type RuntimeMaterialPatch, type RuntimeMaterialRanges, type RuntimePointLightOptions, type RuntimePointLightPatch, type RuntimeTransformPatch, type RuntimeTransformRanges, SceneConfig, type SceneConfigController, SceneConfigPatch, type SceneConfigUpdate, SceneLight, SceneLightAttachment, SceneLightInput, type SceneLightPatch, type SceneLightsController, SemanticComparisonOptions, SequenceControls, SequencePlaybackState, ShareableViewerState, type ShareableViewerStateProps, type UseShareableViewerStateOptions, UseViewerCameraOptions, type UseViewerEffectsOptions, type UseViewerOptions, type UseViewerProps, type UseViewerResult, type ViewerActionAnimationController, type ViewerActionBindingsController, type ViewerActionCameraController, type ViewerActionIsolationController, type ViewerActionSceneController, type ViewerActionsOptions, type ViewerActionsProps, ViewerAnimationsProps, ViewerCameraProps, ViewerCameraState, ViewerConfiguration, type ViewerConnectionController, type ViewerEffectChannels, type ViewerEffectEasing, type ViewerEffectRange, type ViewerEffectTarget, type ViewerEffectsController, type ViewerFlickerOptions, type ViewerHoverProps, ViewerIsolation, type ViewerIsolationProps, type ViewerLightEffectChannel, type ViewerMaterialEffectChannel, ViewerModelBounds, ViewerModelInfo, type ViewerModelProps, ViewerObjectInfo, type ViewerPulseOptions, type ViewerReadyConsumer, type ViewerReadyHandler, ViewerReadyState, ViewerRuntimeStats, type ViewerSelectionProps, type ViewerSequencesProps, ViewerStateStorage, type ViewerTimelineOptions, type ViewerTimelineStep, type ViewerTransformEffectChannel, type ViewerTransitionOptions, type ViewerVector3, useObjectBinding, useObjectBindingIds, useObjectBindings, useSceneConfig, useShareableViewerState, useViewer, useViewerActions, useViewerConnection, useViewerEffects, useViewerHover, useViewerIsolation, useViewerModel, useViewerModels, useViewerSelection, useViewerSequences };
|