<!DOCTYPE html><html lang="en-us">
<head> <base href="https://cdn.jsdelivr.net/gh/mrgoldilocks/webportstruffle@main/yandere-simulator/"> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <title>YandereSimulator</title> <script src="Build/UnityLoader.js"></script> <style> html, body { margin: 0; padding: 0; width: 100%; height: 100%; background: #000; overflow: hidden; }
#unityContainer { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #000; }
#unityContainer canvas { width: 100% !important; height: 100% !important; display: block; }
#loading-text { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; font-size: 48px; font-family: cursive; text-align: center; } </style>
<script> let max = 0, done = 0;
function mergeFiles(fileParts) { return new Promise((resolve, reject) => { const buffers = []; const fetchPart = (index) => { if (index >= fileParts.length) { const blob = new Blob(buffers); resolve(URL.createObjectURL(blob)); return; } fetch(fileParts[index]) .then(r => r.arrayBuffer()) .then(b => { buffers.push(b); done++; document.querySelector("#loading-text").textContent = `LOADING... (${done}/${max})`; fetchPart(index + 1); }) .catch(reject); }; fetchPart(0); }); }
function getParts(file, start, end) { const parts = []; for (let i = start; i <= end; i++) parts.push(`${file}.part${i}`); max += end; return parts; }
Promise.all([ mergeFiles(getParts("Build/YandereSim.data.unityweb", 1, 5)), ]).then(([dataUrl]) => { const json = { companyName: "YandereDev", productName: "YandereSimulator", dataUrl: dataUrl, wasmCodeUrl: "YandereSim.wasm.code.unityweb", wasmFrameworkUrl: "YandereSim.wasm.framework.unityweb", TOTAL_MEMORY: 268435456, graphicsAPI: ["WebGL 2.0", "WebGL 1.0"], webglContextAttributes: { preserveDrawingBuffer: false }, splashScreenStyle: "Dark", backgroundColor: "#000000", cacheControl: { default: "must-revalidate" } };
const blob = new Blob([JSON.stringify(json)], { type: "application/json" }); const blobUrl = URL.createObjectURL(blob);
const gameInstance = UnityLoader.instantiate("unityContainer", json, { url: blobUrl, Module: { onRuntimeInitialized: () => { const loadingText = document.querySelector("#loading-text"); if (loadingText) loadingText.remove(); }, }, });
const resize = () => { const container = document.getElementById("unityContainer"); container.style.width = window.innerWidth + "px"; container.style.height = window.innerHeight + "px"; }; window.addEventListener("resize", resize); resize(); }); </script></head>
<body> <div id="loading-text" style=" color: white; font-size: 48px; font-family: 'Comic Sans MS', cursive; text-align: center; margin-top: 20px; "> LOADING... </div>LOADING...</div> <div id="unityContainer"></div></body>
</html>