1const __vite__fileDeps=["./index-B2LdzUAr.js","./index-BL1Z-Foy.js","./index-fBnC7CZV.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); 2import{_ as O}from"./index-BL1Z-Foy.js";import{r as V}from"./file-url-DoxvUUVV.js";import"./DownloadLink.svelte_svelte_type_style_lang-C_5UIfol.js";import"./svelte/svelte.js";const{SvelteComponent:A,binding_callbacks:L,detach:E,element:S,flush:l,init:k,insert:D,noop:p,safe_not_equal:j}=window.__gradio__svelte__internal,{onMount:B}=window.__gradio__svelte__internal;function U(n){let t;return{c(){t=S("canvas")},m(i,s){D(i,t,s),n[12](t)},p,i:p,o:p,d(i){i&&E(t),n[12](null)}}}function W(n,t,i){let s,x,{value:m}=t,{display_mode:c}=t,{clear_color:f}=t,{camera_position:h}=t,{zoom_speed:g}=t,{pan_speed:v}=t,{resolved_url:_=void 0}=t,w,d,a,u,y=!1;B(()=>((async()=>{x=await O(()=>import("./index-B2LdzUAr.js").then(r=>r.bY),__vite__mapDeps([0,1,2]),import.meta.url),x.createViewerForCanvas(d,{clearColor:f,useRightHandedSystem:!0,animationAutoPlay:!0,cameraAutoOrbit:{enabled:!1},onInitialized:r=>{u=r}}).then(r=>{a=r,i(10,y=!0)})})(),()=>{a?.dispose()}));function C(e,r){u.scene.forcePointsCloud=e,u.scene.forceWireframe=r}function R(e){a&&(e?a.loadModel(e,{pluginOptions:{obj:{importVertexColors:!0}}}).then(()=>{c==="point_cloud"?C(!0,!1):c==="wireframe"?C(!1,!0):z(h,g,v)}):a.resetModel())}function z(e,r,b){a.resetCamera();const o=u.camera;e[0]!==null&&(o.alpha=e[0]*Math.PI/180),e[1]!==null&&(o.beta=e[1]*Math.PI/180),e[2]!==null&&(o.radius=e[2]),o.lowerRadiusLimit=.1;const P=()=>{o.wheelPrecision=250/(o.radius*r),o.panningSensibility=1e4*b/o.radius};P(),o.onAfterCheckInputsObservable.add(P)}function I(e,r,b){u&&z(e,r,b)}function M(e){L[e?"unshift":"push"](()=>{d=e,i(0,d)})}return n.$$set=e=>{"value"in e&&i(2,m=e.value),"display_mode"in e&&i(3,c=e.display_mode),"clear_color"in e&&i(4,f=e.clear_color),"camera_position"in e&&i(5,h=e.camera_position),"zoom_speed"in e&&i(6,g=e.zoom_speed),"pan_speed"in e&&i(7,v=e.pan_speed),"resolved_url"in e&&i(1,_=e.resolved_url)},n.$$.update=()=>{if(n.$$.dirty&4&&i(11,s=m.url),n.$$.dirty&2560&&(i(1,_=s),s)){i(9,w=s);const e=s;V(s).then(r=>{w===e?i(1,_=r??void 0):r&&URL.revokeObjectURL(r)})}n.$$.dirty&1026&&y&&R(_)},[d,_,m,c,f,h,g,v,I,w,y,s,M]}class N extends A{constructor(t){super(),k(this,t,W,U,j,{value:2,display_mode:3,clear_color:4,camera_position:5,zoom_speed:6,pan_speed:7,resolved_url:1,reset_camera_position:8})}get value(){return this.$$.ctx[2]}set value(t){this.$$set({value:t}),l()}get display_mode(){return this.$$.ctx[3]}set display_mode(t){this.$$set({display_mode:t}),l()}get clear_color(){return this.$$.ctx[4]}set clear_color(t){this.$$set({clear_color:t}),l()}get camera_position(){return this.$$.ctx[5]}set camera_position(t){this.$$set({camera_position:t}),l()}get zoom_speed(){return this.$$.ctx[6]}set zoom_speed(t){this.$$set({zoom_speed:t}),l()}get pan_speed(){return this.$$.ctx[7]}set pan_speed(t){this.$$set({pan_speed:t}),l()}get resolved_url(){return this.$$.ctx[1]}set resolved_url(t){this.$$set({resolved_url:t}),l()}get reset_camera_position(){return this.$$.ctx[8]}}export{N as default}; 3//# sourceMappingURL=Canvas3D-iyPGkazs.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.