lazy load lesser used scene objects

This commit is contained in:
Brian Beck 2025-12-03 14:55:39 -08:00
parent c810f0ef88
commit 06256b9396
55 changed files with 126 additions and 1247 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
self.__BUILD_MANIFEST=function(e,r,t){return{__rewrites:{afterFiles:[],beforeFiles:[{has:void 0,source:"/t2-mapper//_next/:path+",destination:"/t2-mapper/_next/:path+"}],fallback:[]},__routerFilterStatic:{numItems:3,errorRate:1e-4,numBits:58,numHashes:14,bitArray:[1,1,0,e,0,e,e,r,r,e,r,e,r,e,r,e,r,r,e,r,r,r,e,e,r,e,r,r,e,r,e,e,e,e,r,e,e,r,e,e,r,r,e,r,e,r,r,e,e,e,e,e,e,e,r,r,e,e]},__routerFilterDynamic:{numItems:r,errorRate:1e-4,numBits:r,numHashes:null,bitArray:[]},"/_error":["static/chunks/pages/_error-cb2a52f75f2162e2.js"],sortedPages:["/_app","/_error"]}}(1,0,1e-4),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();

View file

@ -0,0 +1,19 @@
self.__BUILD_MANIFEST = {
"/_error": [
"./static/chunks/9e44200017dc27a5.js"
],
"__rewrites": {
"afterFiles": [],
"beforeFiles": [
{
"source": "/t2-mapper//_next/:path+",
"destination": "/t2-mapper/_next/:path+"
}
],
"fallback": []
},
"sortedPages": [
"/_app",
"/_error"
]
};self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,29055,e=>{"use strict";e.s(["AudioEmitter",()=>m]);var t=e.i(43476),r=e.i(71645),n=e.i(16096),u=e.i(5230),i=e.i(90072),o=e.i(62395),c=e.i(12979),l=e.i(51434),s=e.i(79123),a=e.i(89887);let f=new Map,m=(0,r.memo)(function(e){var m,p,d,h,g,y,T;let{object:x}=e,{debugMode:D}=(0,s.useDebug)(),M=null!=(m=(0,o.getProperty)(x,"fileName"))?m:"",R=null!=(p=(0,o.getFloat)(x,"volume"))?p:1,v=null!=(d=(0,o.getFloat)(x,"minDistance"))?d:1,A=null!=(h=(0,o.getFloat)(x,"maxDistance"))?h:1,F=null!=(g=(0,o.getFloat)(x,"minLoopGap"))?g:0,P=null!=(y=(0,o.getFloat)(x,"maxLoopGap"))?y:0,b=null!=(T=(0,o.getInt)(x,"is3D"))?T:0,[j,w,B]=(0,o.getPosition)(x),{scene:E,camera:L}=(0,n.useThree)(),{audioLoader:G,audioListener:U}=(0,l.useAudio)(),{audioEnabled:V}=(0,s.useSettings)(),C=(0,r.useRef)(null),K=(0,r.useRef)(null),O=(0,r.useRef)(null),S=(0,r.useRef)(!1),I=(0,r.useRef)(!1),N=(0,r.useRef)(new i.Vector3(j,w,B));(0,r.useEffect)(()=>{if(!G||!U)return;let e=new i.PositionalAudio(U);return e.position.copy(N.current),b?(e.setDistanceModel("exponential"),e.setRefDistance(v/20),e.setMaxDistance(A/25),e.setVolume(R)):(e.setDistanceModel("linear"),e.setRefDistance(1),e.setMaxDistance(2e6),e.setVolume(R/15)),C.current=e,E.add(e),()=>{K.current&&clearTimeout(K.current),O.current&&clearTimeout(O.current);try{e.stop()}catch(e){}e.disconnect(),E.remove(e),S.current=!1,I.current=!1}},[G,U,b,v,A,R,E]);let k=e=>{if(F>0||P>0){let t=Math.max(0,F),r=Math.max(t,P),n=t===r?t:Math.random()*(r-t)+t;e.loop=!1;let u=()=>{!1===e.isPlaying?K.current=setTimeout(()=>{try{e.play(),k(e)}catch(e){}},n):O.current=setTimeout(u,100)};O.current=setTimeout(u,100)}else e.setLoop(!0)};return(0,u.useFrame)(()=>{let e=C.current;if(!e||!V||!M)return;let t=L.position,r=N.current,n=t.distanceTo(r),u=I.current,i=n<=A;if(i&&!u)if(I.current=!0,S.current)try{e.isPlaying||(e.play(),k(e))}catch(e){}else{var o,l;o=(0,c.audioToUrl)(M),l=t=>{if(!e.buffer){e.setBuffer(t),S.current=!0;try{e.play(),k(e)}catch(e){}}},f.has(o)?l(f.get(o)):G.load(o,e=>{f.set(o,e),l(e)},void 0,e=>{console.error("AudioEmitter: Audio load error",o,e)})}else if(!i&&u){I.current=!1,K.current&&clearTimeout(K.current),O.current&&clearTimeout(O.current);try{e.stop()}catch(e){}}}),(0,r.useEffect)(()=>{let e=C.current;if(e&&!V){K.current&&clearTimeout(K.current),O.current&&clearTimeout(O.current);try{e.stop()}catch(e){}}},[V]),D?(0,t.jsxs)("mesh",{position:N.current,children:[(0,t.jsx)("sphereGeometry",{args:[v,12,12]}),(0,t.jsx)("meshBasicMaterial",{color:"#00ff00",wireframe:!0,opacity:.05,transparent:!0,toneMapped:!1}),(0,t.jsx)(a.FloatingLabel,{color:"#00ff00",position:[0,v+1,0],children:M})]}):null})}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,5 @@
__turbopack_load_page_chunks__("/_app", [
"static/chunks/2bf314589ff0369d.js",
"static/chunks/eeae3955e9bce305.js",
"static/chunks/turbopack-efa004314db22ffa.js"
])

