INNER CODE UNIT · JavaScript

loadSceneFromManifestIndex

electronicarts/pbmpm · src/main.js:522

async function loadSceneFromManifestIndex(manifestIndex)
{
    document.cookie = `pbmpm-scene=${manifestIndex}`;

    const url = g_manifest[manifestIndex].scene;
    const res = await fetch(url);
    loadScene(await res.json());
}

async function loadScenes()
{
    g_manifest = await (await fetch('./scenes/manifest.json')).json();

    let sceneIndex = 0;
    const cookieValue = document.cookie
        .split("; ")
        .find((row) => row.startsWith("pbmpm-scene="))
        ?.split("=")[1];

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…