PageSourceSearch

https://aptgame.manus.space/assets/dumpTools.pure-CrtFS79I.js

js aptgame.manus.space collected 2026-10-03 05:00:16 UTC 3,512 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-3ayQzZbU.js","assets/index-A2CInhq7.css","assets/pass.fragment-Db3IjWfv.js"])))=>i.map(i=>d[i]);
2import{b as d,j as S,k as C,C as x,a as _,E as O,l as g,_ as v,m as P,n as R,o as B}from"./index-3ayQzZbU.js";let l=null;async function L(){const e=g.LastCreatedEngine?.createCanvas(100,100)??new OffscreenCanvas(100,100);e instanceof OffscreenCanvas&&_.Warn("DumpData: OffscreenCanvas will be used for dumping data. This may result in lossy alpha values.");const{ThinEngine:i}=await v(async()=>{const{ThinEngine:s}=await import("./index-3ayQzZbU.js").then(o=>o.t);return{ThinEngine:s}},__vite__mapDeps([0,1]));if(!i.IsSupported)throw new Error("DumpData: No WebGL context available. Cannot dump data.");const a={preserveDrawingBuffer:!0,depth:!1,stencil:!1,alpha:!0,premultipliedAlpha:!1,antialias:!1,failIfMajorPerformanceCaveat:!1},n=new i(e,!1,a);g.Instances.pop(),g.OnEnginesDisposedObservable.add(s=>{n&&s!==n&&!n.isDisposed&&g.Instances.length===0&&A()}),n.getCaps().parallelShaderCompile=void 0;const t=new P(n),{passPixelShader:r}=await v(async()=>{const{passPixelShader:s}=await import("./pass.fragment-Db3IjWfv.js");return{passPixelShader:s}},__vite__mapDeps([2,0,1])),f=new R({engine:n,name:r.name,fragmentShader:r.shader,samplerNames:["textureSampler"]});return{canvas:e,dumpEngine:{engine:n,renderer:t,wrapper:f}}}async function W(){return l||(l=L()),await l}let b=(()=>{var e;let i=[],a;return e=class{static async EncodeImageAsync(t,r,f,s,o,u){const p=await W(),c=p.dumpEngine;c.engine.setSize(r,f,!0);const m=c.engine.createRawTexture(t,r,f,5,!1,!o,1);return c.renderer.setViewport(),c.renderer.applyEffectWrapper(c.wrapper),c.wrapper.effect._bindTexture("textureSampler",m),c.renderer.draw(),m.dispose(),await new Promise((I,T)=>{d.ToBlob(p.canvas,w=>{w?I(w):T(new Error("EncodeImageAsync: Failed to convert canvas to blob."))},s,u)})}},(()=>{const n=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;a=[B],S(e,null,a,{kind:"method",name:"EncodeImageAsync",static:!0,private:!1,access:{has:t=>"EncodeImageAsync"in t,get:t=>t.EncodeImageAsync},metadata:n},null,i),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n}),C(e,i)})(),e})();const V=b.EncodeImageAsync;async function h(e,i,a,n,t="image/png",r,f){const s=await a.readPixels(0,0,e,i),o=new Uint8Array(s.buffer);y(e,i,o,n,t,r,!0,void 0,f)}async function E(e,i,a,n="image/png",t,r=!1,f=!1,s){if(a instanceof Float32Array){const p=new Uint8Array(a.length);let c=a.length;for(;c--;){const m=a[c];p[c]=Math.round(x(m)*255)}a=p}const o=await b.EncodeImageAsync(a,e,i,n,r,s);t!==void 0&&d.DownloadBlob(o,t),o.type!==n&&_.Warn(`DumpData: The requested mimeType '${n}' is not supported. The result has mimeType '${o.type}' instead.`);const u=await o.arrayBuffer();return f?u:`data:${n};base64,${O(u)}`}function y(e,i,a,n,t="image/png",r,f=!1,s=!1,o){r===void 0&&!n&&(r=""),E(e,i,a,t,r,f,s,o).then(u=>{n&&n(u)})}function A(){l&&(l?.then(e=>{e.canvas instanceof HTMLCanvasElement&&e.canvas.remove(),e.dumpEngine&&(e.dumpEngine.engine.dispose(),e.dumpEngine.renderer.dispose(),e.dumpEngine.wrapper.dispose())}),l=null)}const $={DumpData:y,DumpDataAsync:E,DumpFramebuffer:h,Dispose:A};let D=!1;function z(){if(D)return;D=!0,(()=>{d.DumpData=y,d.DumpDataAsync=E,d.DumpFramebuffer=h})()}export{A as Dispose,y as DumpData,E as DumpDataAsync,h as DumpFramebuffer,$ as DumpTools,V as EncodeImageAsync,z as RegisterDumpTools};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.