@liveroom-tech/react-immersive 6.0.1 → 6.1.0

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.
Files changed (67) hide show
  1. package/README.md +26 -2
  2. package/dist/AnimationsTab-NUJTEMZ5.mjs +1 -0
  3. package/dist/AnnotationsTab-OHRVWRKI.mjs +1 -0
  4. package/dist/CinematicTab-IJAY2BS6.mjs +1 -0
  5. package/dist/ConfigureTab-UQRRATCY.mjs +6 -0
  6. package/dist/RulesTab-YVBZGJZX.mjs +1 -0
  7. package/dist/SequencesTab-IC5LWQ6N.css +1 -0
  8. package/dist/SequencesTab-RPJAG26Z.mjs +1 -0
  9. package/dist/binding-builder.css +1 -1
  10. package/dist/binding-builder.d.mts +3 -3
  11. package/dist/binding-builder.d.ts +3 -3
  12. package/dist/binding-builder.js +76 -23
  13. package/dist/binding-builder.mjs +1 -1
  14. package/dist/chunk-2DV2UCQH.mjs +1 -0
  15. package/dist/chunk-37YITTIK.mjs +1 -0
  16. package/dist/chunk-5FLX45O5.mjs +2 -0
  17. package/dist/chunk-6CTCV2Q5.mjs +1 -0
  18. package/dist/chunk-7JCFNZJM.mjs +1 -0
  19. package/dist/chunk-7OWHW66D.mjs +1 -0
  20. package/dist/chunk-AL6UIGWP.mjs +1 -0
  21. package/dist/chunk-BNKTI3CY.mjs +1 -0
  22. package/dist/chunk-CCBFMNAU.mjs +1 -0
  23. package/dist/chunk-E24EFHB5.mjs +1 -0
  24. package/dist/chunk-EV6THDXD.mjs +1 -0
  25. package/dist/chunk-F5QSXMME.mjs +1 -0
  26. package/dist/chunk-FGAJ2UT7.mjs +1 -0
  27. package/dist/chunk-FXV4CLAK.mjs +1 -0
  28. package/dist/chunk-GV4ZRXL6.mjs +1 -0
  29. package/dist/chunk-KHN55ZM7.mjs +3 -0
  30. package/dist/chunk-LX3GXQNU.mjs +1 -0
  31. package/dist/chunk-OPZJDP7T.mjs +1 -0
  32. package/dist/chunk-OREKYGO3.mjs +83 -0
  33. package/dist/chunk-PBVBZYOG.mjs +47 -0
  34. package/dist/chunk-T6AYLPCC.mjs +1 -0
  35. package/dist/hosted.css +1 -1
  36. package/dist/hosted.d.mts +22 -6
  37. package/dist/hosted.d.ts +22 -6
  38. package/dist/hosted.js +75 -22
  39. package/dist/hosted.mjs +1 -1
  40. package/dist/index.css +1 -1
  41. package/dist/index.d.mts +66 -6
  42. package/dist/index.d.ts +66 -6
  43. package/dist/index.js +69 -21
  44. package/dist/index.mjs +1 -1
  45. package/dist/{modelFileResolver-Co7j1tdQ.d.mts → modelFileResolver-BEW_95id.d.mts} +52 -7
  46. package/dist/{modelFileResolver-Co7j1tdQ.d.ts → modelFileResolver-BEW_95id.d.ts} +52 -7
  47. package/dist/{modelViewerProps-BibuMND7.d.ts → modelViewerProps-C7saa0i2.d.mts} +173 -3
  48. package/dist/{modelViewerProps-Ce4-wb57.d.mts → modelViewerProps-CbK_4uZj.d.ts} +173 -3
  49. package/dist/{publicProps-BaJHCDa_.d.mts → publicProps-NKTiohZO.d.mts} +1 -1
  50. package/dist/{publicProps-CP18d_mt.d.ts → publicProps-z7cJhUH8.d.ts} +1 -1
  51. package/dist/simple-model-viewer.css +1 -1
  52. package/dist/simple-model-viewer.d.mts +25 -3
  53. package/dist/simple-model-viewer.d.ts +25 -3
  54. package/dist/simple-model-viewer.js +49 -3
  55. package/dist/simple-model-viewer.mjs +1 -1
  56. package/dist/utils.d.mts +47 -4
  57. package/dist/utils.d.ts +47 -4
  58. package/dist/utils.js +2 -2
  59. package/dist/utils.mjs +1 -1
  60. package/package.json +5 -1
  61. package/dist/chunk-2JFUMJUP.mjs +0 -1
  62. package/dist/chunk-4JMJALRO.mjs +0 -2
  63. package/dist/chunk-OTSCPJWF.mjs +0 -1
  64. package/dist/chunk-P2JZ5Z7I.mjs +0 -1
  65. package/dist/chunk-UGPR4EPP.mjs +0 -81
  66. package/dist/chunk-V7WZUWJ5.mjs +0 -1
  67. package/dist/chunk-VQGYZOMX.mjs +0 -3
