js_wasm_injections / main.ab8199311525ec1a2beb.js
Hariganesh Srinivasan
fit canvas inside div
9020c66 unverified
raw
history blame
7.79 kB
!function(u){function e(e){for(var t,n,r=e[0],o=e[1],_=0,i=[];_<r.length;_++)n=r[_],Object.prototype.hasOwnProperty.call(a,n)&&a[n]&&i.push(a[n][0]),a[n]=0;for(t in o)Object.prototype.hasOwnProperty.call(o,t)&&(u[t]=o[t]);for(d&&d(e);i.length;)i.shift()()}var c={},a={0:0},f={},b={4:function(){return{"./rust_3d_demo_bg.js":{__wbindgen_boolean_get:function(e){return c[2].exports.X(e)},__wbindgen_object_drop_ref:function(e){return c[2].exports.eb(e)},__wbindgen_cb_drop:function(e){return c[2].exports.Y(e)},__wbg_error_569d7454c64f6dbe:function(e,t){return c[2].exports.v(e,t)},__wbg_instanceof_Window_0e6c0f1096d66c3c:function(e){return c[2].exports.I(e)},__wbg_document_99eddbbc11ec831e:function(e){return c[2].exports.r(e)},__wbg_getElementById_f83c5de20dc455d6:function(e,t,n){return c[2].exports.x(e,t,n)},__wbg_addEventListener_78d3aa7e06ee5b73:function(e,t,n,r){return c[2].exports.b(e,t,n,r)},__wbg_instanceof_WebGlRenderingContext_b0885da52b151d86:function(e){return c[2].exports.H(e)},__wbg_bufferData_282e5d315f5503eb:function(e,t,n,r){return c[2].exports.f(e,t,n,r)},__wbg_uniformMatrix4fv_caf5129a09f4f267:function(e,t,n,r,o){return c[2].exports.T(e,t,n,r,o)},__wbg_attachShader_0867104b37cae2d6:function(e,t,n){return c[2].exports.c(e,t,n)},__wbg_bindBuffer_28e62f648e99e251:function(e,t,n){return c[2].exports.d(e,t,n)},__wbg_blendFunc_08a6e279418be6da:function(e,t,n){return c[2].exports.e(e,t,n)},__wbg_clear_786a8deca6672a9d:function(e,t){return c[2].exports.k(e,t)},__wbg_clearColor_2c1d714dee770474:function(e,t,n,r,o){return c[2].exports.i(e,t,n,r,o)},__wbg_clearDepth_a953c0db5cab80ac:function(e,t){return c[2].exports.j(e,t)},__wbg_compileShader_1b371763cfd802f7:function(e,t){return c[2].exports.n(e,t)},__wbg_createBuffer_48c0376fc0746386:function(e){return c[2].exports.o(e)},__wbg_createProgram_c2675d2cc83435a6:function(e){return c[2].exports.p(e)},__wbg_createShader_8d2a55e7777bbea7:function(e,t){return c[2].exports.q(e,t)},__wbg_drawElements_efa6c15e2787a58c:function(e,t,n,r,o){return c[2].exports.s(e,t,n,r,o)},__wbg_enable_981a414a11bbed87:function(e,t){return c[2].exports.u(e,t)},__wbg_enableVertexAttribArray_1d5f3ff6e7da7095:function(e,t){return c[2].exports.t(e,t)},__wbg_getProgramInfoLog_e70b0120bda14895:function(e,t,n){return c[2].exports.y(e,t,n)},__wbg_getProgramParameter_e4fe54d806806081:function(e,t,n){return c[2].exports.z(e,t,n)},__wbg_getShaderInfoLog_95d068aeccc5dbb3:function(e,t,n){return c[2].exports.A(e,t,n)},__wbg_getShaderParameter_2972af1cb850aeb7:function(e,t,n){return c[2].exports.B(e,t,n)},__wbg_getUniformLocation_776a1f58e7904d81:function(e,t,n,r){return c[2].exports.C(e,t,n,r)},__wbg_linkProgram_b98c8967f45a44fd:function(e,t){return c[2].exports.K(e,t)},__wbg_shaderSource_daca520f63ef8fca:function(e,t,n,r){return c[2].exports.P(e,t,n,r)},__wbg_uniform1f_bb331865fe6d123b:function(e,t,n){return c[2].exports.S(e,t,n)},__wbg_useProgram_022d72a653706891:function(e,t){return c[2].exports.U(e,t)},__wbg_vertexAttribPointer_a75ea424ba9fa4e8:function(e,t,n,r,o,_,i){return c[2].exports.V(e,t,n,r,o,_,i)},__wbg_clientX_83648828186ba19f:function(e){return c[2].exports.l(e)},__wbg_clientY_ba9e5549993281e3:function(e){return c[2].exports.m(e)},__wbg_instanceof_HtmlCanvasElement_b94545433bb4d2ef:function(e){return c[2].exports.F(e)},__wbg_getContext_0c19ba5c037e057f:function(e,t,n){return c[2].exports.w(e,t,n)},__wbg_newnoargs_e23b458e372830de:function(e,t){return c[2].exports.N(e,t)},__wbg_call_ae78342adc33730a:function(e,t){return c[2].exports.h(e,t)},__wbindgen_object_clone_ref:function(e){return c[2].exports.db(e)},__wbg_self_99737b4dcdf6f0d8:function(){return c[2].exports.O()},__wbg_window_9b61fbbf3564c4fb:function(){return c[2].exports.W()},__wbg_globalThis_8e275ef40caea3a3:function(){return c[2].exports.D()},__wbg_global_5de1e0f82bddcd27:function(){return c[2].exports.E()},__wbindgen_is_undefined:function(e){return c[2].exports.bb(e)},__wbg_buffer_7af23f65f6c64548:function(e){return c[2].exports.g(e)},__wbg_new_72a8787c7d3cf0d9:function(e){return c[2].exports.M(e)},__wbg_length_9dc247caa0af6173:function(e){return c[2].exports.J(e)},__wbg_new_540a7305f70a9894:function(e){return c[2].exports.L(e)},__wbg_subarray_142d589b8491e964:function(e,t,n){return c[2].exports.Q(e,t,n)},__wbg_subarray_92a0f27076346b14:function(e,t,n){return c[2].exports.R(e,t,n)},__wbg_instanceof_Memory_7998a70b65f6c848:function(e){return c[2].exports.G(e)},__wbindgen_debug_string:function(e,t){return c[2].exports.ab(e,t)},__wbindgen_throw:function(e,t){return c[2].exports.fb(e,t)},__wbindgen_memory:function(){return c[2].exports.cb()},__wbindgen_closure_wrapper96:function(e,t,n){return c[2].exports.Z(e,t,n)}}}}};function s(e){if(c[e])return c[e].exports;var t=c[e]={i:e,l:!1,exports:{}};return u[e].call(t.exports,t,t.exports,s),t.l=!0,t.exports}s.e=function(r){var e,o,_,t,i,u=[],n=a[r];return 0!==n&&(n?u.push(n[2]):(e=new Promise(function(e,t){n=a[r]=[e,t]}),u.push(n[2]=e),(o=document.createElement("script")).charset="utf-8",o.timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.src="file/"+s.p+({}[r]||r)+"."+{1:"afde1accc96843a83c65",2:"a1f66627635e1beb88c0"}[r]+".js",_=new Error,t=function(e){o.onerror=o.onload=null,clearTimeout(i);var t,n=a[r];0!==n&&(n&&(t=e&&("load"===e.type?"missing":e.type),e=e&&e.target&&e.target.src,_.message="Loading chunk "+r+" failed.\n("+t+": "+e+")",_.name="ChunkLoadError",_.type=t,_.request=e,n[1](_)),a[r]=void 0)},i=setTimeout(function(){t({type:"timeout",target:o})},12e4),o.onerror=o.onload=t,document.head.appendChild(o))),({2:[4]}[r]||[]).forEach(function(t){var n,e=f[t];e?u.push(e):(n=b[t](),e=fetch("file/"+s.p+{4:"1b37e9360b78118d3254"}[t]+".module.wasm"),e=n instanceof Promise&&"function"==typeof WebAssembly.compileStreaming?Promise.all([WebAssembly.compileStreaming(e),n]).then(function(e){return WebAssembly.instantiate(e[0],e[1])}):"function"==typeof WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(e,n):e.then(function(e){return e.arrayBuffer()}).then(function(e){return WebAssembly.instantiate(e,n)}),u.push(f[t]=e.then(function(e){return s.w[t]=(e.instance||e).exports})))}),Promise.all(u)},s.m=u,s.c=c,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)s.d(n,r,function(e){return t[e]}.bind(null,r));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s.oe=function(e){throw console.error(e),e},s.w={};var t=window.webpackJsonp=window.webpackJsonp||[],n=t.push.bind(t);t.push=e,t=t.slice();for(var r=0;r<t.length;r++)e(t[r]);var d=n;s(s.s=0)}([function(e,t,n){const r=Promise.all([n.e(1),n.e(2)]).then(n.bind(null,1)),_=document.getElementById("rustCanvas"),i=_.getContext("webgl",{antialias:!0}),u=document.getElementById("1");r.then(e=>{if(i){const r=new e.DougsClient,o=Date.now();let n=-1;_.height<1e3&&(u.clientHeight===_.height&&u.clientWidth===_.width||(_.height=u.clientHeight,_.clientHeight=u.clientHeight,_.style.height=u.clientHeight,_.width=u.clientWidth,_.clientWidth=u.clientWidth,_.style.width=u.clientWidth,i.viewport(0,0,u.clientWidth,u.clientHeight))),function e(){window.requestAnimationFrame(e);var t=Date.now();t>=n+1e3/30&&(t=(n=t)-o,r.update(t,u.clientHeight,u.clientWidth),r.render())}()}else alert("Failed to initialize WebGL")})}]);