View file

@ -0,0 +1,5 @@
__turbopack_load_page_chunks__("/_error", [
"static/chunks/96d2f97fb06cefa1.js",
"static/chunks/eeae3955e9bce305.js",
"static/chunks/turbopack-56b054d167285af2.js"
])

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[492],{4585:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"styles",{enumerable:!0,get:function(){return l}});let l={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6969:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return l(9520)}])},8886:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTTPAccessErrorFallback",{enumerable:!0,get:function(){return o}});let r=l(5155),n=l(4585);function o(e){let{status:t,message:l}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:t+": "+l}),(0,r.jsx)("div",{style:n.styles.error,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,r.jsx)("h1",{className:"next-error-h1",style:n.styles.h1,children:t}),(0,r.jsx)("div",{style:n.styles.desc,children:(0,r.jsx)("h2",{style:n.styles.h2,children:l})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9520:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=l(5155),n=l(8886),o=function(){return(0,r.jsx)("html",{children:(0,r.jsx)("body",{children:(0,r.jsx)(n.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})})})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[441,255,358],()=>e(e.s=6969)),_N_E=e.O()}]);

View file

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{1617:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,7401,23))},7401:()=>{}},e=>{e.O(0,[894,441,255,358],()=>e(e.s=1617)),_N_E=e.O()}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,79466,(e,t,o)=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),Object.defineProperty(o,"default",{enumerable:!0,get:function(){return d}});let r=e.r(41705),l=e.r(91398),u=r._(e.r(91788)),n=e.r(89129);async function a(e){let{Component:t,ctx:o}=e;return{pageProps:await (0,n.loadGetInitialProps)(t,o)}}class d extends u.default.Component{render(){let{Component:e,pageProps:t}=this.props;return(0,l.jsx)(e,{...t})}}d.origGetInitialProps=a,d.getInitialProps=a,("function"==typeof o.default||"object"==typeof o.default&&null!==o.default)&&void 0===o.default.__esModule&&(Object.defineProperty(o.default,"__esModule",{value:!0}),Object.assign(o.default,o),t.exports=o.default)}]);

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
html{box-sizing:border-box;background:#000;margin:0;padding:0}*,:before,:after{box-sizing:inherit}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Oxygen,Open Sans,sans-serif;font-size:100%}body{margin:0;padding:0}main{width:100vw;height:100vh}#canvasContainer{z-index:0;position:absolute;top:0;bottom:0;left:0;right:0}#controls{color:#fff;z-index:1;background:rgba(0,0,0,.5);border-radius:0 0 4px;align-items:center;gap:20px;padding:8px 12px 8px 8px;font-size:13px;display:flex;position:fixed;top:0;left:0}.CheckboxField,.Field{align-items:center;gap:6px;display:flex}#fovInput,#speedInput{max-width:80px}.StaticShapeLabel{color:#fff;white-space:nowrap;background:rgba(0,0,0,.5);border-radius:1px;padding:1px 3px;font-size:11px}.StatsPanel{right:0;left:auto!important}.AxisLabel{pointer-events:none;font-size:12px}.AxisLabel[data-axis=x]{color:#f90}.AxisLabel[data-axis=y]{color:#9f0}.AxisLabel[data-axis=z]{color:#09f}.MissionSelect-inputWrapper{align-items:center;display:flex;position:relative}.MissionSelect-shortcut{color:rgba(255,255,255,.6);pointer-events:none;background:rgba(255,255,255,.15);border-radius:3px;padding:1px 4px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:11px;position:absolute;right:7px}.MissionSelect-input[aria-expanded=true]~.MissionSelect-shortcut{display:none}.MissionSelect-input{color:#fff;background:rgba(0,0,0,.6);border:1px solid rgba(255,255,255,.3);border-radius:3px;outline:none;width:240px;padding:6px 36px 6px 8px;font-size:14px}.MissionSelect-input[aria-expanded=true]{padding-right:8px}.MissionSelect-input:focus{border-color:rgba(255,255,255,.6)}.MissionSelect-input::placeholder{color:#fff;font-weight:600}.MissionSelect-popover{z-index:100;min-width:320px;max-height:var(--popover-available-height,90vh);overscroll-behavior:contain;background:rgba(20,20,20,.95);border:1px solid rgba(255,255,255,.5);border-radius:3px;overflow-y:auto;box-shadow:0 8px 24px rgba(0,0,0,.6)}.MissionSelect-list{padding:4px 0}.MissionSelect-list:has(>.MissionSelect-group:first-child){padding-top:0}.MissionSelect-group{padding-bottom:4px}.MissionSelect-groupLabel{color:#c6caca;z-index:1;background:rgba(58,69,72,.95);border-bottom:1px solid rgba(255,255,255,.3);padding:6px 8px 6px 12px;font-size:13px;font-weight:600;position:-webkit-sticky;position:sticky;top:0}.MissionSelect-group:not(:last-child){border-bottom:1px solid rgba(255,255,255,.3)}.MissionSelect-item{cursor:pointer;border-radius:4px;outline:none;flex-direction:column;gap:1px;margin:4px 4px 0;padding:6px 8px;scroll-margin-top:32px;display:flex}.MissionSelect-list>.MissionSelect-item:first-child{margin-top:0}.MissionSelect-item[data-active-item]{background:rgba(255,255,255,.15)}.MissionSelect-item[aria-selected=true]{background:rgba(100,150,255,.3)}.MissionSelect-itemHeader{align-items:center;gap:6px;display:flex}.MissionSelect-itemName{color:#fff;font-size:14px;font-weight:600}.MissionSelect-itemTypes{gap:3px;display:flex}.MissionSelect-itemType{color:#fff;background:rgba(255,157,0,.4);border-radius:3px;padding:2px 5px;font-size:10px;font-weight:600}.MissionSelect-itemMissionName{color:rgba(255,255,255,.5);font-size:12px}.MissionSelect-noResults{color:rgba(255,255,255,.5);text-align:center;padding:12px 8px;font-size:13px}.LoadingSpinner{pointer-events:none;z-index:1;border:4px solid rgba(255,255,255,.2);border-top-color:#fff;border-radius:50%;width:48px;height:48px;animation:1s linear infinite LoadingSpinner-spin;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@keyframes LoadingSpinner-spin{to{transform:translate(-50%,-50%)rotate(360deg)}}

View file

@ -0,0 +1 @@
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42585,t=>{"use strict";t.s(["WaterBlock",()=>u,"WaterMaterial",()=>o]);var e=t.i(43476),a=t.i(71645),r=t.i(47071),i=t.i(90072),s=t.i(12979),l=t.i(62395),n=t.i(75567);function o(t){let{surfaceTexture:a,attach:l}=t,o=(0,s.textureToUrl)(a),u=(0,r.useTexture)(o,t=>(0,n.setupColor)(t));return(0,e.jsx)("meshStandardMaterial",{attach:l,map:u,transparent:!0,opacity:.8,side:i.DoubleSide})}let u=(0,a.memo)(function(t){var r;let{object:s}=t,n=(0,a.useMemo)(()=>(0,l.getPosition)(s),[s]),u=(0,a.useMemo)(()=>(0,l.getRotation)(s),[s]),[c,d,m]=(0,a.useMemo)(()=>(0,l.getScale)(s),[s]),p=null!=(r=(0,l.getProperty)(s,"surfaceTexture"))?r:"liquidTiles/BlueWater",h=(0,a.useMemo)(()=>{let t=new i.BoxGeometry(c,d,m);t.translate(c/2,d/2,m/2);let e=t.getAttribute("uv"),a=e.array,r=[[c/32,d/32],[c/32,d/32],[m/32,c/32],[m/32,c/32],[m/32,d/32],[m/32,d/32]];for(let t=0;t<6;t++){let[e,i]=r[t],s=4*t*2;for(let t=0;t<4;t++)a[s+2*t]*=e,a[s+2*t+1]*=i}return e.needsUpdate=!0,t},[c,d,m]);return(0,a.useEffect)(()=>()=>{h.dispose()},[h]),(0,e.jsxs)("mesh",{position:n,quaternion:u,geometry:h,children:[(0,e.jsx)("meshStandardMaterial",{attach:"material-0",transparent:!0,opacity:0}),(0,e.jsx)("meshStandardMaterial",{attach:"material-1",transparent:!0,opacity:0}),(0,e.jsx)(a.Suspense,{fallback:(0,e.jsx)("meshStandardMaterial",{attach:"material-2",color:"blue",transparent:!0,opacity:.3,side:i.DoubleSide}),children:(0,e.jsx)(o,{attach:"material-2",surfaceTexture:p})}),(0,e.jsx)("meshStandardMaterial",{attach:"material-3",transparent:!0,opacity:0}),(0,e.jsx)("meshStandardMaterial",{attach:"material-4",transparent:!0,opacity:0}),(0,e.jsx)("meshStandardMaterial",{attach:"material-5",transparent:!0,opacity:0})]})})}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[358],{1382:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,7150,23)),Promise.resolve().then(n.t.bind(n,1959,23)),Promise.resolve().then(n.t.bind(n,7989,23)),Promise.resolve().then(n.t.bind(n,3886,23)),Promise.resolve().then(n.t.bind(n,9766,23)),Promise.resolve().then(n.t.bind(n,5278,23)),Promise.resolve().then(n.t.bind(n,8924,23)),Promise.resolve().then(n.t.bind(n,4431,23)),Promise.resolve().then(n.bind(n,622))},9393:()=>{}},e=>{var s=s=>e(e.s=s);e.O(0,[441,255],()=>(s(1666),s(1382))),_N_E=e.O()}]);

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[636],{326:(_,n,p)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return p(5139)}])}},_=>{var n=n=>_(_.s=n);_.O(0,[593,792],()=>(n(326),n(6763))),_N_E=_.O()}]);

