<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity WebGL Player | 苏大佬带飞</title>
<link rel="shortcut icon" href="TemplateData/favicon.ico">
<link rel="stylesheet" href="TemplateData/style.css">
</head>
<body>
<div id="unity-container" class="unity-desktop">
<canvas id="unity-canvas" width=504 height=896></canvas>
<div id="unity-loading-bar">
<div id="unity-logo"></div>
<div id="unity-progress-bar-empty">
<div id="unity-progress-bar-full"></div>
</div>
</div>
<div id="unity-warning"> </div>
<div id="unity-footer">
<div id="unity-webgl-logo"></div>
<div id="unity-fullscreen-button"></div>
<div id="unity-build-title">苏大佬带飞</div>
</div>
</div>
<script>
var container = document.querySelector("#unity-container");
var canvas = document.querySelector("#unity-canvas");
var loadingBar = document.querySelector("#unity-loading-bar");
var progressBarFull = document.querySelector("#unity-progress-bar-full");
var fullscreenButton = document.querySelector("#unity-fullscreen-button");
var warningBanner = document.querySelector("#unity-warning");
// Shows a temporary message banner/ribbon for a few seconds, or
// a permanent error message on top of the canvas if type=='error'.
// If type=='warning', a yellow highlight color is used.
// Modify or remove this function to customize the visually presented
// way that non-critical warnings and error messages are presented to the
// user.
function unityShowBanner(msg, type) {
function updateBannerVisibility() {
warningBanner.style.display = warningBanner.children.length ? 'block' : 'none';
}
var div = document.createElement('div');
div.innerHTML = msg;
warningBanner.appendChild(div);
if (type == 'error') div.style = 'background: red; padding: 10px;';
else {
if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
setTimeout(function() {
warningBanner.removeChild(div);
updateBannerVisibility();
}, 5000);
}
updateBannerVisibility();
}
var buildUrl = "Build";
var loaderUrl = buildUrl + "/2048.loader.js";
var config = {
dataUrl: buildUrl + "/2048.data.unityweb",
frameworkUrl: buildUrl + "/2048.framework.js.unityweb",
codeUrl: buildUrl + "/2048.wasm.unityweb",
streamingAssetsUrl: "StreamingAssets",
companyName: "caiths",
productName: "苏大佬带飞",
productVersion: "1.0",
showBanner: unityShowBanner,
};
// By default Unity keeps WebGL canvas render target size matched with
// the DOM size of the canvas element (scaled by window.devicePixelRatio)
// Set this to false if you want to decouple this synchronization from
// happening inside the engine, and you would instead like to size up
// the canvas DOM size and WebGL render target sizes yourself.
// config.matchWebGLToCanvasSize = false;
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
container.className = "unity-mobile";
// Avoid draining fillrate performance on mobile devices,
// and default/override low DPI mode on mobile browsers.
config.devicePixelRatio = 1;
unityShowBanner('WebGL builds are not supported on mobile devices.');
} else {
canvas.style.width = "504px";
canvas.style.height = "896px";
}
loadingBar.style.display = "block";
var script = document.createElement("script");
script.src = loaderUrl;
script.onload = () => {
createUnityInstance(canvas, config, (progress) => {
progressBarFull.style.width = 100 * progress + "%";
}).then((unityInstance) => {
loadingBar.style.display = "none";
fullscreenButton.onclick = () => {
unityInstance.SetFullscreen(1);
};
}).catch((message) => {
alert(message);
});
};
document.body.appendChild(script);
</script>
</body>
</html>
热爱技术。
- 粉丝: 2927
- 资源: 7864
最新资源
- 一:本模型为abaqus2022版本绘制的增材制造仿真模型 二:本模型为44层的空心截面矩形模型,具体的尺寸如图所示
- 《基于主从博弈的智能小区代理商定价策略及电动汽车充电管理》代码复现 含参考文献,代码复现和详细代码注释 关键词:电动汽车 负荷聚合商 主从博弈 KKT条件 双层优化 编程语言:MATLAB平台
- Armoury-Crate-Uninstall-Tool
- 【有参考文献】基于扩展(EKF)和无迹卡尔曼滤波(UKF)的电力系统动态状态估计 该程序对应文章Power System Dynamic State Estimation Using Extende
- 【有参考文献】基于数据驱动的模型预测控制电力系统机组组合优化 该程序复现文章Feature-Driven Economic Improvement for Network-Constrained U
- MATLAB环境下一种基于改进拉普拉斯先验模型的旋转机械故障诊断方法 压缩包=数据代码参考 算法运行环境为MAYLAB R2018A,执行一种基于改进拉普拉斯先验模型的旋转机械故障诊断方法 for
- 提高Python网络编程实战视频教程网络抓取爬虫01解释性脚本语言初探.avi
- untitled90.emf
- Simulink简易自动化测试工具,批处理运行模型,能够实现模型简易仿真多次反复测试,简化手动重复配置参数,运行模型,保存结果的烦恼 已经过FEV大厂已经过多次验证,工具可靠稳定 该工具箱能够对一个
- 提高Python网络编程实战视频教程网络抓取爬虫02-1Python开发环境windows.avi
- 基于Python的Opencv和Mysql数据库来实现的完整人脸识别打卡考勤系统
- 直流微网储能系统SoC均衡 15kW,400V级 光伏采用电导增量法实现mppt 储能变流器内环采用模型预测MPC控制 外环电压环初级控制用下垂droop soc一致性实现基于变下垂系数 (具体方法可
- 提高Python网络编程实战视频教程网络抓取爬虫02-2Python开发环境linux.avi
- 计及绿证交易及碳排放的含智能楼宇微网优化调度模型-100%原创系列 摘要:代码主要做的是电热综合能源系统的优化调度问题,在传统的含风光储火的微网基础上,加入电动汽车以及智能楼宇单元,组成更加复杂的微网
- Python的基于知识图谱电影问答系统源码+说明(高分毕设)
- 提高Python网络编程实战视频教程网络抓取爬虫02-3Python开发环境wingide.avi
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