@liveroom-tech/react-immersive 6.2.2 → 6.2.3
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/README.md +23 -0
- package/dist/{SequencesTab-LTMJTB76.mjs → SequencesTab-JZEE5WAM.mjs} +1 -1
- package/dist/binding-builder.d.mts +3 -3
- package/dist/binding-builder.d.ts +3 -3
- package/dist/binding-builder.js +41 -41
- package/dist/binding-builder.mjs +1 -1
- package/dist/{chunk-NMRTI3NQ.mjs → chunk-3GA7JFNH.mjs} +1 -1
- package/dist/chunk-3I7PPFUV.mjs +1 -0
- package/dist/{chunk-IT2PUTJS.mjs → chunk-CHMFH4D4.mjs} +1 -1
- package/dist/{chunk-RSUXTWM6.mjs → chunk-CUDL77ZY.mjs} +1 -1
- package/dist/{chunk-XKJQC3N5.mjs → chunk-IEKGBS46.mjs} +1 -1
- package/dist/chunk-LU3BQ7WG.mjs +69 -0
- package/dist/chunk-QZNUWZG7.mjs +50 -0
- package/dist/{chunk-WU3SQZGD.mjs → chunk-TI2YXAHW.mjs} +2 -2
- package/dist/hosted.d.mts +3 -3
- package/dist/hosted.d.ts +3 -3
- package/dist/hosted.js +40 -40
- package/dist/hosted.mjs +1 -1
- package/dist/index.d.mts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +36 -36
- package/dist/index.mjs +1 -1
- package/dist/{modelFileResolver-Bq4pW9vc.d.mts → modelFileResolver-An1aQ0D3.d.mts} +3 -0
- package/dist/{modelFileResolver-Bq4pW9vc.d.ts → modelFileResolver-An1aQ0D3.d.ts} +3 -0
- package/dist/{modelViewerProps-BnrJO5DK.d.ts → modelViewerProps-BnVflYRA.d.mts} +21 -3
- package/dist/{modelViewerProps-wjBT4fks.d.mts → modelViewerProps-H_K454u_.d.ts} +21 -3
- package/dist/{publicProps-BZPMIRwj.d.ts → publicProps-AdNUI06n.d.ts} +1 -1
- package/dist/{publicProps-CW5X_HFh.d.mts → publicProps-BOQBJBA_.d.mts} +1 -1
- package/dist/simple-model-viewer.d.mts +6 -2
- package/dist/simple-model-viewer.d.ts +6 -2
- package/dist/simple-model-viewer.js +5 -5
- package/dist/simple-model-viewer.mjs +1 -1
- package/dist/utils.d.mts +4 -4
- package/dist/utils.d.ts +4 -4
- package/dist/utils.js +15 -15
- package/dist/utils.mjs +1 -1
- package/package.json +7 -5
- package/dist/chunk-2LGQKX6Z.mjs +0 -50
- package/dist/chunk-LEOHZ5HM.mjs +0 -69
- package/dist/chunk-UAZ6I25Y.mjs +0 -1
package/dist/binding-builder.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as t,b as o,c as d}from"./chunk-
|
|
1
|
+
"use client";import{a as t,b as o,c as d}from"./chunk-CHMFH4D4.mjs";import{a}from"./chunk-MMO7KCYU.mjs";import{c as f}from"./chunk-TI2YXAHW.mjs";import"./chunk-E24EFHB5.mjs";import"./chunk-FXV4CLAK.mjs";import"./chunk-SXN3YYD3.mjs";import"./chunk-LU3BQ7WG.mjs";import"./chunk-CUDL77ZY.mjs";import"./chunk-FGAJ2UT7.mjs";import"./chunk-SOAUR4DL.mjs";import"./chunk-IEKGBS46.mjs";import"./chunk-3GA7JFNH.mjs";import"./chunk-37YITTIK.mjs";import"./chunk-2AJK643D.mjs";import"./chunk-5C4H7SRF.mjs";import"./chunk-3PLML3PO.mjs";import{ga as i,ha as r}from"./chunk-QZNUWZG7.mjs";import"./chunk-LX3GXQNU.mjs";import"./chunk-7JCFNZJM.mjs";import"./chunk-37QOMZW6.mjs";import"./chunk-CCBFMNAU.mjs";import"./chunk-GV4ZRXL6.mjs";import"./chunk-7OWHW66D.mjs";import"./chunk-KFLS7GI6.mjs";import"./chunk-3I7PPFUV.mjs";import"./chunk-BNKTI3CY.mjs";import"./chunk-UCD76KQ6.mjs";import"./chunk-TUYVYSN5.mjs";import"./chunk-RXZ4Q7CY.mjs";import"./chunk-JR557W27.mjs";import{useEffect as h,useState as m}from"react";import{jsx as l}from"react/jsx-runtime";function c(e){a("binding-builder","BindingBuilder");let[s,u]=m(!1);return h(()=>{let n=()=>u(e.arHandoff!==!1&&i(e.arHandoff)?.autoRestore!==!1&&r(window.location.href));return n(),window.addEventListener("hashchange",n),()=>window.removeEventListener("hashchange",n)},[e.arHandoff]),s?l(d,{modelUrl:"",licenseKey:e.licenseKey,onLicenseStatusChange:e.onLicenseStatusChange,enableXR:!0,arHandoff:e.arHandoff??!0,mobileHandoffUrl:e.mobileHandoffUrl,dracoDecoderPath:e.dracoDecoderPath,ktx2TranscoderPath:e.ktx2TranscoderPath,meshopt:e.meshopt,hideLicenseCheckingOverlay:e.hideLicenseCheckingOverlay}):l(f,{...o(e,t)})}export{c as BindingBuilder};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o,c as t}from"./chunk-
|
|
1
|
+
import{b as o,c as t}from"./chunk-3I7PPFUV.mjs";import{createContext as l,useContext as n,useMemo as a}from"react";import{jsx as d}from"react/jsx-runtime";var i=l(void 0);function V({labels:e,children:r}){return d(i.Provider,{value:e,children:r})}function u(){let e=n(i);return a(()=>Object.assign((r,s)=>o(e,r,s),{message:r=>t(e,r)}),[e])}export{V as a,u as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a={modelViewer:"3D model viewer",openSceneSettingsPanel:"Open scene settings panel",closeSceneSettingsPanel:"Close scene settings panel",verifyingLicense:"Verifying License",checkingYourLicenseKey:"Checking your license key...",createDevelopmentKey:"Create a free development 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",arStart:"Start AR",arStarting:"Starting AR\u2026",arCheckingSupport:"Checking AR support\u2026",arUnavailable:"AR is unavailable in this browser. Open this link in an AR-capable browser on your phone.",arStartFailed:"Could not start AR. Check camera permissions and try again.",arAnimations:"AR animations",arAnimationSelect:"Animation",arAnimationSaved:"Default",arAnimationNone:"No animation",arAnimationClips:"Model clips",arAnimationSequences:"Sequences",arAnimationPlay:"Play animation",arAnimationPause:"Pause animation",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:"Pointer 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:"Name",measurementNamePlaceholder:"e.g. Door width",saveMeasurement:"Save",knownMeasurementDistance:"Known length",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 color",addText:"Add text",image:"Image",chooseImage:"Choose image",imageToAdd:"Image to add",added:"Added",colour:"Color",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",productOptions:"Options",productOptionsFor:"{product} options",productReset:"Reset",productOptional:"optional",productNone:"None",productAlsoChanges:"Also changes: {changes}",productUnavailable:"Currently unavailable.",productQuantity:"Quantity",productCheckingPrice:"Checking price and availability\u2026",productTotal:"Total",productAddToCart:"Add to cart",productAddingToCart:"Adding\u2026",productRequestQuote:"Request quote",productRequestingQuote:"Requesting\u2026",productRefresh:"Refresh",productBuy:"Buy now",productCopyLink:"Copy link",productLinkCopied:"Link copied",productShowOptions:"Show options",productHideOptions:"Hide options",productIssues:"Configuration issues",productRequestDone:"Request completed.",productSaved:"Saved: {id}",sceneSettings:"Scene Settings",background:"Background",backgroundColor:"Background Color",showEnvironmentAsBackground:"Show as background",backgroundBlur:"Background Blur",environmentPreset:"Preset",environmentIntensity:"Intensity",toneMapping:"Tone Mapping",toneMappingAces:"ACES Filmic",toneMappingAgx:"AgX",toneMappingNeutral:"Neutral",toneMappingNone:"None",ground:"Ground",groundShadow:"Ground Shadow",groundShadowOpacity:"Shadow Opacity",floorGrid:"Floor Grid",display:"Display",wireframe:"Wireframe",autoRotateSpeed:"Rotation Speed",fieldOfView:"Field of View",modelInfo:"Model",modelInfoObjects:"Objects",modelInfoTriangles:"Triangles",modelInfoMaterials:"Materials",resetSettings:"Reset Settings",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",retryModelLoad:"Retry loading model",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.",environmentNeutral:"neutral",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 r(o,e,t={}){return(o?.[e]??a[e]).replace(/\{(\w+)\}/g,(i,n)=>Object.prototype.hasOwnProperty.call(t,n)?String(t[n]):i)}var s=new Map(Object.entries(a).map(([o,e])=>[e,o]));function l(o,e){let t=s.get(e);return t?r(o,t):e}export{a,r as b,l as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./chunk-MMO7KCYU.mjs";import{p as n}from"./chunk-
|
|
1
|
+
import{a as i}from"./chunk-MMO7KCYU.mjs";import{p as n}from"./chunk-LU3BQ7WG.mjs";var c={licenseKey:!0,onLicenseStatusChange:!0,arHandoff:!0,mobileHandoffUrl:!0,dracoDecoderPath:!0,ktx2TranscoderPath:!0,meshopt:!0,hideLicenseCheckingOverlay:!0},s={licenseValidationUrl:!0,arLanding:!0,gizmoTool:!0,showFloorGrid:!0,onObjectEditLeaseChange:!0,onSelectionClear:!0,onEmptyCanvasClick:!0,onSceneLoaded:!0,onTexturePositioningChange:!0,endTexturePositioningRef:!0};function u(e,t){let o={};for(let r of Object.keys(t))r in e&&(o[r]=e[r]);return o}function d(e,t){let o={...e};for(let r of Object.keys(t))delete o[r];return o}import{jsx as l}from"react/jsx-runtime";function a(e){return i("model-viewer","ModelViewer"),l(n,{...d(e,s)})}export{c as a,u as b,a as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as l}from"./chunk-
|
|
1
|
+
import{b as l}from"./chunk-3GA7JFNH.mjs";import{b as c}from"./chunk-3PLML3PO.mjs";import{useSyncExternalStore as S}from"react";import{Pause as q,Play as b,Square as y}from"lucide-react";import{jsx as a,jsxs as o}from"react/jsx-runtime";var f={sequenceId:null,time:0,duration:0,status:"stopped",previewing:!1,ready:!1,issues:[]},p=()=>f,g=()=>()=>{};function d(t){return S(t?.subscribe??g,t?.getState??p,p)}function P({controls:t,duration:n,showScrubber:r=!0,hasTracks:s=!0}){let e=l(),u=d(t),i=u.status==="playing";return o("div",{className:"ri-sequenceTransport",children:[a("button",{type:"button",onClick:()=>i?t?.pause():t?.play(),disabled:!u.ready||!n||!s,"aria-label":e(i?"sequencePause":"sequencePlay"),title:e(i?"sequencePause":"sequencePlay"),children:a("span",{"aria-hidden":"true",children:i?a(q,{size:15}):a(b,{size:15})})}),a("button",{type:"button",onClick:()=>t?.stop(),disabled:!u.previewing,"aria-label":e("sequenceStop"),title:e("sequenceStop"),children:a(y,{size:14,"aria-hidden":"true"})}),r&&a("input",{"aria-label":e("sequencePlayhead"),type:"range",min:0,max:n||1,step:.01,value:Math.min(u.time,n),disabled:!u.ready||!n,onChange:m=>{t?.pause(),t?.seek(Number(m.target.value))}}),o("output",{"aria-label":e("sequenceTime"),children:[u.time.toFixed(2)," / ",n.toFixed(2),"s"]})]})}function C({controls:t,sequences:n}){let r=l(),s=d(t);return n.length?o("section",{className:"ri-sequencePlayer","aria-label":r("sequencePlayer"),onPointerDown:e=>e.stopPropagation(),children:[a(c,{"aria-label":r("sequenceSelect"),value:s.sequenceId??"",onChange:e=>t.select(e.target.value),children:n.map(e=>a("option",{value:e.id,children:e.name},e.id))}),a(P,{controls:t,duration:s.duration,hasTracks:n.find(e=>e.id===s.sequenceId)?.tracks.some(e=>!e.muted&&e.keyframes.length>0)??!1}),!!s.issues.length&&o("details",{children:[a("summary",{children:r("sequenceIssues")}),s.issues.map(e=>a("p",{children:e},e))]})]}):null}export{d as a,P as b,C as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as oe}from"./chunk-
|
|
1
|
+
import{b as oe}from"./chunk-3GA7JFNH.mjs";import{b as ce}from"./chunk-2AJK643D.mjs";import{k as de}from"./chunk-5C4H7SRF.mjs";import{a as F,c as le,d as ue}from"./chunk-KFLS7GI6.mjs";import{b as re}from"./chunk-3I7PPFUV.mjs";import{e as ie,f as se,g as ae}from"./chunk-BNKTI3CY.mjs";import{a as te,e as ne}from"./chunk-RXZ4Q7CY.mjs";var fe;function pe(e){fe=e}function x(e){fe?.(e)}import{strFromU8 as pt,strToU8 as mt,unzip as bt}from"fflate";var gt=[".glb",".gltf",".obj",".fbx",".usdz",".stl",".ply",".zip"],ht=["model/gltf-binary","model/gltf+json","model/vnd.usdz+zip","application/vnd.usdz+zip","application/zip","application/x-zip-compressed"],M=1024*1024,me=128*M,be=1024,ge=128*M,he=256*M,ve=200,vt=M,g=new Map,rr=".glb,.gltf,.obj,.fbx,.usdz,.stl,.ply,.zip,model/gltf-binary,model/gltf+json,model/vnd.usdz+zip,application/vnd.usdz+zip,application/zip";function S(e){let t=e.split(/[?#]/,1)[0].toLowerCase();return t.endsWith(".obj")?"obj":t.endsWith(".fbx")?"fbx":t.endsWith(".usdz")?"usdz":t.endsWith(".stl")?"stl":t.endsWith(".ply")?"ply":t.endsWith(".gltf")?"gltf":"glb"}function Me(e){return g.get(e)??{format:S(e)}}function yt(e){let t=e.name.toLowerCase();return gt.some(n=>t.endsWith(n))||ht.includes(e.type)}async function or(e){if(!yt(e))throw new Error("Unsupported model file. Please upload a .glb, .gltf, .obj, .fbx, .usdz, .stl, .ply, or .zip asset.");let t=e.name.toLowerCase();if(t.endsWith(".usdz")||e.type==="model/vnd.usdz+zip"||e.type==="application/vnd.usdz+zip")return ye(e,"usdz");if(t.endsWith(".zip")||wt(e.type))return xt(e);if(t.endsWith(".gltf")||e.type==="model/gltf+json")return we(e);let n=S(e.name);return n==="gltf"?we(e):ye(e,n)}function ye(e,t){let n=URL.createObjectURL(e);return g.set(n,{format:t,entryPath:e.name,sourceBytes:e.size}),{url:n,name:e.name,format:t,cleanup:()=>{x(n),g.delete(n),URL.revokeObjectURL(n)}}}function wt(e){return e==="application/zip"||e==="application/x-zip-compressed"}async function we(e){let t=await e.text(),n=Se(t,e.name);for(let o of Ee(n))if(!I(o))throw new Error(`${e.name} references external assets. Upload a .zip containing the .gltf file and its dependencies.`);let r=URL.createObjectURL(e);return g.set(r,{format:"gltf",entryPath:e.name,sourceBytes:e.size}),{url:r,name:e.name,format:"gltf",cleanup:()=>{x(r),g.delete(r),URL.revokeObjectURL(r)}}}async function xt(e){if(e.size>me)throw new Error(`Model zip is too large. The compressed archive must be ${U(me)} or smaller.`);let t=await Mt(new Uint8Array(await e.arrayBuffer())),n=new Map;for(let[i,a]of Object.entries(t)){let l=D(i);!l||Le(l)||n.set(l,a)}let r=[...n.keys()].filter(i=>/\.(gltf|obj|fbx|stl|ply)$/i.test(i));if(r.length===0)throw new Error("Invalid model zip: no .gltf, .obj, .fbx, .stl, or .ply file found.");if(r.length>1)throw new Error("Invalid model zip: multiple model entry files found.");let o=r[0],s=S(o);if(s==="gltf")return Et(e,o,n);if(s==="obj"||s==="fbx"||s==="stl"||s==="ply")return St(e,o,s,n);throw new Error(`Unsupported model entry ${o}.`)}function Mt(e){return new Promise((t,n)=>{let r=0,o=0,s=null,i=l=>(s??(s=new Error(`Invalid model zip: ${l}`)),!1);bt(e,{filter:l=>{if(s)return!1;if(r+=1,r>be)return i(`archive contains more than ${be.toLocaleString()} entries.`);if(l.originalSize>ge)return i(`${l.name} expands beyond the ${U(ge)} per-file limit.`);if(o+=l.originalSize,o>he)return i(`expanded contents exceed ${U(he)}.`);if(l.originalSize>=vt&&(l.size===0||l.originalSize/l.size>ve))return i(`${l.name} exceeds the ${ve}:1 compression-ratio limit.`);let u=D(l.name);return!!u&&!Le(u)}},(l,u)=>{s?n(s):l?n(new Error(`Invalid model zip: ${l.message}`)):t(u)})})}function U(e){return`${e/M} MiB`}function St(e,t,n,r){let o=[],s={};for(let[a,l]of r){let u=URL.createObjectURL(new Blob([l],{type:Pe(a)}));o.push(u),s[a]=u}let i=s[t];if(!i)throw o.forEach(a=>URL.revokeObjectURL(a)),new Error(`Invalid model zip: could not read ${t}.`);return g.set(i,{format:n,entryPath:t,resourceUrls:s}),{url:i,name:e.name,format:n,cleanup:()=>{x(i),g.delete(i),o.forEach(a=>URL.revokeObjectURL(a))}}}function Et(e,t,n){let r=n.get(t);if(!r)throw new Error("Invalid GLTF zip: no .gltf found.");let o=Se(pt(r),t);Lt(o,t);let s=Pt(t),i=[];try{xe(o.buffers,s,n,i),xe(o.images,s,n,i);let a=new Blob([mt(JSON.stringify(o))],{type:"model/gltf+json"}),l=URL.createObjectURL(a);return i.push(l),g.set(l,{format:"gltf",entryPath:t}),{url:l,name:e.name,format:"gltf",cleanup:()=>{x(l),g.delete(l),i.forEach(u=>URL.revokeObjectURL(u))}}}catch(a){throw i.forEach(l=>URL.revokeObjectURL(l)),a}}function xe(e,t,n,r){for(let o of e??[]){if(typeof o.uri!="string"||I(o.uri))continue;let s=At(t,o.uri),i=n.get(s);if(!i)throw new Error(`Invalid GLTF zip: missing referenced asset ${o.uri}.`);let a=URL.createObjectURL(new Blob([i],{type:Pe(s)}));r.push(a),o.uri=a}}function Se(e,t){try{return JSON.parse(e)}catch{throw new Error(`${t} is not a valid .gltf JSON file.`)}}function Ee(e){return[...e.buffers??[],...e.images??[]].map(t=>t.uri).filter(t=>typeof t=="string"&&t.length>0)}function Lt(e,t){for(let n of Ee(e)){if(I(n))continue;let r=/^[a-z][a-z0-9+.-]*:/i.test(n),o=n.startsWith("/")||n.startsWith("\\");if(r||o)throw new Error(`${t} references external assets. Include every dependency inside the uploaded .zip.`)}}function I(e){return e.startsWith("data:")}function D(e){let t=[];for(let n of e.replace(/\\/g,"/").replace(/^\/+/,"").split("/").filter(r=>r&&r!==".")){if(n===".."){t.pop();continue}t.push(n)}return t.join("/")}function Le(e){let t=e.split("/");return e.endsWith("/")||t.includes("__MACOSX")||t.some(n=>n===".DS_Store"||n.startsWith("._"))}function Pt(e){let t=e.lastIndexOf("/");return t===-1?"":e.slice(0,t)}function At(e,t){let n=t.split(/[?#]/)[0],r=Rt(n);return D(e?`${e}/${r}`:r)}function Rt(e){try{return decodeURI(e)}catch{return e}}function Pe(e){let t=e.toLowerCase();return t.endsWith(".obj")||t.endsWith(".mtl")?"text/plain":t.endsWith(".fbx")?"application/octet-stream":t.endsWith(".usdz")?"model/vnd.usdz+zip":t.endsWith(".bin")?"application/octet-stream":t.endsWith(".png")?"image/png":t.endsWith(".jpg")||t.endsWith(".jpeg")?"image/jpeg":t.endsWith(".webp")?"image/webp":t.endsWith(".avif")?"image/avif":t.endsWith(".ktx2")?"image/ktx2":"application/octet-stream"}import{useEffect as j,useMemo as zt,useRef as Ct,useState as Ot}from"react";import{Box3 as Ce,Color as G,DoubleSide as kt,ShaderMaterial as Bt,Vector3 as Tt}from"three";import{useThree as Ft}from"@react-three/fiber";var Ae="riEditorGizmo",N=new WeakMap;function Re(e){return e.userData[Ae]=!0,e}function cr(e,t){let n=N.get(e);return n||(n=new Set,N.set(e,n)),n.add(t),()=>{n.delete(t)}}function dr(e){let t=[],n=r=>{r.visible=!1,t.push(r)};return e.traverse(r=>{r.visible&&r.userData[Ae]&&n(r)}),N.get(e)?.forEach(r=>{r.visible&&n(r)}),()=>{for(let r of t)r.visible=!0}}function ze(e){return!Number.isFinite(e)||e<=0?1:10**Math.floor(Math.log10(e/10))}import{jsx as Oe}from"react/jsx-runtime";var Ut=`
|
|
2
2
|
varying vec3 vWorld;
|
|
3
3
|
void main() {
|
|
4
4
|
vec4 world = modelMatrix * vec4(position, 1.0);
|