View file

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[731],{2164:(_,n,e)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){return e(1646)}])}},_=>{_.O(0,[636,593,792],()=>_(_.s=2164)),_N_E=_.O()}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
(()=>{"use strict";var e={},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={id:o,loaded:!1,exports:{}},i=!0;try{e[o].call(a.exports,a,a.exports,r),i=!1}finally{i&&delete t[o]}return a.loaded=!0,a.exports}r.m=e,(()=>{var e=[];r.O=(t,o,n,a)=>{if(o){a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[o,n,a];return}for(var l=1/0,i=0;i<e.length;i++){for(var[o,n,a]=e[i],u=!0,d=0;d<o.length;d++)(!1&a||l>=a)&&Object.keys(r.O).every(e=>r.O[e](o[d]))?o.splice(d--,1):(u=!1,a<l&&(l=a));if(u){e.splice(i--,1);var c=n();void 0!==c&&(t=c)}}return t}})(),r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(o,n){if(1&n&&(o=this(o)),8&n||"object"==typeof o&&o&&(4&n&&o.__esModule||16&n&&"function"==typeof o.then))return o;var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var l=2&n&&o;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach(e=>i[e]=()=>o[e]);return i.default=()=>o,r.d(a,i),a}})(),r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,o)=>(r.f[o](e,t),t),[])),r.u=e=>{},r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="_N_E:";r.l=(o,n,a,i)=>{if(e[o])return void e[o].push(n);if(void 0!==a)for(var l,u,d=document.getElementsByTagName("script"),c=0;c<d.length;c++){var s=d[c];if(s.getAttribute("src")==o||s.getAttribute("data-webpack")==t+a){l=s;break}}l||(u=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,r.nc&&l.setAttribute("nonce",r.nc),l.setAttribute("data-webpack",t+a),l.src=r.tu(o)),e[o]=[n];var f=(t,r)=>{l.onerror=l.onload=null,clearTimeout(p);var n=e[o];if(delete e[o],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach(e=>e(r)),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=f.bind(null,l.onerror),l.onload=f.bind(null,l.onload),u&&document.head.appendChild(l)}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("nextjs#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="/t2-mapper/_next/",(()=>{var e={68:0,894:0};r.f.j=(t,o)=>{var n=r.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else if(/^(68|894)$/.test(t))e[t]=0;else{var a=new Promise((r,o)=>n=e[t]=[r,o]);o.push(n[2]=a);var i=r.p+r.u(t),l=Error();r.l(i,o=>{if(r.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",l.name="ChunkLoadError",l.type=a,l.request=i,n[1](l)}},"chunk-"+t,t)}},r.O.j=t=>0===e[t];var t=(t,o)=>{var n,a,[i,l,u]=o,d=0;if(i.some(t=>0!==e[t])){for(n in l)r.o(l,n)&&(r.m[n]=l[n]);if(u)var c=u(r)}for(t&&t(o);d<i.length;d++)a=i[d],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(c)},o=self.webpackChunk_N_E=self.webpackChunk_N_E||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})()})();

