gpt-4o-2024-08-06· OpenAI
WildChat-4.8M (AI2)
привет короче хочу чтобы тут блок рекламы был на весь экран как экран игры юнити…
- User
привет короче хочу чтобы тут блок рекламы был на весь экран как экран игры юнити
code#unity-canvas { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: calc(1080 / 1920 * 100vh); height: 100vh; background: #231F20; } </style> <!-- Yandex.RTB --> <script>window.yaContextCb=window.yaContextCb||[]</script> <script src="https://yandex.ru/ads/system/context.js" async></script>codevar canvas = document.querySelector("#unity-canvas"); canvas.style.width = "100%"; canvas.style.height = "100%"; canvas.style.position = "fixed"; document.body.style.textAlign = "left"; } createUnityInstance(document.querySelector("#unity-canvas"), { dataUrl: "Build/BuildWebGLNew.data", frameworkUrl: "Build/BuildWebGLNew.framework.js", codeUrl: "Build/BuildWebGLNew.wasm", streamingAssetsUrl: "StreamingAssets", companyName: "DefaultCompany", productName: "CannonWEBGLGame", productVersion: "0.1", // matchWebGLToCanvasSize: false, // Uncomment this to separately control WebGL canvas render size and DOM element size. // devicePixelRatio: 1, // Uncomment this to override low DPI rendering on high DPI displays. }); </script> <!-- Yandex.RTB R-A-12398846-1 --> <script> window.yaContextCb.push(() => { Ya.Context.AdvManager.render({ "blockId": "R-A-12398846-1", "renderTo": "yandex_rtb_R-A-12398846-1" }) }) </script> <script> function openAd() { document.getElementById('ad-modal').style.display = 'block'; } function closeAd() { document.getElementById('ad-modal').style.display = 'none'; } // Открытие окна по команде из Unity (при вызове OpenAdWindow в Unity) function OpenAdWindow() { openAd(); } </script> - Assistant