cleanup
15
README.md
@ -1,15 +0,0 @@
|
|||||||
# www.br0tcraft.de
|
|
||||||
|
|
||||||
## Lokalen Webserver starten
|
|
||||||
```
|
|
||||||
.\hugo.exe -D server
|
|
||||||
```
|
|
||||||
|
|
||||||
## neuen Post erstellen
|
|
||||||
im Ordner content\blog\posts eine neue Datei mit der Endung .md anlegen.
|
|
||||||
```
|
|
||||||
---
|
|
||||||
title: Unterm Strich ist alles besser
|
|
||||||
date: 2021-12-27
|
|
||||||
---
|
|
||||||
```
|
|
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
title: "{{ replace .Name "-" " " | title }}"
|
|
||||||
date: {{ .Date }}
|
|
||||||
draft: true
|
|
||||||
---
|
|
||||||
|
|
264
config.toml
@ -1,264 +0,0 @@
|
|||||||
baseURL = "https://www.br0tcraft.de/"
|
|
||||||
languageCode = "de-de"
|
|
||||||
title = "br0tcraft.de"
|
|
||||||
theme = "LoveIt"
|
|
||||||
publishdir = "/var/www/localhost/htdocs"
|
|
||||||
|
|
||||||
[menu]
|
|
||||||
[[menu.main]]
|
|
||||||
identifier = "blog"
|
|
||||||
name = "Blog"
|
|
||||||
url = "/blog/"
|
|
||||||
title = ""
|
|
||||||
weight = 1
|
|
||||||
[[menu.main]]
|
|
||||||
identifier = "categories"
|
|
||||||
name = "categories"
|
|
||||||
url = "/categories/"
|
|
||||||
title = ""
|
|
||||||
weight = 2
|
|
||||||
|
|
||||||
[params]
|
|
||||||
version = "0.2.X"
|
|
||||||
description = "Hi, ich bin Tom!"
|
|
||||||
defaultTheme = "auto"
|
|
||||||
dateFormat = "2006-01-02"
|
|
||||||
|
|
||||||
[params.app]
|
|
||||||
title = "br0tcraft.de"
|
|
||||||
noFavicon = false
|
|
||||||
svgFavicon = ""
|
|
||||||
themeColor = "#ffffff"
|
|
||||||
iconColor = "#5bbad5"
|
|
||||||
tileColor = "#da532c"
|
|
||||||
|
|
||||||
[params.search]
|
|
||||||
enable = true
|
|
||||||
type = "lunr"
|
|
||||||
contentLength = 4000
|
|
||||||
placeholder = ""
|
|
||||||
maxResultLength = 10
|
|
||||||
snippetLength = 30
|
|
||||||
highlightTag = "em"
|
|
||||||
absoluteURL = false
|
|
||||||
[params.search.algolia]
|
|
||||||
index = ""
|
|
||||||
appID = ""
|
|
||||||
searchKey = ""
|
|
||||||
|
|
||||||
[params.header]
|
|
||||||
desktopMode = "fixed"
|
|
||||||
mobileMode = "auto"
|
|
||||||
|
|
||||||
[params.footer]
|
|
||||||
enable = true
|
|
||||||
custom = ''
|
|
||||||
hugo = true
|
|
||||||
copyright = true
|
|
||||||
author = true
|
|
||||||
since = 2021
|
|
||||||
license = '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
|
|
||||||
|
|
||||||
[params.section]
|
|
||||||
paginate = 20
|
|
||||||
dateFormat = "01-02"
|
|
||||||
rss = 10
|
|
||||||
|
|
||||||
[params.list]
|
|
||||||
paginate = 20
|
|
||||||
dateFormat = "01-02"
|
|
||||||
rss = 10
|
|
||||||
|
|
||||||
[params.home]
|
|
||||||
rss = 10
|
|
||||||
[params.home.profile]
|
|
||||||
enable = true
|
|
||||||
title = "Hi, ich bin Tom!"
|
|
||||||
avatarURL = "/images/avatar.png"
|
|
||||||
subtitle = "Mein Spitzname ist Tim, Du darfst Maik zu mir sagen."
|
|
||||||
typeit = true
|
|
||||||
social = false
|
|
||||||
disclaimer = ""
|
|
||||||
[params.home.posts]
|
|
||||||
enable = true
|
|
||||||
paginate = 6
|
|
||||||
defaultHiddenFromHomePage = false
|
|
||||||
|
|
||||||
[params.social]
|
|
||||||
RSS = true # LoveIt NEW | 0.2.0
|
|
||||||
|
|
||||||
[params.page]
|
|
||||||
hiddenFromHomePage = false
|
|
||||||
hiddenFromSearch = false
|
|
||||||
twemoji = false
|
|
||||||
lightgallery = false
|
|
||||||
ruby = true
|
|
||||||
fraction = true
|
|
||||||
fontawesome = true
|
|
||||||
linkToMarkdown = true
|
|
||||||
rssFullText = false
|
|
||||||
[params.page.toc]
|
|
||||||
enable = true
|
|
||||||
keepStatic = true
|
|
||||||
auto = true
|
|
||||||
[params.page.math]
|
|
||||||
enable = true
|
|
||||||
blockLeftDelimiter = ""
|
|
||||||
blockRightDelimiter = ""
|
|
||||||
inlineLeftDelimiter = ""
|
|
||||||
inlineRightDelimiter = ""
|
|
||||||
copyTex = true
|
|
||||||
mhchem = true
|
|
||||||
[params.page.code]
|
|
||||||
copy = true
|
|
||||||
maxShownLines = 10
|
|
||||||
[params.page.mapbox]
|
|
||||||
accessToken = ""
|
|
||||||
lightStyle = "mapbox://styles/mapbox/light-v9"
|
|
||||||
darkStyle = "mapbox://styles/mapbox/dark-v9"
|
|
||||||
navigation = true
|
|
||||||
geolocate = true
|
|
||||||
scale = true
|
|
||||||
fullscreen = true
|
|
||||||
[params.page.share]
|
|
||||||
enable = true
|
|
||||||
Twitter = true
|
|
||||||
Facebook = false
|
|
||||||
Linkedin = false
|
|
||||||
Whatsapp = true
|
|
||||||
Pinterest = false
|
|
||||||
Tumblr = false
|
|
||||||
HackerNews = false
|
|
||||||
Reddit = false
|
|
||||||
VK = false
|
|
||||||
Buffer = false
|
|
||||||
Xing = false
|
|
||||||
Line = true
|
|
||||||
Instapaper = false
|
|
||||||
Pocket = false
|
|
||||||
Digg = false
|
|
||||||
Stumbleupon = false
|
|
||||||
Flipboard = false
|
|
||||||
Weibo = false
|
|
||||||
Renren = false
|
|
||||||
Myspace = false
|
|
||||||
Blogger = false
|
|
||||||
Baidu = false
|
|
||||||
Odnoklassniki = false
|
|
||||||
Evernote = false
|
|
||||||
Skype = false
|
|
||||||
Trello = false
|
|
||||||
Mix = false
|
|
||||||
[params.page.comment]
|
|
||||||
enable = true
|
|
||||||
[params.page.library]
|
|
||||||
[params.page.library.css]
|
|
||||||
# someCSS = "some.css"
|
|
||||||
# located in "assets/"
|
|
||||||
# Or
|
|
||||||
# someCSS = "https://cdn.example.com/some.css"
|
|
||||||
[params.page.library.js]
|
|
||||||
# someJavascript = "some.js"
|
|
||||||
# located in "assets/"
|
|
||||||
# Or
|
|
||||||
# someJavascript = "https://cdn.example.com/some.js"
|
|
||||||
# LoveIt CHANGED | 0.2.10 Page SEO config
|
|
||||||
[params.page.seo]
|
|
||||||
images = []
|
|
||||||
[params.page.seo.publisher]
|
|
||||||
name = ""
|
|
||||||
logoUrl = ""
|
|
||||||
|
|
||||||
[params.typeit]
|
|
||||||
speed = 100
|
|
||||||
cursorSpeed = 1000
|
|
||||||
cursorChar = "|"
|
|
||||||
duration = -1
|
|
||||||
|
|
||||||
[params.verification]
|
|
||||||
google = ""
|
|
||||||
bing = ""
|
|
||||||
yandex = ""
|
|
||||||
pinterest = ""
|
|
||||||
baidu = ""
|
|
||||||
|
|
||||||
[params.seo]
|
|
||||||
image = ""
|
|
||||||
thumbnailUrl = ""
|
|
||||||
|
|
||||||
[params.analytics]
|
|
||||||
enable = false
|
|
||||||
|
|
||||||
[params.cookieconsent]
|
|
||||||
enable = true
|
|
||||||
[params.cookieconsent.content]
|
|
||||||
message = ""
|
|
||||||
dismiss = ""
|
|
||||||
link = ""
|
|
||||||
|
|
||||||
[params.cdn]
|
|
||||||
data = ""
|
|
||||||
|
|
||||||
[params.compatibility]
|
|
||||||
polyfill = false
|
|
||||||
objectFit = false
|
|
||||||
|
|
||||||
[markup]
|
|
||||||
[markup.highlight]
|
|
||||||
codeFences = true
|
|
||||||
guessSyntax = true
|
|
||||||
lineNos = true
|
|
||||||
lineNumbersInTable = true
|
|
||||||
# false is a necessary configuration
|
|
||||||
# (https://github.com/dillonzq/LoveIt/issues/158)
|
|
||||||
noClasses = false
|
|
||||||
[markup.goldmark]
|
|
||||||
[markup.goldmark.extensions]
|
|
||||||
definitionList = true
|
|
||||||
footnote = true
|
|
||||||
linkify = true
|
|
||||||
strikethrough = true
|
|
||||||
table = true
|
|
||||||
taskList = true
|
|
||||||
typographer = true
|
|
||||||
[markup.goldmark.renderer]
|
|
||||||
unsafe = true
|
|
||||||
[markup.tableOfContents]
|
|
||||||
startLevel = 2
|
|
||||||
endLevel = 6
|
|
||||||
|
|
||||||
[author]
|
|
||||||
name = "br0tcraft"
|
|
||||||
email = "alex@br0tcraft.de"
|
|
||||||
link = ""
|
|
||||||
|
|
||||||
[sitemap]
|
|
||||||
changefreq = "weekly"
|
|
||||||
filename = "sitemap.xml"
|
|
||||||
priority = 0.5
|
|
||||||
|
|
||||||
[Permalinks]
|
|
||||||
# posts = ":year/:month/:filename"
|
|
||||||
posts = ":filename"
|
|
||||||
|
|
||||||
[privacy]
|
|
||||||
[privacy.twitter]
|
|
||||||
enableDNT = true
|
|
||||||
[privacy.youtube]
|
|
||||||
privacyEnhanced = true
|
|
||||||
|
|
||||||
[mediaTypes]
|
|
||||||
[mediaTypes."text/plain"]
|
|
||||||
suffixes = ["md"]
|
|
||||||
|
|
||||||
[outputFormats.MarkDown]
|
|
||||||
mediaType = "text/plain"
|
|
||||||
isPlainText = true
|
|
||||||
isHTML = false
|
|
||||||
|
|
||||||
[outputs]
|
|
||||||
home = ["HTML", "RSS", "JSON"]
|
|
||||||
page = ["HTML", "MarkDown"]
|
|
||||||
section = ["HTML", "RSS"]
|
|
||||||
taxonomy = ["HTML", "RSS"]
|
|
||||||
taxonomyTerm = ["HTML"]
|
|
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
title: 3ds
|
|
||||||
date: 2023-05-011
|
|
||||||
categories:
|
|
||||||
- games
|
|
||||||
---
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- [Spielen](/games/3ds/)
|
|
||||||
- [Downloaden](/games/space/download/2023-05-07.zip)
|
|
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
title: Spaceshooter
|
|
||||||
date: 2023-05-07
|
|
||||||
categories:
|
|
||||||
- games
|
|
||||||
---
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- [Spielen](/games/space/)
|
|
||||||
- [Downloaden](/games/space/download/2023-05-07.zip)
|
|
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
title: Unterm Strich ist alles besser
|
|
||||||
date: 2021-12-27
|
|
||||||
---
|
|
||||||
# Alter ist das Geil hier
|
|
||||||
okay, dann schreib ich halt
|
|
||||||
|
|
||||||
```
|
|
||||||
if(keyCode(KeyCode.Input=A))
|
|
||||||
|
|
||||||
```
|
|
@ -1,81 +0,0 @@
|
|||||||
// Name: Speech to Text
|
|
||||||
// ID: SpeechToTextByBr0tcraft
|
|
||||||
// Description: An easy way to convert speech to text.
|
|
||||||
|
|
||||||
(function (Scratch) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
// Ensure the extension runs unsandboxed
|
|
||||||
if (!Scratch.extensions.unsandboxed) throw new Error('This extension must run unsandboxed');
|
|
||||||
|
|
||||||
class SpeechToTextExtension {
|
|
||||||
constructor(runtime) {
|
|
||||||
this.runtime = runtime;
|
|
||||||
this.recognition = new webkitSpeechRecognition();
|
|
||||||
this.audio = new Audio();
|
|
||||||
this.recognition.lang = 'de-DE'; // Default language
|
|
||||||
}
|
|
||||||
|
|
||||||
getInfo() {
|
|
||||||
return {
|
|
||||||
id: 'SpeechToTextByBr0tcraft',
|
|
||||||
name: 'Speech to Text',
|
|
||||||
color1: '#80abff',
|
|
||||||
color2: '#3a7eff',
|
|
||||||
color3: '#0058ff',
|
|
||||||
menuIconURI: 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxNDYuNzYwOTQiIGhlaWdodD0iMTgzLjcyNDM1IiB2aWV3Qm94PSIwLDAsMTQ2Ljc2MDk0LDE4My43MjQzNSI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTE2OC44NzkxOCwtODguMTM3ODMpIj48ZyBkYXRhLXBhcGVyLWRhdGE9InsmcXV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pbmVqb2luPSJtaXRlciIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBzdHJva2UtZGFzaGFycmF5PSIiIHN0cm9rZS1kYXNob2Zmc2V0PSIwIiBmb250LWZhbWlseT0iU2FucyBTZXJpZiIgZm9udC13ZWlnaHQ9Im5vcm1hbCIgdGV4dC1hbmNob3I9InN0YXJ0IiBzdHlsZT0ibWl4LWJsZW5kLW1vZGU6IG5vcm1hbCI+PHRzcGFuIHg9IjAiIGR5PSIwIj5BPC90c3Bhbj48L3RleHQ+PC9nPjwvZz48L3N2Zz48IS0tcm90YXRpb25DZW50ZXI6NzEuMTIwODE5OTk5OTk5OTg6OTEuODYyMTY1LS0+',
|
|
||||||
blocks: [
|
|
||||||
{ opcode: 'konvert', blockType: Scratch.BlockType.REPORTER, text: 'Convert speech to text', disableMonitor: true },
|
|
||||||
{ opcode: 'setLanguage', blockType: Scratch.BlockType.COMMAND, text: 'Set language to [l]', arguments: { l: { type: Scratch.ArgumentType.STRING, defaultValue: 'de-DE', menu: 'LANGUAGE' } } },
|
|
||||||
{ opcode: 'Language', blockType: Scratch.BlockType.REPORTER, text: 'language' },
|
|
||||||
],
|
|
||||||
menus: {
|
|
||||||
LANGUAGE: {
|
|
||||||
acceptReporters: true,
|
|
||||||
items: [
|
|
||||||
{ text: 'English', value: 'en-US' },
|
|
||||||
{ text: 'Spanish', value: 'es-ES' },
|
|
||||||
{ text: 'French', value: 'fr_FR' },
|
|
||||||
{ text: 'German', value: 'de-DE' },
|
|
||||||
{ text: 'Italian', value: 'it-IT' },
|
|
||||||
{ text: 'Japanese', value: 'ja-JP' },
|
|
||||||
{ text: 'Korean', value: 'ko-KR' },
|
|
||||||
{ text: 'Portuguese', value: 'pt-BR' },
|
|
||||||
{ text: 'Chinese', value: 'zh-CN' },
|
|
||||||
{ text: 'Russian', value: 'ru-RU' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
konvert() {
|
|
||||||
this.recognition.interimResults = false;
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
this.recognition.onresult = (event) => {
|
|
||||||
const transcript = event.results[0][0].transcript;
|
|
||||||
resolve(transcript);
|
|
||||||
};
|
|
||||||
|
|
||||||
this.recognition.onerror = (event) => {
|
|
||||||
reject(`Error in speech recognition: ${event.error}`);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Start the speech recognition when the block is triggered
|
|
||||||
this.recognition.start();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
setLanguage(args) {
|
|
||||||
const newLanguage = args.l;
|
|
||||||
this.recognition.lang = newLanguage;
|
|
||||||
}
|
|
||||||
|
|
||||||
Language(args) {
|
|
||||||
return this.recognition.lang;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Register the extension with Scratch
|
|
||||||
Scratch.extensions.register(new SpeechToTextExtension());
|
|
||||||
})(Scratch);
|
|
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 175 B |
Before Width: | Height: | Size: 96 B |
Before Width: | Height: | Size: 109 B |
Before Width: | Height: | Size: 74 B |
Before Width: | Height: | Size: 84 B |
@ -1,16 +0,0 @@
|
|||||||
body { padding: 0; margin: 0 }
|
|
||||||
#unity-container { position: absolute }
|
|
||||||
#unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
|
|
||||||
#unity-container.unity-mobile { width: 100%; height: 100% }
|
|
||||||
#unity-canvas { background: #231F20 }
|
|
||||||
.unity-mobile #unity-canvas { width: 100%; height: 100% }
|
|
||||||
#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
|
|
||||||
#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
|
|
||||||
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-dark.png') no-repeat center }
|
|
||||||
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
|
|
||||||
#unity-footer { position: relative }
|
|
||||||
.unity-mobile #unity-footer { display: none }
|
|
||||||
#unity-webgl-logo { float:left; width: 204px; height: 38px; background: url('webgl-logo.png') no-repeat center }
|
|
||||||
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
|
|
||||||
#unity-fullscreen-button { float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
|
|
||||||
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }
|
|
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.9 KiB |
@ -1,121 +0,0 @@
|
|||||||
<!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 | spacegame</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=960 height=600></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">spacegame</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 + "/space.loader.js";
|
|
||||||
var config = {
|
|
||||||
dataUrl: buildUrl + "/space.data.gz",
|
|
||||||
frameworkUrl: buildUrl + "/space.framework.js.gz",
|
|
||||||
codeUrl: buildUrl + "/space.wasm.gz",
|
|
||||||
streamingAssetsUrl: "StreamingAssets",
|
|
||||||
companyName: "Br0t craft",
|
|
||||||
productName: "spacegame",
|
|
||||||
productVersion: "0.1",
|
|
||||||
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)) {
|
|
||||||
// Mobile device style: fill the whole browser client area with the game canvas:
|
|
||||||
|
|
||||||
var meta = document.createElement('meta');
|
|
||||||
meta.name = 'viewport';
|
|
||||||
meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
|
|
||||||
document.getElementsByTagName('head')[0].appendChild(meta);
|
|
||||||
container.className = "unity-mobile";
|
|
||||||
|
|
||||||
// To lower canvas resolution on mobile devices to gain some
|
|
||||||
// performance, uncomment the following line:
|
|
||||||
// config.devicePixelRatio = 1;
|
|
||||||
|
|
||||||
canvas.style.width = window.innerWidth + 'px';
|
|
||||||
canvas.style.height = window.innerHeight + 'px';
|
|
||||||
|
|
||||||
unityShowBanner('WebGL builds are not supported on mobile devices.');
|
|
||||||
} else {
|
|
||||||
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
|
|
||||||
|
|
||||||
canvas.style.width = "960px";
|
|
||||||
canvas.style.height = "600px";
|
|
||||||
}
|
|
||||||
|
|
||||||
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>
|
|
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 569 KiB |
@ -1 +0,0 @@
|
|||||||
Subproject commit f787a4e5ad4edf60467658d10c286248dc5027a6
|
|