View file

@ -1 +0,0 @@
html{box-sizing:border-box;margin:0;padding:0;background:black}*,:after,:before{box-sizing:inherit}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-size:100%}body{margin:0;padding:0}main{width:100vw;height:100vh}#canvasContainer{position:absolute;top:0;left:0;right:0;bottom:0;z-index:0}#controls{display:flex;align-items:center;gap:20px;position:fixed;top:0;left:0;background:rgba(0,0,0,.5);color:#fff;padding:8px 12px 8px 8px;border-radius:0 0 4px 0;font-size:13px;z-index:1}.CheckboxField,.Field{display:flex;align-items:center;gap:6px}#fovInput,#speedInput{max-width:80px}.StaticShapeLabel{background:rgba(0,0,0,.5);color:#fff;font-size:11px;white-space:nowrap;padding:1px 3px;border-radius:1px}.StatsPanel{left:auto!important;right:0}.AxisLabel{font-size:12px;pointer-events:none}.AxisLabel[data-axis=x]{color:rgb(255,153,0)}.AxisLabel[data-axis=y]{color:rgb(153,255,0)}.AxisLabel[data-axis=z]{color:rgb(0,153,255)}.MissionSelect-inputWrapper{position:relative;display:flex;align-items:center}.MissionSelect-shortcut{position:absolute;right:7px;font-family:system-ui,sans-serif;font-size:11px;padding:1px 4px;border-radius:3px;background:rgba(255,255,255,.15);color:rgba(255,255,255,.6);pointer-events:none}.MissionSelect-input[aria-expanded=true]~.MissionSelect-shortcut{display:none}.MissionSelect-input{width:240px;padding:6px 36px 6px 8px;font-size:14px;border:1px solid rgba(255,255,255,.3);border-radius:3px;background:rgba(0,0,0,.6);color:#fff;outline:none}.MissionSelect-input[aria-expanded=true]{padding-right:8px}.MissionSelect-input:focus{border-color:rgba(255,255,255,.6)}.MissionSelect-input::placeholder{color:#fff;font-weight:600}.MissionSelect-popover{z-index:100;min-width:320px;max-height:var(--popover-available-height,90vh);overflow-y:auto;overscroll-behavior:contain;background:rgba(20,20,20,.95);border:1px solid rgba(255,255,255,.5);border-radius:3px;box-shadow:0 8px 24px rgba(0,0,0,.6)}.MissionSelect-list{padding:4px 0}.MissionSelect-list:has(>.MissionSelect-group:first-child){padding-top:0}.MissionSelect-group{padding-bottom:4px}.MissionSelect-groupLabel{position:-webkit-sticky;position:sticky;top:0;padding:6px 8px 6px 12px;font-size:13px;font-weight:600;color:rgb(198,202,202);background:rgba(58,69,72,.95);z-index:1}.MissionSelect-group:not(:last-child),.MissionSelect-groupLabel{border-bottom:1px solid rgba(255,255,255,.3)}.MissionSelect-item{display:flex;flex-direction:column;gap:1px;margin:4px 4px 0;padding:6px 8px;border-radius:4px;cursor:pointer;outline:none;scroll-margin-top:32px}.MissionSelect-list>.MissionSelect-item:first-child{margin-top:0}.MissionSelect-item[data-active-item]{background:rgba(255,255,255,.15)}.MissionSelect-item[aria-selected=true]{background:rgba(100,150,255,.3)}.MissionSelect-itemHeader{display:flex;align-items:center;gap:6px}.MissionSelect-itemName{font-size:14px;font-weight:600;color:#fff}.MissionSelect-itemTypes{display:flex;gap:3px}.MissionSelect-itemType{font-size:10px;font-weight:600;padding:2px 5px;border-radius:3px;background:rgba(255,157,0,.4);color:#fff}.MissionSelect-itemMissionName{font-size:12px;color:rgba(255,255,255,.5)}.MissionSelect-noResults{padding:12px 8px;font-size:13px;color:rgba(255,255,255,.5);text-align:center}.LoadingSpinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:48px;height:48px;border:4px solid rgba(255,255,255,.2);border-top-color:white;border-radius:50%;animation:LoadingSpinner-spin 1s linear infinite;pointer-events:none;z-index:1}@keyframes LoadingSpinner-spin{to{transform:translate(-50%,-50%) rotate(1turn)}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

