Fresh start: LFS for .glb files
Browse files- .dockerignore +3 -0
- .gitattributes +1 -0
- .gitignore +31 -0
- Dockerfile +15 -0
- dist/apollo13.glb +3 -0
- dist/apollo13.glb.gz +3 -0
- dist/assets/index-Csdf6onh.js +1 -0
- dist/assets/index-Csdf6onh.js.gz +3 -0
- dist/assets/three-BBdsPnFb.js +0 -0
- dist/assets/three-BBdsPnFb.js.gz +3 -0
- dist/index.html +46 -0
- dist/index.html.gz +3 -0
- dist/plane.glb +3 -0
- dist/plane.glb.gz +3 -0
- dist/robots.txt +2 -0
- nginx.conf +61 -0
.dockerignore
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
node_modules
|
2 |
+
.vscode
|
3 |
+
.DS_Store
|
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
*.glb filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Node.js dependencies
|
2 |
+
node_modules/
|
3 |
+
|
4 |
+
# # Build output
|
5 |
+
# dist/
|
6 |
+
|
7 |
+
# Vite cache
|
8 |
+
.vite/
|
9 |
+
|
10 |
+
# Logs
|
11 |
+
npm-debug.log*
|
12 |
+
yarn-debug.log*
|
13 |
+
yarn-error.log*
|
14 |
+
|
15 |
+
# Environment variables
|
16 |
+
.env
|
17 |
+
.env.local
|
18 |
+
.env.*.local
|
19 |
+
|
20 |
+
# VS Code settings
|
21 |
+
.vscode/
|
22 |
+
|
23 |
+
# TypeScript
|
24 |
+
*.tsbuildinfo
|
25 |
+
|
26 |
+
# Prettier
|
27 |
+
.prettiercache
|
28 |
+
|
29 |
+
# System files
|
30 |
+
.DS_Store
|
31 |
+
Thumbs.db
|
Dockerfile
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Nginx image to serve the static files
|
2 |
+
FROM nginx:alpine-slim
|
3 |
+
|
4 |
+
# Set the working directory inside the container
|
5 |
+
WORKDIR /usr/share/nginx/html
|
6 |
+
|
7 |
+
# Copy the production build from the dist folder to the Nginx HTML directory
|
8 |
+
COPY dist/ .
|
9 |
+
|
10 |
+
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
11 |
+
|
12 |
+
# Expose the default Nginx port
|
13 |
+
EXPOSE 7860
|
14 |
+
|
15 |
+
# Nginx runs by default, no need to specify CMD
|
dist/apollo13.glb
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:35d370faa93444151e04fddbc0fdde17cece885d031f720cbd45331ce1407505
|
3 |
+
size 943664
|
dist/apollo13.glb.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:41d080709084acfc3896a939218fcbf2c3a204dfa2f0ee1e223bccb105774545
|
3 |
+
size 378024
|
dist/assets/index-Csdf6onh.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{T as ye,a as Q,b as fe,L as Se,c as G,F as he,M,V as pe,C as D,d as O,S as U,e as Me,P as be,D as me,f as j,g as N,I as Ie,Q as ge,h as Ne,O as Ae,i as Oe,j as Ce,B as V,k as Pe,l as Te,N as Fe,m as De,n as He,o as Z,p as xe,R as J,q as ve,r as ke,s as Ge,t as X,u as Be,v as Re,w as Ue,x as k,y as je,z as Ke,A as Ve,E as Xe,G as ze,H as We,J as qe,K as Ye,U as z,W as Ee,X as Qe,Y as Ze,Z as Je,_ as $e,$ as et,a0 as tt,a1 as we,a2 as nt,a3 as ne,a4 as se,a5 as re,a6 as ie,a7 as oe,a8 as st,a9 as rt,aa as $,ab as it,ac as ot,ad as at,ae as ct}from"./three-BBdsPnFb.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function e(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(n){if(n.ep)return;n.ep=!0;const r=e(n);fetch(n.href,r)}})();var B=function(){var f=0,t=document.createElement("div");t.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",t.addEventListener("click",function(u){u.preventDefault(),i(++f%t.children.length)},!1);function e(u){return t.appendChild(u.dom),u}function i(u){for(var l=0;l<t.children.length;l++)t.children[l].style.display=l===u?"block":"none";f=u}var n=(performance||Date).now(),r=n,s=0,a=e(new B.Panel("FPS","#0ff","#002")),o=e(new B.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var c=e(new B.Panel("MB","#f08","#201"));return i(0),{REVISION:16,dom:t,addPanel:e,showPanel:i,begin:function(){n=(performance||Date).now()},end:function(){s++;var u=(performance||Date).now();if(o.update(u-n,200),u>=r+1e3&&(a.update(s*1e3/(u-r),100),r=u,s=0,c)){var l=performance.memory;c.update(l.usedJSHeapSize/1048576,l.jsHeapSizeLimit/1048576)}return u},update:function(){n=this.end()},domElement:t,setMode:i}};B.Panel=function(f,t,e){var i=1/0,n=0,r=Math.round,s=r(window.devicePixelRatio||1),a=80*s,o=48*s,c=3*s,u=2*s,l=3*s,d=15*s,h=74*s,m=30*s,g=document.createElement("canvas");g.width=a,g.height=o,g.style.cssText="width:80px;height:48px";var p=g.getContext("2d");return p.font="bold "+9*s+"px Helvetica,Arial,sans-serif",p.textBaseline="top",p.fillStyle=e,p.fillRect(0,0,a,o),p.fillStyle=t,p.fillText(f,c,u),p.fillRect(l,d,h,m),p.fillStyle=e,p.globalAlpha=.9,p.fillRect(l,d,h,m),{dom:g,update:function(A,R){i=Math.min(i,A),n=Math.max(n,A),p.fillStyle=e,p.globalAlpha=1,p.fillRect(0,0,a,d),p.fillStyle=t,p.fillText(r(A)+" "+f+" ("+r(i)+"-"+r(n)+")",c,u),p.drawImage(g,l+s,d,h-s,m,l,d,h-s,m),p.fillRect(l+h-s,d,s,m),p.fillStyle=e,p.globalAlpha=.9,p.fillRect(l+h-s,d,s,r((1-A/R)*m))}}};const lt=()=>{const f=document.getElementById("loader");f&&(f.addEventListener("transitionend",()=>f.remove()),f.style.opacity="0")};function ae(f,t){if(t===ye)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),f;if(t===Q||t===fe){let e=f.getIndex();if(e===null){const s=[],a=f.getAttribute("position");if(a!==void 0){for(let o=0;o<a.count;o++)s.push(o);f.setIndex(s),e=f.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),f}const i=e.count-2,n=[];if(t===Q)for(let s=1;s<=i;s++)n.push(e.getX(0)),n.push(e.getX(s)),n.push(e.getX(s+1));else for(let s=0;s<i;s++)s%2===0?(n.push(e.getX(s)),n.push(e.getX(s+1)),n.push(e.getX(s+2))):(n.push(e.getX(s+2)),n.push(e.getX(s+1)),n.push(e.getX(s)));n.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const r=f.clone();return r.setIndex(n),r.clearGroups(),r}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),f}class ut extends Se{constructor(t){super(t),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new mt(e)}),this.register(function(e){return new gt(e)}),this.register(function(e){return new yt(e)}),this.register(function(e){return new St(e)}),this.register(function(e){return new Mt(e)}),this.register(function(e){return new Tt(e)}),this.register(function(e){return new xt(e)}),this.register(function(e){return new Rt(e)}),this.register(function(e){return new Et(e)}),this.register(function(e){return new pt(e)}),this.register(function(e){return new wt(e)}),this.register(function(e){return new At(e)}),this.register(function(e){return new _t(e)}),this.register(function(e){return new Lt(e)}),this.register(function(e){return new ft(e)}),this.register(function(e){return new bt(e)}),this.register(function(e){return new It(e)})}load(t,e,i,n){const r=this;let s;if(this.resourcePath!=="")s=this.resourcePath;else if(this.path!==""){const c=G.extractUrlBase(t);s=G.resolveURL(c,this.path)}else s=G.extractUrlBase(t);this.manager.itemStart(t);const a=function(c){n?n(c):console.error(c),r.manager.itemError(t),r.manager.itemEnd(t)},o=new he(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(t,function(c){try{r.parse(c,s,function(u){e(u),r.manager.itemEnd(t)},a)}catch(u){a(u)}},i,a)}setDRACOLoader(t){return this.dracoLoader=t,this}setKTX2Loader(t){return this.ktx2Loader=t,this}setMeshoptDecoder(t){return this.meshoptDecoder=t,this}register(t){return this.pluginCallbacks.indexOf(t)===-1&&this.pluginCallbacks.push(t),this}unregister(t){return this.pluginCallbacks.indexOf(t)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t),1),this}parse(t,e,i,n){let r;const s={},a={},o=new TextDecoder;if(typeof t=="string")r=JSON.parse(t);else if(t instanceof ArrayBuffer)if(o.decode(new Uint8Array(t,0,4))===Le){try{s[T.KHR_BINARY_GLTF]=new Nt(t)}catch(l){n&&n(l);return}r=JSON.parse(s[T.KHR_BINARY_GLTF].content)}else r=JSON.parse(o.decode(t));else r=t;if(r.asset===void 0||r.asset.version[0]<2){n&&n(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new Kt(r,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u<this.pluginCallbacks.length;u++){const l=this.pluginCallbacks[u](c);l.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[l.name]=l,s[l.name]=!0}if(r.extensionsUsed)for(let u=0;u<r.extensionsUsed.length;++u){const l=r.extensionsUsed[u],d=r.extensionsRequired||[];switch(l){case T.KHR_MATERIALS_UNLIT:s[l]=new ht;break;case T.KHR_DRACO_MESH_COMPRESSION:s[l]=new Ot(r,this.dracoLoader);break;case T.KHR_TEXTURE_TRANSFORM:s[l]=new Ct;break;case T.KHR_MESH_QUANTIZATION:s[l]=new Pt;break;default:d.indexOf(l)>=0&&a[l]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+l+'".')}}c.setExtensions(s),c.setPlugins(a),c.parse(i,n)}parseAsync(t,e){const i=this;return new Promise(function(n,r){i.parse(t,e,n,r)})}}function dt(){let f={};return{get:function(t){return f[t]},add:function(t,e){f[t]=e},remove:function(t){delete f[t]},removeAll:function(){f={}}}}const T={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class ft{constructor(t){this.parser=t,this.name=T.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,e=this.parser.json.nodes||[];for(let i=0,n=e.length;i<n;i++){const r=e[i];r.extensions&&r.extensions[this.name]&&r.extensions[this.name].light!==void 0&&t._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(t){const e=this.parser,i="light:"+t;let n=e.cache.get(i);if(n)return n;const r=e.json,o=((r.extensions&&r.extensions[this.name]||{}).lights||[])[t];let c;const u=new D(16777215);o.color!==void 0&&u.setRGB(o.color[0],o.color[1],o.color[2],O);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new me(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new be(u),c.distance=l;break;case"spot":c=new Me(u),c.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,c.angle=o.spot.outerConeAngle,c.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return c.position.set(0,0,0),I(c,o),o.intensity!==void 0&&(c.intensity=o.intensity),c.name=e.createUniqueName(o.name||"light_"+t),n=Promise.resolve(c),e.cache.add(i,n),n}getDependency(t,e){if(t==="light")return this._loadLight(e)}createNodeAttachment(t){const e=this,i=this.parser,r=i.json.nodes[t],a=(r.extensions&&r.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(o){return i._getNodeRef(e.cache,a,o)})}}class ht{constructor(){this.name=T.KHR_MATERIALS_UNLIT}getMaterialType(){return k}extendParams(t,e,i){const n=[];t.color=new D(1,1,1),t.opacity=1;const r=e.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){const s=r.baseColorFactor;t.color.setRGB(s[0],s[1],s[2],O),t.opacity=s[3]}r.baseColorTexture!==void 0&&n.push(i.assignTexture(t,"map",r.baseColorTexture,U))}return Promise.all(n)}}class pt{constructor(t){this.parser=t,this.name=T.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name].emissiveStrength;return r!==void 0&&(e.emissiveIntensity=r),Promise.resolve()}}class mt{constructor(t){this.parser=t,this.name=T.KHR_MATERIALS_CLEARCOAT}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:M}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=[],s=n.extensions[this.name];if(s.clearcoatFactor!==void 0&&(e.clearcoat=s.clearcoatFactor),s.clearcoatTexture!==void 0&&r.push(i.assignTexture(e,"clearcoatMap",s.clearcoatTexture)),s.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=s.clearcoatRoughnessFactor),s.clearcoatRoughnessTexture!==void 0&&r.push(i.assignTexture(e,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),s.clearcoatNormalTexture!==void 0&&(r.push(i.assignTexture(e,"clearcoatNormalMap",s.clearcoatNormalTexture)),s.clearcoatNormalTexture.scale!==void 0)){const a=s.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new pe(a,a)}return Promise.all(r)}}class gt{constructor(t){this.parser=t,this.name=T.KHR_MATERIALS_DISPERSION}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:M}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name];return e.dispersion=r.dispersion!==void 0?r.dispersion:0,Promise.resolve()}}class At{constructor(t){this.parser=t,this.name=T.KHR_MATERIALS_IRIDESCENCE}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:M}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=[],s=n.extensions[this.name];return s.iridescenceFactor!==void 0&&(e.iridescence=s.iridescenceFactor),s.iridescenceTexture!==void 0&&r.push(i.assignTexture(e,"iridescenceMap",s.iridescenceTexture)),s.iridescenceIor!==void 0&&(e.iridescenceIOR=s.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),s.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),s.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),s.iridescenceThicknessTexture!==void 0&&r.push(i.assignTexture(e,"iridescenceThicknessMap",s.iridescenceThicknessTexture)),Promise.all(r)}}class Tt{constructor(t){this.parser=t,this.name=T.KHR_MATERIALS_SHEEN}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:M}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=[];e.sheenColor=new D(0,0,0),e.sheenRoughness=0,e.sheen=1;const s=n.extensions[this.name];if(s.sheenColorFactor!==void 0){const a=s.sheenColorFactor;e.sheenColor.setRGB(a[0],a[1],a[2],O)}return s.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=s.sheenRoughnessFactor),s.sheenColorTexture!==void 0&&r.push(i.assignTexture(e,"sheenColorMap",s.sheenColorTexture,U)),s.sheenRoughnessTexture!==void 0&&r.push(i.assignTexture(e,"sheenRoughnessMap",s.sheenRoughnessTexture)),Promise.all(r)}}class xt{constructor(t){this.parser=t,this.name=T.KHR_MATERIALS_TRANSMISSION}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:M}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=[],s=n.extensions[this.name];return s.transmissionFactor!==void 0&&(e.transmission=s.transmissionFactor),s.transmissionTexture!==void 0&&r.push(i.assignTexture(e,"transmissionMap",s.transmissionTexture)),Promise.all(r)}}class Rt{constructor(t){this.parser=t,this.name=T.KHR_MATERIALS_VOLUME}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:M}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=[],s=n.extensions[this.name];e.thickness=s.thicknessFactor!==void 0?s.thicknessFactor:0,s.thicknessTexture!==void 0&&r.push(i.assignTexture(e,"thicknessMap",s.thicknessTexture)),e.attenuationDistance=s.attenuationDistance||1/0;const a=s.attenuationColor||[1,1,1];return e.attenuationColor=new D().setRGB(a[0],a[1],a[2],O),Promise.all(r)}}class Et{constructor(t){this.parser=t,this.name=T.KHR_MATERIALS_IOR}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:M}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name];return e.ior=r.ior!==void 0?r.ior:1.5,Promise.resolve()}}class wt{constructor(t){this.parser=t,this.name=T.KHR_MATERIALS_SPECULAR}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:M}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=[],s=n.extensions[this.name];e.specularIntensity=s.specularFactor!==void 0?s.specularFactor:1,s.specularTexture!==void 0&&r.push(i.assignTexture(e,"specularIntensityMap",s.specularTexture));const a=s.specularColorFactor||[1,1,1];return e.specularColor=new D().setRGB(a[0],a[1],a[2],O),s.specularColorTexture!==void 0&&r.push(i.assignTexture(e,"specularColorMap",s.specularColorTexture,U)),Promise.all(r)}}class Lt{constructor(t){this.parser=t,this.name=T.EXT_MATERIALS_BUMP}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:M}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=[],s=n.extensions[this.name];return e.bumpScale=s.bumpFactor!==void 0?s.bumpFactor:1,s.bumpTexture!==void 0&&r.push(i.assignTexture(e,"bumpMap",s.bumpTexture)),Promise.all(r)}}class _t{constructor(t){this.parser=t,this.name=T.KHR_MATERIALS_ANISOTROPY}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:M}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=[],s=n.extensions[this.name];return s.anisotropyStrength!==void 0&&(e.anisotropy=s.anisotropyStrength),s.anisotropyRotation!==void 0&&(e.anisotropyRotation=s.anisotropyRotation),s.anisotropyTexture!==void 0&&r.push(i.assignTexture(e,"anisotropyMap",s.anisotropyTexture)),Promise.all(r)}}class yt{constructor(t){this.parser=t,this.name=T.KHR_TEXTURE_BASISU}loadTexture(t){const e=this.parser,i=e.json,n=i.textures[t];if(!n.extensions||!n.extensions[this.name])return null;const r=n.extensions[this.name],s=e.options.ktx2Loader;if(!s){if(i.extensionsRequired&&i.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,r.source,s)}}class St{constructor(t){this.parser=t,this.name=T.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(t){const e=this.name,i=this.parser,n=i.json,r=n.textures[t];if(!r.extensions||!r.extensions[e])return null;const s=r.extensions[e],a=n.images[s.source];let o=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);c!==null&&(o=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(t,s.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const e=new Image;e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.onload=e.onerror=function(){t(e.height===1)}})),this.isSupported}}class Mt{constructor(t){this.parser=t,this.name=T.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(t){const e=this.name,i=this.parser,n=i.json,r=n.textures[t];if(!r.extensions||!r.extensions[e])return null;const s=r.extensions[e],a=n.images[s.source];let o=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);c!==null&&(o=c)}return this.detectSupport().then(function(c){if(c)return i.loadTextureImage(t,s.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const e=new Image;e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",e.onload=e.onerror=function(){t(e.height===1)}})),this.isSupported}}class bt{constructor(t){this.name=T.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const e=this.parser.json,i=e.bufferViews[t];if(i.extensions&&i.extensions[this.name]){const n=i.extensions[this.name],r=this.parser.getDependency("buffer",n.buffer),s=this.parser.options.meshoptDecoder;if(!s||!s.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){const o=n.byteOffset||0,c=n.byteLength||0,u=n.count,l=n.byteStride,d=new Uint8Array(a,o,c);return s.decodeGltfBufferAsync?s.decodeGltfBufferAsync(u,l,d,n.mode,n.filter).then(function(h){return h.buffer}):s.ready.then(function(){const h=new ArrayBuffer(u*l);return s.decodeGltfBuffer(new Uint8Array(h),u,l,d,n.mode,n.filter),h})})}else return null}}class It{constructor(t){this.name=T.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const e=this.parser.json,i=e.nodes[t];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const n=e.meshes[i.mesh];for(const c of n.primitives)if(c.mode!==y.TRIANGLES&&c.mode!==y.TRIANGLE_STRIP&&c.mode!==y.TRIANGLE_FAN&&c.mode!==void 0)return null;const s=i.extensions[this.name].attributes,a=[],o={};for(const c in s)a.push(this.parser.getDependency("accessor",s[c]).then(u=>(o[c]=u,o[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const u=c.pop(),l=u.isGroup?u.children:[u],d=c[0].count,h=[];for(const m of l){const g=new j,p=new N,A=new ge,R=new N(1,1,1),E=new Ie(m.geometry,m.material,d);for(let x=0;x<d;x++)o.TRANSLATION&&p.fromBufferAttribute(o.TRANSLATION,x),o.ROTATION&&A.fromBufferAttribute(o.ROTATION,x),o.SCALE&&R.fromBufferAttribute(o.SCALE,x),E.setMatrixAt(x,g.compose(p,A,R));for(const x in o)if(x==="_COLOR_0"){const _=o[x];E.instanceColor=new Ne(_.array,_.itemSize,_.normalized)}else x!=="TRANSLATION"&&x!=="ROTATION"&&x!=="SCALE"&&m.geometry.setAttribute(x,o[x]);Ae.prototype.copy.call(E,m),this.parser.assignFinalMaterial(E),h.push(E)}return u.isGroup?(u.clear(),u.add(...h),u):h[0]}))}}const Le="glTF",v=12,ce={JSON:1313821514,BIN:5130562};class Nt{constructor(t){this.name=T.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(t,0,v),i=new TextDecoder;if(this.header={magic:i.decode(new Uint8Array(t.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==Le)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-v,r=new DataView(t,v);let s=0;for(;s<n;){const a=r.getUint32(s,!0);s+=4;const o=r.getUint32(s,!0);if(s+=4,o===ce.JSON){const c=new Uint8Array(t,v+s,a);this.content=i.decode(c)}else if(o===ce.BIN){const c=v+s;this.body=t.slice(c,c+a)}s+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Ot{constructor(t,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=T.KHR_DRACO_MESH_COMPRESSION,this.json=t,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(t,e){const i=this.json,n=this.dracoLoader,r=t.extensions[this.name].bufferView,s=t.extensions[this.name].attributes,a={},o={},c={};for(const u in s){const l=ee[u]||u.toLowerCase();a[l]=s[u]}for(const u in t.attributes){const l=ee[u]||u.toLowerCase();if(s[u]!==void 0){const d=i.accessors[t.attributes[u]],h=H[d.componentType];c[l]=h.name,o[l]=d.normalized===!0}}return e.getDependency("bufferView",r).then(function(u){return new Promise(function(l,d){n.decodeDracoFile(u,function(h){for(const m in h.attributes){const g=h.attributes[m],p=o[m];p!==void 0&&(g.normalized=p)}l(h)},a,c,O,d)})})}}class Ct{constructor(){this.name=T.KHR_TEXTURE_TRANSFORM}extendTexture(t,e){return(e.texCoord===void 0||e.texCoord===t.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(t=t.clone(),e.texCoord!==void 0&&(t.channel=e.texCoord),e.offset!==void 0&&t.offset.fromArray(e.offset),e.rotation!==void 0&&(t.rotation=e.rotation),e.scale!==void 0&&t.repeat.fromArray(e.scale),t.needsUpdate=!0),t}}class Pt{constructor(){this.name=T.KHR_MESH_QUANTIZATION}}class _e extends rt{constructor(t,e,i,n){super(t,e,i,n)}copySampleValue_(t){const e=this.resultBuffer,i=this.sampleValues,n=this.valueSize,r=t*n*3+n;for(let s=0;s!==n;s++)e[s]=i[r+s];return e}interpolate_(t,e,i,n){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,o=a*2,c=a*3,u=n-e,l=(i-e)/u,d=l*l,h=d*l,m=t*c,g=m-c,p=-2*h+3*d,A=h-d,R=1-p,E=A-d+l;for(let x=0;x!==a;x++){const _=s[g+x+a],S=s[g+x+o]*u,w=s[m+x+a],b=s[m+x]*u;r[x]=R*_+E*S+p*w+A*b}return r}}const Ft=new ge;class Dt extends _e{interpolate_(t,e,i,n){const r=super.interpolate_(t,e,i,n);return Ft.fromArray(r).normalize().toArray(r),r}}const y={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},H={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},le={9728:xe,9729:Z,9984:He,9985:De,9986:Fe,9987:Te},ue={33071:ke,33648:ve,10497:J},W={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ee={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},C={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Ht={CUBICSPLINE:void 0,LINEAR:we,STEP:tt},q={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function vt(f){return f.DefaultMaterial===void 0&&(f.DefaultMaterial=new Re({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:st})),f.DefaultMaterial}function F(f,t,e){for(const i in e.extensions)f[i]===void 0&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[i]=e.extensions[i])}function I(f,t){t.extras!==void 0&&(typeof t.extras=="object"?Object.assign(f.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function kt(f,t,e){let i=!1,n=!1,r=!1;for(let c=0,u=t.length;c<u;c++){const l=t[c];if(l.POSITION!==void 0&&(i=!0),l.NORMAL!==void 0&&(n=!0),l.COLOR_0!==void 0&&(r=!0),i&&n&&r)break}if(!i&&!n&&!r)return Promise.resolve(f);const s=[],a=[],o=[];for(let c=0,u=t.length;c<u;c++){const l=t[c];if(i){const d=l.POSITION!==void 0?e.getDependency("accessor",l.POSITION):f.attributes.position;s.push(d)}if(n){const d=l.NORMAL!==void 0?e.getDependency("accessor",l.NORMAL):f.attributes.normal;a.push(d)}if(r){const d=l.COLOR_0!==void 0?e.getDependency("accessor",l.COLOR_0):f.attributes.color;o.push(d)}}return Promise.all([Promise.all(s),Promise.all(a),Promise.all(o)]).then(function(c){const u=c[0],l=c[1],d=c[2];return i&&(f.morphAttributes.position=u),n&&(f.morphAttributes.normal=l),r&&(f.morphAttributes.color=d),f.morphTargetsRelative=!0,f})}function Gt(f,t){if(f.updateMorphTargets(),t.weights!==void 0)for(let e=0,i=t.weights.length;e<i;e++)f.morphTargetInfluences[e]=t.weights[e];if(t.extras&&Array.isArray(t.extras.targetNames)){const e=t.extras.targetNames;if(f.morphTargetInfluences.length===e.length){f.morphTargetDictionary={};for(let i=0,n=e.length;i<n;i++)f.morphTargetDictionary[e[i]]=i}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Bt(f){let t;const e=f.extensions&&f.extensions[T.KHR_DRACO_MESH_COMPRESSION];if(e?t="draco:"+e.bufferView+":"+e.indices+":"+Y(e.attributes):t=f.indices+":"+Y(f.attributes)+":"+f.mode,f.targets!==void 0)for(let i=0,n=f.targets.length;i<n;i++)t+=":"+Y(f.targets[i]);return t}function Y(f){let t="";const e=Object.keys(f).sort();for(let i=0,n=e.length;i<n;i++)t+=e[i]+":"+f[e[i]]+";";return t}function te(f){switch(f){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Ut(f){return f.search(/\.jpe?g($|\?)/i)>0||f.search(/^data\:image\/jpeg/)===0?"image/jpeg":f.search(/\.webp($|\?)/i)>0||f.search(/^data\:image\/webp/)===0?"image/webp":f.search(/\.ktx2($|\?)/i)>0||f.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const jt=new j;class Kt{constructor(t={},e={}){this.json=t,this.extensions={},this.plugins={},this.options=e,this.cache=new dt,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,n=-1,r=!1,s=-1;if(typeof navigator<"u"){const a=navigator.userAgent;i=/^((?!chrome|android).)*safari/i.test(a)===!0;const o=a.match(/Version\/(\d+)/);n=i&&o?parseInt(o[1],10):-1,r=a.indexOf("Firefox")>-1,s=r?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||i&&n<17||r&&s<98?this.textureLoader=new Oe(this.options.manager):this.textureLoader=new Ce(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new he(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){const i=this,n=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(s){return s._markDefs&&s._markDefs()}),Promise.all(this._invokeAll(function(s){return s.beforeRoot&&s.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(s){const a={scene:s[0][n.scene||0],scenes:s[0],animations:s[1],cameras:s[2],asset:n.asset,parser:i,userData:{}};return F(r,a,n),I(a,n),Promise.all(i._invokeAll(function(o){return o.afterRoot&&o.afterRoot(a)})).then(function(){for(const o of a.scenes)o.updateMatrixWorld();t(a)})}).catch(e)}_markDefs(){const t=this.json.nodes||[],e=this.json.skins||[],i=this.json.meshes||[];for(let n=0,r=e.length;n<r;n++){const s=e[n].joints;for(let a=0,o=s.length;a<o;a++)t[s[a]].isBone=!0}for(let n=0,r=t.length;n<r;n++){const s=t[n];s.mesh!==void 0&&(this._addNodeRef(this.meshCache,s.mesh),s.skin!==void 0&&(i[s.mesh].isSkinnedMesh=!0)),s.camera!==void 0&&this._addNodeRef(this.cameraCache,s.camera)}}_addNodeRef(t,e){e!==void 0&&(t.refs[e]===void 0&&(t.refs[e]=t.uses[e]=0),t.refs[e]++)}_getNodeRef(t,e,i){if(t.refs[e]<=1)return i;const n=i.clone(),r=(s,a)=>{const o=this.associations.get(s);o!=null&&this.associations.set(a,o);for(const[c,u]of s.children.entries())r(u,a.children[c])};return r(i,n),n.name+="_instance_"+t.uses[e]++,n}_invokeOne(t){const e=Object.values(this.plugins);e.push(this);for(let i=0;i<e.length;i++){const n=t(e[i]);if(n)return n}return null}_invokeAll(t){const e=Object.values(this.plugins);e.unshift(this);const i=[];for(let n=0;n<e.length;n++){const r=t(e[n]);r&&i.push(r)}return i}getDependency(t,e){const i=t+":"+e;let n=this.cache.get(i);if(!n){switch(t){case"scene":n=this.loadScene(e);break;case"node":n=this._invokeOne(function(r){return r.loadNode&&r.loadNode(e)});break;case"mesh":n=this._invokeOne(function(r){return r.loadMesh&&r.loadMesh(e)});break;case"accessor":n=this.loadAccessor(e);break;case"bufferView":n=this._invokeOne(function(r){return r.loadBufferView&&r.loadBufferView(e)});break;case"buffer":n=this.loadBuffer(e);break;case"material":n=this._invokeOne(function(r){return r.loadMaterial&&r.loadMaterial(e)});break;case"texture":n=this._invokeOne(function(r){return r.loadTexture&&r.loadTexture(e)});break;case"skin":n=this.loadSkin(e);break;case"animation":n=this._invokeOne(function(r){return r.loadAnimation&&r.loadAnimation(e)});break;case"camera":n=this.loadCamera(e);break;default:if(n=this._invokeOne(function(r){return r!=this&&r.getDependency&&r.getDependency(t,e)}),!n)throw new Error("Unknown type: "+t);break}this.cache.add(i,n)}return n}getDependencies(t){let e=this.cache.get(t);if(!e){const i=this,n=this.json[t+(t==="mesh"?"es":"s")]||[];e=Promise.all(n.map(function(r,s){return i.getDependency(t,s)})),this.cache.add(t,e)}return e}loadBuffer(t){const e=this.json.buffers[t],i=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&t===0)return Promise.resolve(this.extensions[T.KHR_BINARY_GLTF].body);const n=this.options;return new Promise(function(r,s){i.load(G.resolveURL(e.uri,n.path),r,void 0,function(){s(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(t){const e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(i){const n=e.byteLength||0,r=e.byteOffset||0;return i.slice(r,r+n)})}loadAccessor(t){const e=this,i=this.json,n=this.json.accessors[t];if(n.bufferView===void 0&&n.sparse===void 0){const s=W[n.type],a=H[n.componentType],o=n.normalized===!0,c=new a(n.count*s);return Promise.resolve(new V(c,s,o))}const r=[];return n.bufferView!==void 0?r.push(this.getDependency("bufferView",n.bufferView)):r.push(null),n.sparse!==void 0&&(r.push(this.getDependency("bufferView",n.sparse.indices.bufferView)),r.push(this.getDependency("bufferView",n.sparse.values.bufferView))),Promise.all(r).then(function(s){const a=s[0],o=W[n.type],c=H[n.componentType],u=c.BYTES_PER_ELEMENT,l=u*o,d=n.byteOffset||0,h=n.bufferView!==void 0?i.bufferViews[n.bufferView].byteStride:void 0,m=n.normalized===!0;let g,p;if(h&&h!==l){const A=Math.floor(d/h),R="InterleavedBuffer:"+n.bufferView+":"+n.componentType+":"+A+":"+n.count;let E=e.cache.get(R);E||(g=new c(a,A*h,n.count*h/u),E=new Pe(g,h/u),e.cache.add(R,E)),p=new nt(E,o,d%h/u,m)}else a===null?g=new c(n.count*o):g=new c(a,d,n.count*o),p=new V(g,o,m);if(n.sparse!==void 0){const A=W.SCALAR,R=H[n.sparse.indices.componentType],E=n.sparse.indices.byteOffset||0,x=n.sparse.values.byteOffset||0,_=new R(s[1],E,n.sparse.count*A),S=new c(s[2],x,n.sparse.count*o);a!==null&&(p=new V(p.array.slice(),p.itemSize,p.normalized)),p.normalized=!1;for(let w=0,b=_.length;w<b;w++){const L=_[w];if(p.setX(L,S[w*o]),o>=2&&p.setY(L,S[w*o+1]),o>=3&&p.setZ(L,S[w*o+2]),o>=4&&p.setW(L,S[w*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}p.normalized=m}return p})}loadTexture(t){const e=this.json,i=this.options,r=e.textures[t].source,s=e.images[r];let a=this.textureLoader;if(s.uri){const o=i.manager.getHandler(s.uri);o!==null&&(a=o)}return this.loadTextureImage(t,r,a)}loadTextureImage(t,e,i){const n=this,r=this.json,s=r.textures[t],a=r.images[e],o=(a.uri||a.bufferView)+":"+s.sampler;if(this.textureCache[o])return this.textureCache[o];const c=this.loadImageSource(e,i).then(function(u){u.flipY=!1,u.name=s.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const d=(r.samplers||{})[s.sampler]||{};return u.magFilter=le[d.magFilter]||Z,u.minFilter=le[d.minFilter]||Te,u.wrapS=ue[d.wrapS]||J,u.wrapT=ue[d.wrapT]||J,u.generateMipmaps=!u.isCompressedTexture&&u.minFilter!==xe&&u.minFilter!==Z,n.associations.set(u,{textures:t}),u}).catch(function(){return null});return this.textureCache[o]=c,c}loadImageSource(t,e){const i=this,n=this.json,r=this.options;if(this.sourceCache[t]!==void 0)return this.sourceCache[t].then(l=>l.clone());const s=n.images[t],a=self.URL||self.webkitURL;let o=s.uri||"",c=!1;if(s.bufferView!==void 0)o=i.getDependency("bufferView",s.bufferView).then(function(l){c=!0;const d=new Blob([l],{type:s.mimeType});return o=a.createObjectURL(d),o});else if(s.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const u=Promise.resolve(o).then(function(l){return new Promise(function(d,h){let m=d;e.isImageBitmapLoader===!0&&(m=function(g){const p=new ne(g);p.needsUpdate=!0,d(p)}),e.load(G.resolveURL(l,r.path),m,void 0,h)})}).then(function(l){return c===!0&&a.revokeObjectURL(o),I(l,s),l.userData.mimeType=s.mimeType||Ut(s.uri),l}).catch(function(l){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),l});return this.sourceCache[t]=u,u}assignTexture(t,e,i,n){const r=this;return this.getDependency("texture",i.index).then(function(s){if(!s)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(s=s.clone(),s.channel=i.texCoord),r.extensions[T.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[T.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const o=r.associations.get(s);s=r.extensions[T.KHR_TEXTURE_TRANSFORM].extendTexture(s,a),r.associations.set(s,o)}}return n!==void 0&&(s.colorSpace=n),t[e]=s,s})}assignFinalMaterial(t){const e=t.geometry;let i=t.material;const n=e.attributes.tangent===void 0,r=e.attributes.color!==void 0,s=e.attributes.normal===void 0;if(t.isPoints){const a="PointsMaterial:"+i.uuid;let o=this.cache.get(a);o||(o=new Ge,X.prototype.copy.call(o,i),o.color.copy(i.color),o.map=i.map,o.sizeAttenuation=!1,this.cache.add(a,o)),i=o}else if(t.isLine){const a="LineBasicMaterial:"+i.uuid;let o=this.cache.get(a);o||(o=new Be,X.prototype.copy.call(o,i),o.color.copy(i.color),o.map=i.map,this.cache.add(a,o)),i=o}if(n||r||s){let a="ClonedMaterial:"+i.uuid+":";n&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),s&&(a+="flat-shading:");let o=this.cache.get(a);o||(o=i.clone(),r&&(o.vertexColors=!0),s&&(o.flatShading=!0),n&&(o.normalScale&&(o.normalScale.y*=-1),o.clearcoatNormalScale&&(o.clearcoatNormalScale.y*=-1)),this.cache.add(a,o),this.associations.set(o,this.associations.get(i))),i=o}t.material=i}getMaterialType(){return Re}loadMaterial(t){const e=this,i=this.json,n=this.extensions,r=i.materials[t];let s;const a={},o=r.extensions||{},c=[];if(o[T.KHR_MATERIALS_UNLIT]){const l=n[T.KHR_MATERIALS_UNLIT];s=l.getMaterialType(),c.push(l.extendParams(a,r,e))}else{const l=r.pbrMetallicRoughness||{};if(a.color=new D(1,1,1),a.opacity=1,Array.isArray(l.baseColorFactor)){const d=l.baseColorFactor;a.color.setRGB(d[0],d[1],d[2],O),a.opacity=d[3]}l.baseColorTexture!==void 0&&c.push(e.assignTexture(a,"map",l.baseColorTexture,U)),a.metalness=l.metallicFactor!==void 0?l.metallicFactor:1,a.roughness=l.roughnessFactor!==void 0?l.roughnessFactor:1,l.metallicRoughnessTexture!==void 0&&(c.push(e.assignTexture(a,"metalnessMap",l.metallicRoughnessTexture)),c.push(e.assignTexture(a,"roughnessMap",l.metallicRoughnessTexture))),s=this._invokeOne(function(d){return d.getMaterialType&&d.getMaterialType(t)}),c.push(Promise.all(this._invokeAll(function(d){return d.extendMaterialParams&&d.extendMaterialParams(t,a)})))}r.doubleSided===!0&&(a.side=Ue);const u=r.alphaMode||q.OPAQUE;if(u===q.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===q.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&s!==k&&(c.push(e.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new pe(1,1),r.normalTexture.scale!==void 0)){const l=r.normalTexture.scale;a.normalScale.set(l,l)}if(r.occlusionTexture!==void 0&&s!==k&&(c.push(e.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&s!==k){const l=r.emissiveFactor;a.emissive=new D().setRGB(l[0],l[1],l[2],O)}return r.emissiveTexture!==void 0&&s!==k&&c.push(e.assignTexture(a,"emissiveMap",r.emissiveTexture,U)),Promise.all(c).then(function(){const l=new s(a);return r.name&&(l.name=r.name),I(l,r),e.associations.set(l,{materials:t}),r.extensions&&F(n,l,r),l})}createUniqueName(t){const e=je.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){const e=this,i=this.extensions,n=this.primitiveCache;function r(a){return i[T.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(o){return de(o,a,e)})}const s=[];for(let a=0,o=t.length;a<o;a++){const c=t[a],u=Bt(c),l=n[u];if(l)s.push(l.promise);else{let d;c.extensions&&c.extensions[T.KHR_DRACO_MESH_COMPRESSION]?d=r(c):d=de(new Ke,c,e),n[u]={primitive:c,promise:d},s.push(d)}}return Promise.all(s)}loadMesh(t){const e=this,i=this.json,n=this.extensions,r=i.meshes[t],s=r.primitives,a=[];for(let o=0,c=s.length;o<c;o++){const u=s[o].material===void 0?vt(this.cache):this.getDependency("material",s[o].material);a.push(u)}return a.push(e.loadGeometries(s)),Promise.all(a).then(function(o){const c=o.slice(0,o.length-1),u=o[o.length-1],l=[];for(let h=0,m=u.length;h<m;h++){const g=u[h],p=s[h];let A;const R=c[h];if(p.mode===y.TRIANGLES||p.mode===y.TRIANGLE_STRIP||p.mode===y.TRIANGLE_FAN||p.mode===void 0)A=r.isSkinnedMesh===!0?new Ve(g,R):new Xe(g,R),A.isSkinnedMesh===!0&&A.normalizeSkinWeights(),p.mode===y.TRIANGLE_STRIP?A.geometry=ae(A.geometry,fe):p.mode===y.TRIANGLE_FAN&&(A.geometry=ae(A.geometry,Q));else if(p.mode===y.LINES)A=new ze(g,R);else if(p.mode===y.LINE_STRIP)A=new We(g,R);else if(p.mode===y.LINE_LOOP)A=new qe(g,R);else if(p.mode===y.POINTS)A=new Ye(g,R);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+p.mode);Object.keys(A.geometry.morphAttributes).length>0&&Gt(A,r),A.name=e.createUniqueName(r.name||"mesh_"+t),I(A,r),p.extensions&&F(n,A,p),e.assignFinalMaterial(A),l.push(A)}for(let h=0,m=l.length;h<m;h++)e.associations.set(l[h],{meshes:t,primitives:h});if(l.length===1)return r.extensions&&F(n,l[0],r),l[0];const d=new z;r.extensions&&F(n,d,r),e.associations.set(d,{meshes:t});for(let h=0,m=l.length;h<m;h++)d.add(l[h]);return d})}loadCamera(t){let e;const i=this.json.cameras[t],n=i[i.type];if(!n){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return i.type==="perspective"?e=new Ee(Qe.radToDeg(n.yfov),n.aspectRatio||1,n.znear||1,n.zfar||2e6):i.type==="orthographic"&&(e=new Ze(-n.xmag,n.xmag,n.ymag,-n.ymag,n.znear,n.zfar)),i.name&&(e.name=this.createUniqueName(i.name)),I(e,i),Promise.resolve(e)}loadSkin(t){const e=this.json.skins[t],i=[];for(let n=0,r=e.joints.length;n<r;n++)i.push(this._loadNodeShallow(e.joints[n]));return e.inverseBindMatrices!==void 0?i.push(this.getDependency("accessor",e.inverseBindMatrices)):i.push(null),Promise.all(i).then(function(n){const r=n.pop(),s=n,a=[],o=[];for(let c=0,u=s.length;c<u;c++){const l=s[c];if(l){a.push(l);const d=new j;r!==null&&d.fromArray(r.array,c*16),o.push(d)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[c])}return new Je(a,o)})}loadAnimation(t){const e=this.json,i=this,n=e.animations[t],r=n.name?n.name:"animation_"+t,s=[],a=[],o=[],c=[],u=[];for(let l=0,d=n.channels.length;l<d;l++){const h=n.channels[l],m=n.samplers[h.sampler],g=h.target,p=g.node,A=n.parameters!==void 0?n.parameters[m.input]:m.input,R=n.parameters!==void 0?n.parameters[m.output]:m.output;g.node!==void 0&&(s.push(this.getDependency("node",p)),a.push(this.getDependency("accessor",A)),o.push(this.getDependency("accessor",R)),c.push(m),u.push(g))}return Promise.all([Promise.all(s),Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(u)]).then(function(l){const d=l[0],h=l[1],m=l[2],g=l[3],p=l[4],A=[];for(let R=0,E=d.length;R<E;R++){const x=d[R],_=h[R],S=m[R],w=g[R],b=p[R];if(x===void 0)continue;x.updateMatrix&&x.updateMatrix();const L=i._createAnimationTracks(x,_,S,w,b);if(L)for(let P=0;P<L.length;P++)A.push(L[P])}return new $e(r,void 0,A)})}createNodeMesh(t){const e=this.json,i=this,n=e.nodes[t];return n.mesh===void 0?null:i.getDependency("mesh",n.mesh).then(function(r){const s=i._getNodeRef(i.meshCache,n.mesh,r);return n.weights!==void 0&&s.traverse(function(a){if(a.isMesh)for(let o=0,c=n.weights.length;o<c;o++)a.morphTargetInfluences[o]=n.weights[o]}),s})}loadNode(t){const e=this.json,i=this,n=e.nodes[t],r=i._loadNodeShallow(t),s=[],a=n.children||[];for(let c=0,u=a.length;c<u;c++)s.push(i.getDependency("node",a[c]));const o=n.skin===void 0?Promise.resolve(null):i.getDependency("skin",n.skin);return Promise.all([r,Promise.all(s),o]).then(function(c){const u=c[0],l=c[1],d=c[2];d!==null&&u.traverse(function(h){h.isSkinnedMesh&&h.bind(d,jt)});for(let h=0,m=l.length;h<m;h++)u.add(l[h]);return u})}_loadNodeShallow(t){const e=this.json,i=this.extensions,n=this;if(this.nodeCache[t]!==void 0)return this.nodeCache[t];const r=e.nodes[t],s=r.name?n.createUniqueName(r.name):"",a=[],o=n._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(t)});return o&&a.push(o),r.camera!==void 0&&a.push(n.getDependency("camera",r.camera).then(function(c){return n._getNodeRef(n.cameraCache,r.camera,c)})),n._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(t)}).forEach(function(c){a.push(c)}),this.nodeCache[t]=Promise.all(a).then(function(c){let u;if(r.isBone===!0?u=new et:c.length>1?u=new z:c.length===1?u=c[0]:u=new Ae,u!==c[0])for(let l=0,d=c.length;l<d;l++)u.add(c[l]);if(r.name&&(u.userData.name=r.name,u.name=s),I(u,r),r.extensions&&F(i,u,r),r.matrix!==void 0){const l=new j;l.fromArray(r.matrix),u.applyMatrix4(l)}else r.translation!==void 0&&u.position.fromArray(r.translation),r.rotation!==void 0&&u.quaternion.fromArray(r.rotation),r.scale!==void 0&&u.scale.fromArray(r.scale);return n.associations.has(u)||n.associations.set(u,{}),n.associations.get(u).nodes=t,u}),this.nodeCache[t]}loadScene(t){const e=this.extensions,i=this.json.scenes[t],n=this,r=new z;i.name&&(r.name=n.createUniqueName(i.name)),I(r,i),i.extensions&&F(e,r,i);const s=i.nodes||[],a=[];for(let o=0,c=s.length;o<c;o++)a.push(n.getDependency("node",s[o]));return Promise.all(a).then(function(o){for(let u=0,l=o.length;u<l;u++)r.add(o[u]);const c=u=>{const l=new Map;for(const[d,h]of n.associations)(d instanceof X||d instanceof ne)&&l.set(d,h);return u.traverse(d=>{const h=n.associations.get(d);h!=null&&l.set(d,h)}),l};return n.associations=c(r),r})}_createAnimationTracks(t,e,i,n,r){const s=[],a=t.name?t.name:t.uuid,o=[];C[r.path]===C.weights?t.traverse(function(d){d.morphTargetInfluences&&o.push(d.name?d.name:d.uuid)}):o.push(a);let c;switch(C[r.path]){case C.weights:c=re;break;case C.rotation:c=ie;break;case C.translation:case C.scale:c=se;break;default:switch(i.itemSize){case 1:c=re;break;case 2:case 3:default:c=se;break}break}const u=n.interpolation!==void 0?Ht[n.interpolation]:we,l=this._getArrayFromAccessor(i);for(let d=0,h=o.length;d<h;d++){const m=new c(o[d]+"."+C[r.path],e.array,l,u);n.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(m),s.push(m)}return s}_getArrayFromAccessor(t){let e=t.array;if(t.normalized){const i=te(e.constructor),n=new Float32Array(e.length);for(let r=0,s=e.length;r<s;r++)n[r]=e[r]*i;e=n}return e}_createCubicSplineTrackInterpolant(t){t.createInterpolant=function(i){const n=this instanceof ie?Dt:_e;return new n(this.times,this.values,this.getValueSize()/3,i)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Vt(f,t,e){const i=t.attributes,n=new $;if(i.POSITION!==void 0){const a=e.json.accessors[i.POSITION],o=a.min,c=a.max;if(o!==void 0&&c!==void 0){if(n.set(new N(o[0],o[1],o[2]),new N(c[0],c[1],c[2])),a.normalized){const u=te(H[a.componentType]);n.min.multiplyScalar(u),n.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const r=t.targets;if(r!==void 0){const a=new N,o=new N;for(let c=0,u=r.length;c<u;c++){const l=r[c];if(l.POSITION!==void 0){const d=e.json.accessors[l.POSITION],h=d.min,m=d.max;if(h!==void 0&&m!==void 0){if(o.setX(Math.max(Math.abs(h[0]),Math.abs(m[0]))),o.setY(Math.max(Math.abs(h[1]),Math.abs(m[1]))),o.setZ(Math.max(Math.abs(h[2]),Math.abs(m[2]))),d.normalized){const g=te(H[d.componentType]);o.multiplyScalar(g)}a.max(o)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}n.expandByVector(a)}f.boundingBox=n;const s=new it;n.getCenter(s.center),s.radius=n.min.distanceTo(n.max)/2,f.boundingSphere=s}function de(f,t,e){const i=t.attributes,n=[];function r(s,a){return e.getDependency("accessor",s).then(function(o){f.setAttribute(a,o)})}for(const s in i){const a=ee[s]||s.toLowerCase();a in f.attributes||n.push(r(i[s],a))}if(t.indices!==void 0&&!f.index){const s=e.getDependency("accessor",t.indices).then(function(a){f.setIndex(a)});n.push(s)}return oe.workingColorSpace!==O&&"COLOR_0"in i&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${oe.workingColorSpace}" not supported.`),I(f,t),Vt(f,t,e),Promise.all(n).then(function(){return t.targets!==void 0?kt(f,t.targets,e):f})}class Xt{gltfLoader;constructor(){this.gltfLoader=new ut}loadGLB(t){return new Promise((e,i)=>{this.gltfLoader.load(t,n=>e(n.scene),void 0,n=>i(n))})}async loadAssets(t){const e=Object.entries(t).map(([r,s])=>this.loadGLB(s).then(a=>({key:r,asset:a}))),i=await Promise.all(e),n={};return i.forEach(({key:r,asset:s})=>{n[r]=s}),n}}const zt=async f=>{const t=new ot,e=new Ee(60,window.innerWidth/window.innerHeight,.1,1e3);e.position.set(0,6,0),e.lookAt(0,0,0);const i=new at({antialias:!0});i.setSize(window.innerWidth,window.innerHeight),document.getElementById(f)?.appendChild(i.domElement);const n=new ct(16777215,2);t.add(n);const r=new me(16777215,1);r.position.set(10,20,20),t.add(r);const s=new B;document.body.appendChild(s.dom);const a=new Xt,o={plane:"/plane.glb",middleObject:"/apollo13.glb"},c=(l,d,h)=>{const m=new $().setFromObject(l),g=new N;m.getSize(g);const p=new N;m.getCenter(p),l.position.sub(p);const A=h.fov*(Math.PI/180),R=2*Math.tan(A/2)*h.position.y,E=R*h.aspect,x=Math.ceil(R/g.z)+2,_=Math.ceil(E/g.x)+2,S=.01,w=g.x-S,b=g.z-S;d.children=d.children.filter(L=>!L.isTile);for(let L=0;L<x;L++)for(let P=0;P<_;P++){const K=l.clone();K.position.set(P*w-_*w/2+w/2,0,L*b-x*b/2+b/2),K.isTile=!0,d.add(K)}},u=(l,d,h)=>{const m=2*Math.tan(h.fov*Math.PI/180/2)*h.position.y*h.aspect;l.children.forEach(g=>{if(g.isTile&&(g.position.x-=.01,g.position.x<-m/2-d.x)){const p=d.x-.01,A=(Math.ceil(m/p)+2)*p;g.position.x+=A}})};try{const l=await a.loadAssets(o),d=l.plane,h=new $().setFromObject(d),m=new N;h.getSize(m),c(d,t,e);const g=l.middleObject;g.scale.set(.2,.2,.2),g.position.set(0,2,0),g.traverse(A=>{A.isMesh&&(A.frustumCulled=!1)}),t.add(g),window.addEventListener("resize",()=>{i.setSize(window.innerWidth,window.innerHeight),e.aspect=window.innerWidth/window.innerHeight,e.updateProjectionMatrix(),c(d,t,e)});const p=()=>{requestAnimationFrame(p),g.rotation.x+=.01,u(t,m,e),i.render(t,e),s.update()};p(),lt()}catch(l){console.error("Error loading assets:",l)}};zt("app");
|
dist/assets/index-Csdf6onh.js.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:007719fc474fae84cfbd3210019ac9190ba3962bef904eae8aadc0bfafdad4bb
|
3 |
+
size 15700
|
dist/assets/three-BBdsPnFb.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
dist/assets/three-BBdsPnFb.js.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c43c348cbebf95f015b9b9da5cfec59ae3fd4cb1cc916ef390c839dfb7dd5db3
|
3 |
+
size 129975
|
dist/index.html
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!doctype html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8" />
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
+
<meta
|
7 |
+
name="description"
|
8 |
+
content="Explore a Three.js project."
|
9 |
+
/>
|
10 |
+
<title>Example</title>
|
11 |
+
<style>
|
12 |
+
html,
|
13 |
+
body {
|
14 |
+
margin: 0;
|
15 |
+
padding: 0;
|
16 |
+
background-color: black;
|
17 |
+
overflow: hidden;
|
18 |
+
height: 100%;
|
19 |
+
width: 100%;
|
20 |
+
}
|
21 |
+
|
22 |
+
#loader {
|
23 |
+
position: fixed;
|
24 |
+
top: 0;
|
25 |
+
left: 0;
|
26 |
+
right: 0;
|
27 |
+
bottom: 0;
|
28 |
+
background: black;
|
29 |
+
color: white;
|
30 |
+
font-size: 2rem;
|
31 |
+
display: flex;
|
32 |
+
justify-content: center;
|
33 |
+
align-items: center;
|
34 |
+
z-index: 9999;
|
35 |
+
opacity: 1;
|
36 |
+
transition: opacity 0.5s ease;
|
37 |
+
}
|
38 |
+
</style>
|
39 |
+
<script type="module" crossorigin src="/assets/index-Csdf6onh.js"></script>
|
40 |
+
<link rel="modulepreload" crossorigin href="/assets/three-BBdsPnFb.js">
|
41 |
+
</head>
|
42 |
+
<body>
|
43 |
+
<div id="loader">...Please wait...</div>
|
44 |
+
<div id="app"></div>
|
45 |
+
</body>
|
46 |
+
</html>
|
dist/index.html.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bc6421959706ee29e3fb72cfe7c4b8c9fe0d2a852324ce511eabe046e566ce42
|
3 |
+
size 550
|
dist/plane.glb
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0a22106c513430032b3fda5fb1b0487694c63c4d8a58044b9d6d5f31123df3cc
|
3 |
+
size 171112
|
dist/plane.glb.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b9350cc94a29d6e511097a0d43c67a518118b00ef9f842269a6ca89ff45bd7b8
|
3 |
+
size 17170
|
dist/robots.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
User-agent: *
|
2 |
+
Allow: /
|
nginx.conf
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
server {
|
2 |
+
listen 7860;
|
3 |
+
server_name localhost;
|
4 |
+
|
5 |
+
root /usr/share/nginx/html;
|
6 |
+
index index.html;
|
7 |
+
|
8 |
+
# Enable gzip and pre-compressed file support
|
9 |
+
gzip on;
|
10 |
+
gzip_static on;
|
11 |
+
gzip_comp_level 6;
|
12 |
+
gzip_vary on;
|
13 |
+
gzip_proxied any;
|
14 |
+
|
15 |
+
gzip_types
|
16 |
+
text/plain
|
17 |
+
text/css
|
18 |
+
text/javascript
|
19 |
+
application/javascript
|
20 |
+
application/json
|
21 |
+
application/xml
|
22 |
+
application/font-woff
|
23 |
+
application/font-woff2
|
24 |
+
application/octet-stream
|
25 |
+
image/svg+xml;
|
26 |
+
|
27 |
+
# Serve .gz files manually if needed
|
28 |
+
location ~* \.gz$ {
|
29 |
+
add_header Content-Encoding gzip;
|
30 |
+
add_header Vary Accept-Encoding;
|
31 |
+
types {
|
32 |
+
text/javascript js;
|
33 |
+
text/css css;
|
34 |
+
text/html html;
|
35 |
+
application/octet-stream glb;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
# 🔥 Cache-busting for fingerprinted assets
|
40 |
+
location ~* \.(js|css|woff2?|eot|ttf|otf|svg|glb|gltf|wasm|png|jpe?g|gif|ico|webp)$ {
|
41 |
+
add_header Cache-Control "public, max-age=31536000, immutable";
|
42 |
+
try_files $uri =404;
|
43 |
+
}
|
44 |
+
|
45 |
+
# 🚫 Prevent caching index.html (always load latest)
|
46 |
+
location = /index.html {
|
47 |
+
add_header Cache-Control "no-cache";
|
48 |
+
try_files $uri =404;
|
49 |
+
}
|
50 |
+
|
51 |
+
# 🧩 Optional: glb file support
|
52 |
+
location ~* \.glb$ {
|
53 |
+
add_header Content-Type application/octet-stream;
|
54 |
+
try_files $uri =404;
|
55 |
+
}
|
56 |
+
|
57 |
+
# 🎯 SPA fallback (Vue/React/etc.)
|
58 |
+
location / {
|
59 |
+
try_files $uri $uri/ /index.html;
|
60 |
+
}
|
61 |
+
}
|