/
Metallist64
/
rbfx
Обзор
Документация
Войти
/
Metallist64
/
rbfx
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
bin/application.html
85 строк
23 KB
Rokas Kupstys
CMake: Make WEB target work again.
22 ноя 2018, 21:46
22 ноя 2018, 21:46
758152a
Код
Авторство
О чём код?
<!doctype html> <html lang="en-us"> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Urho3D</title> <style type="text/css"> @keyframes spin { from {transform:rotate(0deg);} to {transform:rotate(360deg);} } #logo { width: 128px; height: 128px; animation-name: spin; animation-duration: 4000ms; animation-iteration-count: infinite; animation-timing-function: linear; margin: 0 auto 0 auto; background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAgAElEQVR4Xu19B5xcVdn3M31779lkd9N7IyGBhABBWkAEBCvC+4EKIoICwvvSRBERQeTzE1REpaNI7 … [Строка слишком длинная. Вы можете скачать файл] } </style> </head> <body> <div style="text-align: center"> <div id="logo"></div> <div> <progress value="0" max="100" id="progress"></progress> </div> <canvas id="canvas" oncontextmenu="event.preventDefault()"></canvas> <div id="controls" hidden="true"> <input type="checkbox" id="resize">Resize canvas <input type="checkbox" id="pointerLock" checked>Lock/hide mouse pointer <input type="button" value="Fullscreen" onclick="Module.requestFullscreen(document.getElementById('pointerLock').checked, document.getElementById('resize').checked)"> </div> </div> <script type='text/javascript'> var progressElement = document.getElementById('progress'); var logoElement = document.getElementById('logo'); var controlsElement = document.getElementById('controls'); var Module = { preRun: [], postRun: [], print: (function() { return function(text) { if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' '); console.log(text); }; })(), printErr: function(text) { if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' '); console.error(text); }, canvas: (function() { var canvas = document.getElementById('canvas'); // As a default initial behavior, pop up an alert when webgl context is lost. To make your // application robust, you may want to override this behavior before shipping! // See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2 canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false); return canvas; })(), setStatus: function(text) { if (text == '') { logoElement.hidden = true; progressElement.hidden = true; controlsElement.hidden = false; } }, totalDependencies: 0, monitorRunDependencies: function(left) { this.totalDependencies = Math.max(this.totalDependencies, left); progressElement.value = this.totalDependencies - left; progressElement.max = this.totalDependencies; } }; window.onerror = function() { Module.setStatus('Exception thrown, see JavaScript console'); Module.setStatus = function(text) { if (text) Module.printErr('[post-exception status] ' + text); }; }; </script> {{{ SCRIPT }}} </body> </html>