File diff suppressed because one or more lines are too long

View file

@ -1,20 +1,20 @@
1:"$Sreact.fragment"
2:I[9766,[],""]
3:I[8924,[],""]
4:I[1959,[],"ClientPageRoot"]
5:I[6198,["367","static/chunks/b536a0f1-05ee2c75df4a3b9d.js","831","static/chunks/bd904a5c-3aea2adebde6f067.js","664","static/chunks/a3cd4a83-5c5b758da206345b.js","794","static/chunks/f6211eb1-4f3105d2434536dc.js","413","static/chunks/1329d575-16915d95397758f8.js","331","static/chunks/331-37e8e553d8a20c21.js","974","static/chunks/app/page-c981258a5ce03b60.js"],"default"]
8:I[4431,[],"OutletBoundary"]
a:I[5278,[],"AsyncMetadataOutlet"]
c:I[4431,[],"ViewportBoundary"]
e:I[4431,[],"MetadataBoundary"]
2:I[39756,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"default"]
3:I[37457,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"default"]
4:I[47257,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"ClientPageRoot"]
5:I[31713,["/t2-mapper/_next/static/chunks/f620a0b974993323.js","/t2-mapper/_next/static/chunks/860a32ced1b1d3e2.js","/t2-mapper/_next/static/chunks/f86ccd4277098102.js","/t2-mapper/_next/static/chunks/10facee5f2c3e9c9.js"],"default"]
8:I[97367,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"OutletBoundary"]
a:I[11533,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"AsyncMetadataOutlet"]
c:I[97367,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"ViewportBoundary"]
e:I[97367,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"MetadataBoundary"]
f:"$Sreact.suspense"
11:I[7150,[],""]
:HL["/t2-mapper/_next/static/css/e7a9161e212d890f.css","style"]
0:{"P":null,"b":"-8rKi6QC1_m79kd_l3-c5","p":"/t2-mapper","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/css/e7a9161e212d890f.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","searchParams":{},"params":{},"promises":["$@6","$@7"]}],null,["$","$L8",null,{"children":["$L9",["$","$La",null,{"promise":"$@b"}]]}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Lc",null,{"children":"$Ld"}],null],["$","$Le",null,{"children":["$","div",null,{"hidden":true,"children":["$","$f",null,{"fallback":null,"children":"$L10"}]}]}]]}],false]],"m":"$undefined","G":["$11",[]],"s":false,"S":true}
11:I[68027,[],"default"]
:HL["/t2-mapper/_next/static/chunks/be0d253f8c18ec3b.css","style"]
0:{"P":null,"b":"-iT0I0S3ExlNrEWUQTmsE","p":"/t2-mapper","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/be0d253f8c18ec3b.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","searchParams":{},"params":{},"promises":["$@6","$@7"]}],[["$","script","script-0",{"src":"/t2-mapper/_next/static/chunks/f620a0b974993323.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/t2-mapper/_next/static/chunks/860a32ced1b1d3e2.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/t2-mapper/_next/static/chunks/f86ccd4277098102.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/t2-mapper/_next/static/chunks/10facee5f2c3e9c9.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$L9",["$","$La",null,{"promise":"$@b"}]]}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Lc",null,{"children":"$Ld"}],null],["$","$Le",null,{"children":["$","div",null,{"hidden":true,"children":["$","$f",null,{"fallback":null,"children":"$L10"}]}]}]]}],false]],"m":"$undefined","G":["$11",[["$","link","0",{"rel":"stylesheet","href":"/t2-mapper/_next/static/chunks/be0d253f8c18ec3b.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"s":false,"S":true}
6:{}
7:"$0:f:0:1:2:children:1:props:children:0:props:params"
d:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
9:null
12:I[622,[],"IconMark"]
b:{"metadata":[["$","title","0",{"children":"MapGenius  Explore maps for Tribes 2"}],["$","meta","1",{"name":"description","content":"Tribes 2 forever."}],["$","link","2",{"rel":"icon","href":"/t2-mapper/icon.png?2e9a076561022841","type":"image/png","sizes":"108x128"}],["$","$L12","3",{}]],"error":null,"digest":"$undefined"}
12:I[27201,["/t2-mapper/_next/static/chunks/060f9a97930f3d04.js"],"IconMark"]
b:{"metadata":[["$","title","0",{"children":"MapGenius  Explore maps for Tribes 2"}],["$","meta","1",{"name":"description","content":"Tribes 2 forever."}],["$","link","2",{"rel":"icon","href":"/t2-mapper/icon.png?icon.2911bba1.png","sizes":"108x128","type":"image/png"}],["$","$L12","3",{}]],"error":null,"digest":"$undefined"}
10:"$b:metadata"