@@ -1 +0,0 @@
1
- var F={verifyingLicense:"Verifying License",checkingYourLicenseKey:"Checking your license key...",invalidLicense:"Invalid License",licenseHasBeenRevokedOrHasExpired:"License has been revoked or has expired",failedToLoadPleaseContactTheSiteAdministrator:"Failed to load. Please contact the site administrator.",contextRestoringTitle:"Reloading viewer\u2026",contextLostTitle:"3D view interrupted",contextRestoringMessage:"Rebuilding the 3D view. Please wait\u2026",contextLostMessage:"The graphics connection was interrupted. The viewer will rebuild when it returns, or you can reload it now.",reloadViewer:"Reload viewer",texturePositioningHint:"Drag to move \xB7 Scroll to zoom \xB7 Click elsewhere to finish",texturePositioningStartHint:"Double-click to move or zoom",dismiss:"Dismiss",missingUVsAreShownInMagenta:"Missing UVs are shown in magenta.",viewThisModelInARWithAppleQuickLook:"View this model in AR with Apple Quick Look",sequencePlayer:"Sequence player",sequenceSelect:"Sequence",sequencePlay:"Play sequence",sequencePause:"Pause sequence",sequenceStop:"Stop and restore scene",sequencePlayhead:"Sequence playhead",sequenceTime:"Sequence time",sequenceIssues:"Unavailable sequence targets",arConfiguredButton:"AR handoff",arConfiguredTitle:"Take this configuration to AR",arConfiguredDescription:"Your current materials, visible models and placements are included.",arSnapshotStale:"Updating AR to include your latest changes\u2026",arPreparing:"Preparing your scene\u2026",arRefresh:"Refresh AR",arRetry:"Try again",arExportDetails:"Export details",arPrepare:"Prepare AR",arPrepareAgain:"Prepare again",arDownloadUSDZ:"Download USDZ for iPhone/iPad",arScanConfigured:"Scan to open this configuration on your phone.",arOpenConfiguredLink:"Open configuration link",viewInAR:"View in AR",openThisExperienceOnAPhoneForAR:"Open this experience on a phone for AR",openOnPhone:"Open on phone",viewThisModelInYourSpace:"View this model in your space",viewThisModelInVR:"View this model in VR",closePhoneHandoff:"Close phone handoff",arScanCode:"Scan the code and choose AR.",qrCodeToOpenThisModelOnAPhone:"QR code to open this model on a phone",disableUVChecker:"Disable UV checker",enableUVChecker:"Enable UV checker",explodedView:"Exploded view",explodeAmount:"Explode amount",removeSectionCut:"Remove section cut",sectionCut:"Section cut",sectionAxis:"Section axis",sectionPosition:"Section position",keepTheOtherSide:"Keep the other side",pauseCinematic:"Pause cinematic",playCinematic:"Play cinematic",stopCinematicAndResetCamera:"Stop cinematic and reset camera",cancel:"Cancel",annotationCategories:"Annotation categories",annotations:"Annotations",all:"All",uncategorized:"Uncategorized",decalDragHint:"Drag the decal on the object. Release to save; Escape to cancel.",showAll:"Show all",materialVariants:"Material variants",startGuidedTour:"Start guided tour",guidedTour:"Guided Tour",previousAnnotation:"Previous annotation",previous:"Prev",stopGuidedTour:"Stop guided tour",nextAnnotation:"Next annotation",next:"Next",exitFullscreen:"Exit fullscreen",enterFullscreen:"Enter fullscreen",resetCameraView:"Reset camera view",orbitControl:"Orbit Control",pointLock:"Point Lock",cameraController:"Camera controller",cameraControllerSettings:"Camera controller settings",downloadGLB:"Download GLB",downloadGLBDescription:"All visible models, material edits and animations in one file. No annotations or separate editor model slots. Duplicate mesh names may change on reimport.",downloadCombinedGLB:"Download as one GLB",downloadSeparateGLBs:"Download separate GLBs",downloadSeparateGLBsDescription:"One GLB file per model",downloadPNG:"Download PNG",downloadUVLayout:"Download UV Layout",videoFormat:"Video format",auto:"Auto",recordTurntableVideo:"Record turntable video",recordCinematicVideo:"Record cinematic video",videoUnsupported:"Video recording is not supported in this browser.",downloadOptions:"Download options",exporting:"Exporting\u2026",download:"Download",annotationTitlePlaceholder:"Title *",description:"Description",ok:"OK",arRelocate:"Relocate",tapToPlace:"Tap to place",closeAnnotation:"Close annotation",learnMore:"Learn more",stopMeasuring:"Stop measuring",startMeasuring:"Start measuring",toggleBoundingDimensions:"Toggle bounding dimensions",measurementTool:"Measurement tool",distance:"Distance",angle:"Angle",area:"Area",pointToPlane:"Point to plane",wrap:"Circumference (Edge)",wrapHorizontal:"Circumference (Horizontal)",measurementSnapping:"Measurement snapping",noSnapping:"No snapping",snapAuto:"Snap: auto",snapVertex:"Snap: vertex",snapEdge:"Snap: edge",undoMeasurementPoint:"Undo measurement point",clearMeasurements:"Clear measurements",finishArea:"Finish area",savedMeasurements:"Saved measurements ({count})",noSavedMeasurements:"No saved measurements yet. Pick points in the preview, then save a measurement here.",measurementFiles:"Import / export",measurementSourceUnit:"Model units",measurementDisplayUnit:"Display units",measurementName:"Measurement name",measurementNamePlaceholder:"e.g. Door width",saveMeasurement:"Save measurement",knownMeasurementDistance:"Known distance",calibrationUnit:"Calibration unit",calibrateMeasurement:"Calibrate",measurementCalibrationHint:"Pick two distance points, enter their known length, then calibrate.",measurementCalibratedScale:"Calibrated: 1 model unit = {scale} m",resetMeasurementCalibration:"Reset calibration",showSavedMeasurement:"Show {name}",renameSavedMeasurement:"Rename {name}",deleteSavedMeasurement:"Delete {name}",exportMeasurementJson:"Export JSON",exportMeasurementCsv:"Export CSV",importMeasurementJson:"Import JSON",measurementReady:"Ready",measurementApproximate:"Approximate LOD",measurementModelChanged:"Different model",measurementObjectMissing:"Object unavailable",measurementGeometryChanged:"Geometry changed \u2014 measure again",measurementPoseChanged:"Pose changed \u2014 measure again",measurementObjectHidden:"Object hidden",measurementInvalid:"Invalid measurement",measurementWaiting:"Waiting for model",openSceneObjectsPanel:"Open scene objects panel",sceneObjects:"SCENE OBJECTS",searchNodesLabels:"Search nodes, labels",closeSceneObjectsPanel:"Close scene objects panel",objectNavigator:"Objects in the 3D view",compareBefore:"Before",compareAfter:"After",compareDivider:"Comparison divider",viewIn3D:"View in 3D",objectNavigatorHint:"Arrow keys browse \xB7 Enter selects \xB7 Esc clears",selectionCleared:"Selection cleared",cameraKeyboardHelp:"3D view. Arrow keys orbit, Shift with Up or Down zooms, and W, A, S, D, Space and C move the camera.",isolate:"Isolate",hide:"Hide",show:"Show",closePanel:"Close panel",actions:"Actions",openPanel:"Open panel",close:"Close",position:"Position",decalNudgeHint:"Click to fine-tune \xB7 Hold to move",decalNudgeControls:"Move decal in small steps",text:"Text",yourText:"Your text",textToAdd:"Text to add",textColour:"Text colour",addText:"Add text",image:"Image",chooseImage:"Choose image",imageToAdd:"Image to add",added:"Added",colour:"Colour",size:"Size",turn:"Turn",rotation:"Rotation",dragTheDecalAcrossTheObjectsSurface:"Drag the decal across the object's surface",move:"Move",remove:"Remove",noneAddedYet:"None added yet",done:"Done",moveForward:"Move forward",moveLeft:"Move left",moveRight:"Move right",moveBackward:"Move backward",sceneSettings:"Scene Settings",background:"Background",backgroundColor:"Background Color",environment:"Environment",autoRotate:"Auto Rotate",lighting:"Lighting",exposure:"Exposure",ambientLightIntensity:"Ambient Light Intensity",ambientLightColor:"Ambient Light Color",directLightIntensity:"Direct Light Intensity",directLightColor:"Direct Light Color",searchObjects:"Search objects",uploadedModel:"Uploaded model",clear:"Clear",chooseModel:"Choose model",loadingModel:"Loading model...",releaseToLoadYourModel:"Release to load your model",arFindSurface:"Move your device over a flat surface",arReleaseToPlace:"Release to place",arGestureHint:"Pinch to resize \xB7 Twist to rotate",angleFirstArmHint:"Pick the first arm",angleVertexHint:"Pick the angle's vertex",angleSecondArmHint:"Pick the second arm",angleNewHint:"Pick a point to start a new angle",areaNewHint:"Pick a point to start a new area",areaCornersHint:"Pick polygon corners in order, then Finish area",pointToPlaneFaceHint:"Pick the reference face",pointToPlanePointHint:"Pick a point to measure its perpendicular distance",pointToPlaneNewHint:"Pick a face to start a new measurement",distanceHint:"Pick points on the model to measure distances",wrapHint:"Click a point on the surface to measure its circumference, following the surface (best for limbs)",wrapHorizontalHint:"Click a point to measure a level circumference around it (best for the torso/waist)",visibleEntries:"{count} visible entries",objectCount:"{count} objects",annotationMarker:"Annotation {id}: {title}",recordingVideo:"Recording video \xB7 {progress}%",isolatedObjects:"Isolated: {count} objects",largeModelWarning:"Very large model ({millions}M triangles) \u2014 it may render and move slowly on this device, and click/hover selection on the model is disabled. Use the objects panel to select parts.",preparingLargeModel:"Preparing large model ({millions}M triangles) \u2014 the first display can take a while on this device...",enterAR:"Enter AR",enterVR:"Enter VR",decalImage:"Image {index}",decalText:"Text {index}",decalAdded:"{count} added",up:"up",down:"down",left:"left",right:"right",moveDecal:"Move decal {direction}",moveDecalOnSurface:"Move {direction} on the visible surface",showAllObject:"Show all {name}",isolateObject:"Isolate {name}",isolatedObject:"Isolated: {name}",hideObject:"Hide {name}",showObject:"Show {name}",objectSelected:"{name} selected",objectNavigatorPosition:"{position} of {count}",compareDividerValue:"{before} {percent}%, {after} {rest}%",bindingMismatchOne:"1 object binding doesn't match this model",bindingMismatchMany:"{count} object bindings don't match this model",simpleLargeModelWarning:"Very large model detected ({millions}M triangles) \u2014 it may render and move slowly on this device, and click/hover selection on the model is disabled. Use the scene objects panel to select parts.",dropModelHint:"Drag and drop {formats} here",loadErrorTitle:"This model couldn't be loaded",loadErrorNotFound:"Nothing was found at this address ({status}). Check that modelUrl points to the file.",loadErrorDenied:"The server refused access to the file ({status}). Check that the file is public, or that a signed URL hasn't expired.",loadErrorStatus:"The server responded with {status} when the file was requested.",loadErrorNetwork:"The download was blocked or failed. Check that the URL is correct and, if the file is on another domain, that its server allows cross-origin requests (CORS) from this site.",loadErrorHtml:"The server sent back a web page instead of a model. There's probably no file at this path: many servers answer a missing file with their index.html.",loadErrorInvalidFile:"The file couldn't be read as {format}. Check that it's a valid {format} file.",loadErrorInvalidExplicitFormat:"The file couldn't be read as {format}. Check that it's a valid {format} file and that modelFormat matches it.",loadErrorMissingFormat:"The file couldn't be read as {format}. The URL has no file extension, so set modelFormat to the file's format.",loadErrorPointCloud:"This PLY file is a point cloud: it has points but no faces, and the viewer shows meshes. Turn it into a mesh first, for example with MeshLab or Blender.",measurementReferenceFaceRequired:"Pick a triangle face to define the reference plane.",measurementTooManyPoints:"Finish or clear this measurement before adding more points.",measurementAngleDistinct:"Pick a point away from the angle's vertex.",areaMinimumPoints:"Pick at least three points to finish the area.",areaDistinctPoints:"Area points must be distinct.",areaStraightLine:"Area points must not lie on one straight line.",areaNotPlanar:"Area points must lie on one plane.",areaEdgesCross:"Area edges must not cross or touch each other.",areaZero:"The polygon has no measurable area.",decalSurfaceMissing:"Could not find a surface on this object for the decal.",decalDirectionMissing:"No visible surface in that direction. Try another arrow or rotate the view.",fullscreenExitFailed:"Could not exit fullscreen. Press Escape to exit.",fullscreenEnterFailed:"Could not enter fullscreen. Check your browser or iframe fullscreen permissions and try again.",uvCoordinatesMissing:"This model does not contain UV coordinates.",uvExportFailed:"Could not create the UV layout archive.",videoExportFailed:"Could not export the video.",videoNotReady:"Viewer not ready for video export.",videoExitXR:"Exit the XR session before recording a video.",videoAlreadyRecording:"A video export is already in progress.",videoPathRequired:"Enable a cinematic camera path before recording it.",videoDurationInvalid:"Video duration must be greater than 0 and at most 300 seconds.",videoFrameRateInvalid:"Video frame rate must be between 1 and 60.",videoBitrateInvalid:"Video bitrate must be a positive number.",videoContextLost:"Video export stopped because the WebGL context was lost.",videoTimedOut:"Video export timed out. Keep the viewer tab visible while recording.",videoEncodingFailed:"The browser could not encode the video.",videoEmpty:"The browser produced an empty video.",videoDidNotStart:"Video recording did not start.",videoWebMUnsupported:"Video recording as WEBM is not supported in this browser.",videoMP4Unsupported:"Video recording as MP4 is not supported in this browser.",videoGIFUnsupported:"Video recording as GIF is not supported in this browser.",videoGifWidthInvalid:"GIF width must be a whole number of pixels from 16 to 4096.",environmentApartment:"apartment",environmentCity:"city",environmentDawn:"dawn",environmentForest:"forest",environmentLobby:"lobby",environmentNight:"night",environmentPark:"park",environmentStudio:"studio",environmentSunset:"sunset",environmentWarehouse:"warehouse",color:"Color",material:"Material",texturePreview:"texture preview",noTextureApplied:"No texture applied",noTextureCoordinates:"This part has no texture coordinates, so an image can't be placed on it.",replaceImage:"Replace image",uploadImage:"Upload image",removeTexture:"Remove texture",texturePosition:"Texture position",offsetX:"Offset X",offsetY:"Offset Y",confirmTexturePosition:"Confirm this texture position and exit positioning mode",donePositioning:"Done positioning",textureOffsetHint:"Double-click the object in the preview to drag its texture directly (scroll to zoom), or edit its offset numerically.",actionToggleLight:"Toggle Light",actionChangeLightColor:"Change Light Color",actionSetBrightness:"Set Brightness",actionChangeColor:"Change Color",actionChangeMaterial:"Change Material",actionToggleVisibility:"Toggle Visibility"};function X(e,t,n={}){return(e?.[t]??F[t]).replace(/\{(\w+)\}/g,(o,a)=>Object.prototype.hasOwnProperty.call(n,a)?String(n[a]):o)}var $=new Map(Object.entries(F).map(([e,t])=>[t,e]));function ye(e,t){let n=$.get(t);return n?X(e,n):t}import{Box3 as U,Vector3 as B}from"three";var Z=new Set(["KHR_binary_glTF","KHR_draco_mesh_compression","KHR_lights_punctual","KHR_materials_clearcoat","KHR_materials_dispersion","KHR_materials_ior","KHR_materials_sheen","KHR_materials_specular","KHR_materials_transmission","KHR_materials_iridescence","KHR_materials_anisotropy","KHR_materials_unlit","KHR_materials_volume","KHR_texture_basisu","KHR_texture_transform","KHR_mesh_quantization","KHR_materials_emissive_strength","KHR_materials_variants","EXT_materials_bump","EXT_texture_webp","EXT_texture_avif","EXT_meshopt_compression","EXT_mesh_gpu_instancing"]),H=new WeakMap;function we(e,t){H.set(e,structuredClone(t))}function J(e){let t=H.get(e);return t?structuredClone(t):void 0}function z(e){if(/^(blob|data):/i.test(e))return"Local resource";let t=e.split(/[?#]/,1)[0].replace(/\\/g,"/");return t.slice(t.lastIndexOf("/")+1).slice(0,300)||"Resource"}function Q(e){return/^(blob|data):/i.test(e)?"Local resource":e.split(/[?#]/,1)[0].replace(/\\/g,"/").replace(/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,"").replace(/^\/+/,"").slice(0,500)||"Resource"}function G(e){let t=n=>typeof n=="number"&&Number.isFinite(n)&&n>=0?n:null;return{...e.format?{format:e.format}:{},...e.name?{name:z(e.name)}:{},sourceBytes:t(e.sourceBytes),loadDurationMs:t(e.loadDurationMs),extensionsUsed:[...new Set(e.extensionsUsed??[])].sort(),extensionsRequired:[...new Set(e.extensionsRequired??[])].sort(),failedResources:[...new Set((e.failedResources??[]).map(Q))].slice(0,50)}}function K(e){let t=new Set(e.extensionsRequired);return[...new Set([...e.extensionsUsed??[],...t])].sort().map(n=>({name:n,required:t.has(n),recognized:Z.has(n)}))}function ee(e,t){let n=e.image,r=b=>typeof b=="number"&&Number.isSafeInteger(b)&&b>0?b:null,o=r(n?.naturalWidth??n?.width),a=r(n?.naturalHeight??n?.height),s=!!e.isCompressedTexture,M=e.mipmaps.reduce((b,d)=>b+(d.data?.byteLength??0),0),x=o&&a?Math.ceil(o*a*4*(e.generateMipmaps?4/3:1)):null;return{name:e.name?z(e.name):t,width:o,height:a,compressed:s,estimatedBytes:s?M||null:x!==null&&Number.isSafeInteger(x)?x:null}}function Se(e,t={}){let n=G({...J(e),...t.source}),r=[],o=new Set,a=new Map,s=new Set,M=new Map,x=new Map,b=new Set,d=new Map,T=0,V=0,l=0,c=0,f=0,h=(i,u)=>{let p=d.get(i)??{count:0,names:[]};p.count++,p.names.length<20&&p.names.push(u||"Unnamed object"),d.set(i,p)},m=i=>{let u=i?.array??i?.data?.array;u?.buffer&&!b.has(u.buffer)&&(b.add(u.buffer),f+=u.buffer.byteLength)};e.traverse(i=>{let u=i;if(!u.isMesh||!u.geometry)return;T++,V+=u.isInstancedMesh?Number.isSafeInteger(u.count)?Math.max(0,u.count??0):0:1;let p=u.geometry,v=p.getAttribute("position"),I=p.getAttribute("uv"),O=u.material?Array.isArray(u.material)?u.material:[u.material]:[];if(!a.has(p)){let S=!!v&&(!Number.isSafeInteger(v.count)||v.count<0);for(let A=0;!S&&v&&A<v.count;A++)if(!Number.isFinite(v.getX(A))||!Number.isFinite(v.getY(A))||!Number.isFinite(v.getZ(A))){S=!0;break}a.set(p,S)}if(a.get(p)&&h("invalid-positions",i.name),v?.count||h("empty-geometry",i.name),I||h("missing-uv",i.name),p.getAttribute("normal")||h("missing-normals",i.name),p.boundingBox&&[...p.boundingBox.min.toArray(),...p.boundingBox.max.toArray()].some(S=>!Number.isFinite(S))&&h("invalid-bounds",i.name),!o.has(p)){o.add(p),l+=Number.isSafeInteger(v?.count)?Math.max(0,v?.count??0):0;let S=p.index?.count??v?.count??0;c+=Number.isSafeInteger(S)?Math.floor(Math.max(0,S)/3):0,Object.values(p.attributes).forEach(m),Object.values(p.morphAttributes).flat().forEach(m),m(p.index)}let j=!1;for(let S of O){s.add(S);let A=M.get(S);if(!A){A=Object.values(S).filter(D=>!!D&&D.isTexture===!0),M.set(S,A);for(let D of A)x.has(D)||x.set(D,`Texture ${x.size+1}`)}for(let D of A){let _=D.channel??0;p.getAttribute(_===0?"uv":`uv${_}`)||(j=!0)}}j&&h("textured-missing-uv",i.name)});let g=(i,u,p,v,I)=>{let O=d.get(i);O&&r.push({code:i,severity:u,title:p,detail:v,suggestion:I,count:O.count,objects:O.names})};g("empty-geometry","error","Empty mesh geometry","Some meshes have no position data.","Remove empty meshes or export their geometry again."),g("invalid-positions","error","Invalid vertex coordinates","Some vertices contain non-finite coordinates.","Repair NaN or infinite vertex positions in the source application, then re-export."),g("invalid-bounds","error","Invalid geometry bounds","Some cached bounds contain non-finite values.","Repair invalid coordinates in the source application and re-export."),g("textured-missing-uv","warning","Textures have no matching UV coordinates","A texture references a UV channel that its mesh does not contain.","Unwrap the affected meshes and export the UV channel used by each texture."),g("missing-uv","info","Meshes without UVs","Solid colors can work without UVs; image textures and surface decals need them.","Add a UV map before applying image textures or decals."),g("missing-normals","info","Meshes without normals","Some loaded meshes lack vertex normals; generated shading may differ from the source.","Export vertex normals to preserve hard edges and smooth surfaces."),T||r.push({code:"no-meshes",severity:"warning",title:"No mesh geometry found",detail:"This scene contains no loaded meshes.",suggestion:"Check that meshes were included in the export. Streamed scenes may still be loading."});let R=[...x].map(([i,u])=>ee(i,u)),C=R.filter(i=>(i.width??0)>4096||(i.height??0)>4096);C.length&&r.push({code:"large-textures",severity:"warning",title:"Large texture dimensions",detail:"Some textures exceed 4096 pixels on one side.",suggestion:"Resize textures for the visible detail needed; use KTX2/Basis where appropriate.",count:C.length,objects:C.slice(0,20).map(i=>i.name)}),c>1e6&&r.push({code:"high-triangle-count",severity:"warning",title:"High geometry count",detail:"The loaded geometry contains more than one million unique triangles.",suggestion:"Simplify hidden detail, create lower-detail exports, or use streamed assets for large scenes."}),s.size>100&&r.push({code:"many-materials",severity:"warning",title:"Many material definitions",detail:"More than 100 materials can increase rendering work.",suggestion:"Reuse materials and atlas compatible textures; inspect runtime draw calls to confirm the cost."});let L=K(n);for(let i of L.filter(u=>!u.recognized))r.push({code:"unrecognized-extension",severity:i.required?"error":"warning",title:`${i.required?"Required":"Optional"} extension not recognized`,detail:i.name,suggestion:"Export with extensions supported by the bundled loader, or verify the asset's fallback appearance."});n.failedResources?.length&&r.push({code:"failed-resources",severity:"error",title:"Some resources failed to load",detail:"The model may be missing textures or other referenced resources.",suggestion:"Include sidecar files in the ZIP, correct their paths, and check HTTP access and CORS.",count:n.failedResources.length,objects:n.failedResources.slice(0,20)});let k=null,w=[...a.values()].some(Boolean)?new U:new U().setFromObject(e);!w.isEmpty()&&[...w.min.toArray(),...w.max.toArray(),...w.getSize(new B).toArray()].every(Number.isFinite)&&(k={min:w.min.toArray(),max:w.max.toArray(),center:w.getCenter(new B).toArray(),size:w.getSize(new B).toArray()}),t.scope==="resident-tiles"&&r.unshift({code:"partial-stream",severity:"info",title:"Loaded tiles only",detail:"Geometry and texture counts cover the current resident tiles, not the entire source asset.",suggestion:"Use the live cache/detail statistics to inspect streaming pressure. Rescan after moving the camera."});let E=i=>i.code==="partial-stream"?-1:i.severity==="error"?0:i.severity==="warning"?1:2;return r.sort((i,u)=>E(i)-E(u)),{version:1,status:"ready",scope:t.scope??"asset",source:n,units:n.format==="glb"||n.format==="gltf"?"meters (glTF convention)":"unknown",bounds:k,statistics:{meshes:T,instances:V,geometries:o.size,materials:s.size,textures:x.size,vertices:l,triangles:c,geometryBytes:f,estimatedTextureBytes:R.reduce((i,u)=>i+(u.estimatedBytes??0),0),unknownTextureSizes:R.filter(i=>i.estimatedBytes===null).length,meshesWithoutUvs:d.get("missing-uv")?.count??0,meshesWithoutNormals:d.get("missing-normals")?.count??0},textures:R,extensions:L,issues:r}}function Ae(e={}){return{version:1,status:"failed",scope:"asset",source:G(e),units:"unknown",bounds:null,statistics:null,textures:[],extensions:K(e),issues:[{code:"load-failed",severity:"error",title:"Asset could not be loaded",detail:"Geometry and textures could not be inspected.",suggestion:"Check the file format, required decoders, sidecar paths, HTTP access and CORS, then reload the asset."}]}}var N="KHR_materials_variants",q="riMaterialVariants",W="riMaterialVariantGroups";function y(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function te(e){if(!y(e)||!y(e.extensions))return[];let t=e.extensions[N];if(!y(t)||!Array.isArray(t.variants))return[];let n=new Set;return t.variants.map((r,o)=>{let a=y(r)&&typeof r.name=="string"&&r.name?r.name:`Variant ${o+1}`,s=a;for(let M=2;n.has(s);M+=1)s=`${a} (${M})`;return n.add(s),s})}function Re(e){let t=e.userData?.gltfExtensions;if(!y(t))return[];let n=t[N];return!y(n)||!Array.isArray(n.mappings)?[]:n.mappings.filter(r=>y(r)&&Number.isInteger(r.material)&&Array.isArray(r.variants)&&r.variants.every(Number.isInteger))}function ke(e,t){for(let n=t.length-1;n>=0;n-=1){let r=t[n];if(r<0)continue;let o=e.find(a=>a.variants.includes(r));if(o)return o.material}return null}var ne=/^\s*(.+?)\s*(?::|\s\/\s)\s*(.+?)\s*$/;function re(e){let t=Math.min(Math.max(e,0),1),n=t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055;return Math.round(n*255)}function ie(e){if(!y(e))return;let t=y(e.pbrMetallicRoughness)?e.pbrMetallicRoughness:{};if(t.baseColorTexture!==void 0)return;let n=Array.isArray(t.baseColorFactor)?t.baseColorFactor:[1,1,1,1];if(n.slice(0,3).every(r=>typeof r=="number"))return`#${n.slice(0,3).map(r=>re(r).toString(16).padStart(2,"0")).join("")}`}function oe(e,t){if(t.length===0)return[];let n=y(e)?e:{},r=Array.isArray(n.meshes)?n.meshes:[],o=Array.isArray(n.accessors)?n.accessors:[],a=Array.isArray(n.materials)?n.materials:[],s=t.map(()=>new Set),M=t.map(()=>new Map);r.forEach((l,c)=>{(y(l)&&Array.isArray(l.primitives)?l.primitives:[]).forEach((h,m)=>{if(!y(h))return;let g=y(h.extensions)?h.extensions[N]:void 0;if(!y(g)||!Array.isArray(g.mappings))return;let R=y(h.attributes)?h.attributes.POSITION:void 0,C=typeof R=="number"?o[R]:void 0,L=y(C)&&typeof C.count=="number"?C.count:1;for(let k of g.mappings)if(!(!y(k)||!Number.isInteger(k.material)||!Array.isArray(k.variants)))for(let w of k.variants){if(!Number.isInteger(w)||!s[w])continue;s[w].add(`${c}/${m}`);let E=M[w],i=k.material;E.set(i,(E.get(i)??0)+L)}})});let x=t.map((l,c)=>{let f=null;for(let[m,g]of M[c])(f===null||g>(M[c].get(f)??0))&&(f=m);let h=f===null?void 0:ie(a[f]);return{name:l,label:l,...h?{swatch:h}:{}}}),b=t.map(()=>-1),d=[],T=new Map;return t.forEach((l,c)=>{let f=ne.exec(l);if(!f)return;let[,h,m]=f;T.has(h)||(T.set(h,d.length),d.push({name:h,members:[]})),b[c]=T.get(h),d[b[c]].members.push(c),x[c].label=m}),t.map((l,c)=>c).filter(l=>b[l]<0).sort((l,c)=>+(s[l].size===0)-+(s[c].size===0)).forEach(l=>{let c=d.map((m,g)=>({group:m,groupIndex:g})).filter(({group:m})=>m.name===null&&m.members.some(g=>s[l].size===0||s[g].size===0?!1:[...s[l]].some(R=>s[g].has(R)))).map(({groupIndex:m})=>m);if(c.length===0&&s[l].size===0){let m=d.findIndex(g=>g.name===null);m>=0&&c.push(m)}if(c.length===0){b[l]=d.length,d.push({name:null,members:[l]});return}let[f,...h]=c;for(let m of h){for(let g of d[m].members)b[g]=f;d[f].members.push(...d[m].members),d[m].members=[]}b[l]=f,d[f].members.push(l)}),d.filter(l=>l.members.length>0).sort((l,c)=>Math.min(...l.members)-Math.min(...c.members)).map(l=>({name:l.name,variants:[...l.members].sort((c,f)=>c-f).map(c=>x[c])}))}function Ce(e,t,n){let r=n.find(a=>a.variants.some(s=>s.name===t)),o=new Set(r?.variants.map(a=>a.name)??[t]);return[...e.filter(a=>!o.has(a)),t]}function De(e){if(Array.isArray(e.activeVariants))return e.activeVariants.filter(n=>typeof n=="string");let t=e.materialVariant;return typeof t=="string"&&t?[t]:[]}function Pe(e){let t=e.parser,n=te(t?.json);if(!(!t||n.length===0))return e.scene.userData[q]=n,e.scene.userData[W]=oe(t.json,n),{names:n,resolveMaterial:async(r,o)=>{let a={geometry:o.geometry,material:await t.getDependency("material",r),isPoints:o.isPoints,isLine:o.isLine};return t.assignFinalMaterial(a),a.material}}}function ae(e){let t=e.userData?.[q];return Array.isArray(t)&&t.every(n=>typeof n=="string")?t:[]}function Ve(e){let t=e.userData?.[W];if(Array.isArray(t))return t;let n=ae(e);return n.length>0?[{name:null,variants:n.map(r=>({name:r,label:r}))}]:[]}function Ee(e,t){let{materialVariant:n,...r}=e;return{...r,activeVariants:t}}import{Matrix4 as se,Vector3 as le}from"three";function ce(e){return e.isSkinnedMesh===!0}function Ne(e){let t=[];return e.traverse(n=>{ce(n)&&t.push(n)}),t}var P="reactImmersiveSkinFreeze";function je(e){return!!e.userData[P]}function _e(e,t,n=[t]){let r=e.userData,o=new se().copy(t).invert(),a=r[P];if(a){a.frozenInverse.copy(o),a.restWorldTransforms=n.map(M=>M.clone()),e.bindMatrixInverse.copy(o);return}let s={frozenInverse:o,restWorldTransforms:n.map(M=>M.clone()),previousOnBeforeRender:e.onBeforeRender};e.bindMatrixInverse.copy(o),e.onBeforeRender=function(M,x,b,d,T,V){s.previousOnBeforeRender.call(this,M,x,b,d,T,V),e.bindMatrixInverse.copy(s.frozenInverse)},r[P]=s}function ue(e){return e.userData[P]?.frozenInverse??null}function Fe(e){return e.userData[P]?.restWorldTransforms??null}function Ue(e){let t=e.userData,n=t[P];n&&(e.onBeforeRender=n.previousOnBeforeRender,delete t[P],e.updateMatrixWorld(!0))}function He(e){let t=e,n=ue(e);n&&t.bindMatrixInverse.copy(n),t.skeleton?.update?.();let r=t.geometry.clone(),o=r.getAttribute("position");if(o){let a=new le;for(let s=0;s<o.count;s++)t.getVertexPosition(s,a),o.setXYZ(s,a.x,a.y,a.z);o.needsUpdate=!0}return r.deleteAttribute("skinIndex"),r.deleteAttribute("skinWeight"),r.morphAttributes={},r.morphTargetsRelative=!1,r.computeVertexNormals(),r.computeBoundingBox(),r.computeBoundingSphere(),r}function ze(e){return e.matrixWorld.clone()}import{AdditiveBlending as de,BackSide as me,DoubleSide as pe,FrontSide as he,NoColorSpace as ge,NormalBlending as fe,SRGBColorSpace as be,Vector2 as Y}from"three";function Qe(e){let t=!0;return e?.traverse(n=>{let r=n.isMesh?n.geometry:null;r&&!r.getAttribute("uv")&&(t=!1)}),t}function et(e){return!!(e&&typeof e=="object"&&"clone"in e&&"color"in e&&"metalness"in e&&"roughness"in e)}function tt(e){return!!(e&&typeof e=="object"&&"isMeshPhysicalMaterial"in e&&e.isMeshPhysicalMaterial)}function nt(e){return!!(e&&"isMesh"in e&&e.isMesh)}var rt=["texture","metalnessMap","roughnessMap","emissiveMap","alphaMap","normalMap","bumpMap","aoMap","displacementMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","anisotropyMap","transmissionMap","thicknessMap","sheenColorMap","sheenRoughnessMap","specularIntensityMap","specularColorMap"],it={texture:"map",metalnessMap:"metalnessMap",roughnessMap:"roughnessMap",emissiveMap:"emissiveMap",alphaMap:"alphaMap",normalMap:"normalMap",bumpMap:"bumpMap",aoMap:"aoMap",displacementMap:"displacementMap",clearcoatMap:"clearcoatMap",clearcoatRoughnessMap:"clearcoatRoughnessMap",clearcoatNormalMap:"clearcoatNormalMap",anisotropyMap:"anisotropyMap",transmissionMap:"transmissionMap",thicknessMap:"thicknessMap",sheenColorMap:"sheenColorMap",sheenRoughnessMap:"sheenRoughnessMap",specularIntensityMap:"specularIntensityMap",specularColorMap:"specularColorMap"},Me=new Set(["texture","emissiveMap","sheenColorMap","specularColorMap"]);function ot(e){return Me.has(e)?be:ge}function at(e,t){return e?.[t]?.path}function st(e,t){let n=e?.[t]?.offset;if(!n)return;let[r,o]=n;if(!(!Number.isFinite(r)||!Number.isFinite(o)))return r===0&&o===0?void 0:[r,o]}function lt(e,t){let n=e?.[t]?.scale;if(!(!Number.isFinite(n)||!n))return n===1?void 0:n}function ct(e,t){let n=e?.[t]?.rotation;if(!(!Number.isFinite(n)||!n))return n}function ut(e){return e==="back"?me:e==="double"?pe:he}function dt(e){return e==="additive"?de:fe}function mt(e,t=1,n=t){if(e&&typeof e=="object"){let r=e;if(typeof r.x=="number"&&Number.isFinite(r.x)&&typeof r.y=="number"&&Number.isFinite(r.y))return new Y(r.x,r.y)}return new Y(t,n)}function pt(e){return Number.isFinite(e)&&e>0?e:1}function ht(e,t){return e?.animations.clips.find(n=>n.sourceName===t)}function gt(e){return e?.loopMode??"repeat"}export{ce as a,Ne as b,je as c,_e as d,ue as e,Fe as f,Ue as g,He as h,ze as i,F as j,X as k,ye as l,we as m,J as n,z as o,Q as p,Se as q,Ae as r,Qe as s,et as t,tt as u,nt as v,rt as w,it as x,ot as y,at as z,st as A,lt as B,ct as C,ut as D,dt as E,mt as F,pt as G,ht as H,gt as I,Re as J,ke as K,Ce as L,De as M,Pe as N,ae as O,Ve as P,Ee as Q};