View file

@ -9,7 +9,7 @@
"scripts": {
"build:manifest": "tsx scripts/generate-manifest.ts -o public/manifest.json",
"build:parser": "peggy TorqueScript.pegjs -o generated/TorqueScript.cjs",
"build": "next build && touch docs/.nojekyll",
"build": "next build --turbopack && touch docs/.nojekyll",
"clean": "rimraf .next",
"deploy": "npm run build && git add -f docs && git commit -m \"Deploy\" && git push",
"format": "prettier --write .",

View file

@ -8,9 +8,32 @@ import {
useState,
} from "react";
const SettingsContext = createContext(null);
const DebugContext = createContext(null);
const ControlsContext = createContext(null);
type StateSetter<T> = ReturnType<typeof useState<T>>[1];
type SettingsContext = {
fogEnabled: boolean;
setFogEnabled: StateSetter<boolean>;
fov: number;
setFov: StateSetter<number>;
audioEnabled: boolean;
setAudioEnabled: StateSetter<boolean>;
animationEnabled: boolean;
setAnimationEnabled: StateSetter<boolean>;
};
type DebugContext = {
debugMode: boolean;
setDebugMode: StateSetter<boolean>;
};
type ControlsContext = {
speedMultiplier: number;
setSpeedMultiplier: StateSetter<number>;
};
const SettingsContext = createContext<SettingsContext | null>(null);
const DebugContext = createContext<DebugContext | null>(null);
const ControlsContext = createContext<ControlsContext | null>(null);
type PersistedSettings = {
fogEnabled?: boolean;
@ -41,7 +64,7 @@ export function SettingsProvider({ children }: { children: ReactNode }) {
const [animationEnabled, setAnimationEnabled] = useState(true);
const [debugMode, setDebugMode] = useState(false);
const settingsContext = useMemo(
const settingsContext: SettingsContext = useMemo(
() => ({
fogEnabled,
setFogEnabled,
@ -55,12 +78,12 @@ export function SettingsProvider({ children }: { children: ReactNode }) {
[fogEnabled, speedMultiplier, fov, audioEnabled, animationEnabled],
);
const debugContext = useMemo(
const debugContext: DebugContext = useMemo(
() => ({ debugMode, setDebugMode }),
[debugMode, setDebugMode],
);
const controlsContext = useMemo(
const controlsContext: ControlsContext = useMemo(
() => ({ speedMultiplier, setSpeedMultiplier }),
[speedMultiplier, setSpeedMultiplier],
);

View file

@ -1,6 +1,6 @@
import { lazy } from "react";
import type { TorqueObject } from "../torqueScript";
import { TerrainBlock } from "./TerrainBlock";
import { WaterBlock } from "./WaterBlock";
import { SimGroup } from "./SimGroup";
import { InteriorInstance } from "./InteriorInstance";
import { Sky } from "./Sky";
@ -9,13 +9,31 @@ import { TSStatic } from "./TSStatic";
import { StaticShape } from "./StaticShape";
import { Item } from "./Item";
import { Turret } from "./Turret";
import { AudioEmitter } from "./AudioEmitter";
import { WayPoint } from "./WayPoint";
import { Camera } from "./Camera";
import { ForceFieldBare } from "./ForceFieldBare";
import { useSettings } from "./SettingsProvider";
const AudioEmitter = lazy(() =>
import("./AudioEmitter").then((mod) => ({ default: mod.AudioEmitter })),
);
function ConditionalAudioEmitter(props) {
const { audioEnabled } = useSettings();
return audioEnabled ? <AudioEmitter {...props} /> : null;
}
// Not every map will have force fields.
const ForceFieldBare = lazy(() =>
import("./ForceFieldBare").then((mod) => ({ default: mod.ForceFieldBare })),
);
// Not every map will have force fields.
const WaterBlock = lazy(() =>
import("./WaterBlock").then((mod) => ({ default: mod.WaterBlock })),
);
const componentMap = {
AudioEmitter,
AudioEmitter: ConditionalAudioEmitter,
Camera,
ForceFieldBare,
InteriorInstance,