added rocket-league-2d, sabercut, tic-tac-what
@@ -641,6 +641,11 @@
|
||||
"aliases": [],
|
||||
"categories": []
|
||||
},
|
||||
"Rocket League 2D": {
|
||||
"path": "rocket-league-2d",
|
||||
"aliases": [],
|
||||
"categories": []
|
||||
},
|
||||
"Rogue Soul": {
|
||||
"path": "flash/?game=rogue-soul",
|
||||
"aliases": [],
|
||||
@@ -706,6 +711,11 @@
|
||||
"aliases": [],
|
||||
"categories": []
|
||||
},
|
||||
"Sabercut": {
|
||||
"path": "sabercut",
|
||||
"aliases": [],
|
||||
"categories": []
|
||||
},
|
||||
"Sandspiel": {
|
||||
"path": "sandspiel",
|
||||
"aliases": [],
|
||||
@@ -851,6 +861,11 @@
|
||||
"aliases": [],
|
||||
"categories": []
|
||||
},
|
||||
"Tic Tac What?": {
|
||||
"path": "tic-tac-what",
|
||||
"aliases": [],
|
||||
"categories": []
|
||||
},
|
||||
"Time Shooter": {
|
||||
"path": "time-shooter",
|
||||
"aliases": [],
|
||||
|
||||
|
After Width: | Height: | Size: 797 B |
|
After Width: | Height: | Size: 227 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 266 B |
|
After Width: | Height: | Size: 930 B |
|
After Width: | Height: | Size: 301 B |
|
After Width: | Height: | Size: 301 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by GameMaker:Studio http://www.yoyogames.com/gamemaker/studio -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta http-equiv="pragma" content="no-cache"/>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name ="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta charset="utf-8"/>
|
||||
|
||||
<!-- Set the title bar of the page -->
|
||||
<title>Created with GameMaker: Studio</title>
|
||||
|
||||
<!-- Set the background colour of the document -->
|
||||
<style>
|
||||
body {
|
||||
background: #0;
|
||||
color:#cccccc;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
canvas {
|
||||
image-rendering: optimizeSpeed;
|
||||
-webkit-interpolation-mode: nearest-neighbor;
|
||||
-ms-touch-action: none;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
:-webkit-full-screen #canvas {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
div.gm4html5_div_class
|
||||
{
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
/* START - Login Dialog Box */
|
||||
div.gm4html5_login
|
||||
{
|
||||
padding: 20px;
|
||||
position: absolute;
|
||||
border: solid 2px #000000;
|
||||
background-color: #404040;
|
||||
color:#00ff00;
|
||||
border-radius: 15px;
|
||||
box-shadow: #101010 20px 20px 40px;
|
||||
}
|
||||
div.gm4html5_cancel_button
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
div.gm4html5_login_button
|
||||
{
|
||||
float: left;
|
||||
}
|
||||
div.gm4html5_login_header
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
/* END - Login Dialog Box */
|
||||
:-webkit-full-screen {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="gm4html5_div_class" id="gm4html5_div_id">
|
||||
<!-- Create the canvas element the game draws to -->
|
||||
<canvas id="canvas" width="1024" height="384" >
|
||||
<p>Your browser doesn't support HTML5 canvas.</p>
|
||||
</canvas>
|
||||
</div>
|
||||
|
||||
<!-- Run the game code -->
|
||||
<script type="text/javascript" src="html5game/RocketLeague2D.js?XLEBC=1995985343"></script>
|
||||
<script>window.onload = GameMaker_Init;</script>
|
||||
</body>
|
||||
</html>
|
||||
<script defer src="https://static.itch.io/htmlgame.js" type="text/javascript"></script>
|
||||
@@ -0,0 +1,213 @@
|
||||
/**************************************************************************/
|
||||
/* audio.worklet.js */
|
||||
/**************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/**************************************************************************/
|
||||
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
/* "Software"), to deal in the Software without restriction, including */
|
||||
/* without limitation the rights to use, copy, modify, merge, publish, */
|
||||
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
||||
/* permit persons to whom the Software is furnished to do so, subject to */
|
||||
/* the following conditions: */
|
||||
/* */
|
||||
/* The above copyright notice and this permission notice shall be */
|
||||
/* included in all copies or substantial portions of the Software. */
|
||||
/* */
|
||||
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
||||
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
||||
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
||||
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
||||
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
class RingBuffer {
|
||||
constructor(p_buffer, p_state, p_threads) {
|
||||
this.buffer = p_buffer;
|
||||
this.avail = p_state;
|
||||
this.threads = p_threads;
|
||||
this.rpos = 0;
|
||||
this.wpos = 0;
|
||||
}
|
||||
|
||||
data_left() {
|
||||
return this.threads ? Atomics.load(this.avail, 0) : this.avail;
|
||||
}
|
||||
|
||||
space_left() {
|
||||
return this.buffer.length - this.data_left();
|
||||
}
|
||||
|
||||
read(output) {
|
||||
const size = this.buffer.length;
|
||||
let from = 0;
|
||||
let to_write = output.length;
|
||||
if (this.rpos + to_write > size) {
|
||||
const high = size - this.rpos;
|
||||
output.set(this.buffer.subarray(this.rpos, size));
|
||||
from = high;
|
||||
to_write -= high;
|
||||
this.rpos = 0;
|
||||
}
|
||||
if (to_write) {
|
||||
output.set(this.buffer.subarray(this.rpos, this.rpos + to_write), from);
|
||||
}
|
||||
this.rpos += to_write;
|
||||
if (this.threads) {
|
||||
Atomics.add(this.avail, 0, -output.length);
|
||||
Atomics.notify(this.avail, 0);
|
||||
} else {
|
||||
this.avail -= output.length;
|
||||
}
|
||||
}
|
||||
|
||||
write(p_buffer) {
|
||||
const to_write = p_buffer.length;
|
||||
const mw = this.buffer.length - this.wpos;
|
||||
if (mw >= to_write) {
|
||||
this.buffer.set(p_buffer, this.wpos);
|
||||
this.wpos += to_write;
|
||||
if (mw === to_write) {
|
||||
this.wpos = 0;
|
||||
}
|
||||
} else {
|
||||
const high = p_buffer.subarray(0, mw);
|
||||
const low = p_buffer.subarray(mw);
|
||||
this.buffer.set(high, this.wpos);
|
||||
this.buffer.set(low);
|
||||
this.wpos = low.length;
|
||||
}
|
||||
if (this.threads) {
|
||||
Atomics.add(this.avail, 0, to_write);
|
||||
Atomics.notify(this.avail, 0);
|
||||
} else {
|
||||
this.avail += to_write;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class GodotProcessor extends AudioWorkletProcessor {
|
||||
constructor() {
|
||||
super();
|
||||
this.threads = false;
|
||||
this.running = true;
|
||||
this.lock = null;
|
||||
this.notifier = null;
|
||||
this.output = null;
|
||||
this.output_buffer = new Float32Array();
|
||||
this.input = null;
|
||||
this.input_buffer = new Float32Array();
|
||||
this.port.onmessage = (event) => {
|
||||
const cmd = event.data['cmd'];
|
||||
const data = event.data['data'];
|
||||
this.parse_message(cmd, data);
|
||||
};
|
||||
}
|
||||
|
||||
process_notify() {
|
||||
if (this.notifier) {
|
||||
Atomics.add(this.notifier, 0, 1);
|
||||
Atomics.notify(this.notifier, 0);
|
||||
}
|
||||
}
|
||||
|
||||
parse_message(p_cmd, p_data) {
|
||||
if (p_cmd === 'start' && p_data) {
|
||||
const state = p_data[0];
|
||||
let idx = 0;
|
||||
this.threads = true;
|
||||
this.lock = state.subarray(idx, ++idx);
|
||||
this.notifier = state.subarray(idx, ++idx);
|
||||
const avail_in = state.subarray(idx, ++idx);
|
||||
const avail_out = state.subarray(idx, ++idx);
|
||||
this.input = new RingBuffer(p_data[1], avail_in, true);
|
||||
this.output = new RingBuffer(p_data[2], avail_out, true);
|
||||
} else if (p_cmd === 'stop') {
|
||||
this.running = false;
|
||||
this.output = null;
|
||||
this.input = null;
|
||||
this.lock = null;
|
||||
this.notifier = null;
|
||||
} else if (p_cmd === 'start_nothreads') {
|
||||
this.output = new RingBuffer(p_data[0], p_data[0].length, false);
|
||||
} else if (p_cmd === 'chunk') {
|
||||
this.output.write(p_data);
|
||||
}
|
||||
}
|
||||
|
||||
static array_has_data(arr) {
|
||||
return arr.length && arr[0].length && arr[0][0].length;
|
||||
}
|
||||
|
||||
process(inputs, outputs, parameters) {
|
||||
if (!this.running) {
|
||||
return false; // Stop processing.
|
||||
}
|
||||
if (this.output === null) {
|
||||
return true; // Not ready yet, keep processing.
|
||||
}
|
||||
const process_input = GodotProcessor.array_has_data(inputs);
|
||||
if (process_input) {
|
||||
const input = inputs[0];
|
||||
const chunk = input[0].length * input.length;
|
||||
if (this.input_buffer.length !== chunk) {
|
||||
this.input_buffer = new Float32Array(chunk);
|
||||
}
|
||||
if (!this.threads) {
|
||||
GodotProcessor.write_input(this.input_buffer, input);
|
||||
this.port.postMessage({ 'cmd': 'input', 'data': this.input_buffer });
|
||||
} else if (this.input.space_left() >= chunk) {
|
||||
GodotProcessor.write_input(this.input_buffer, input);
|
||||
this.input.write(this.input_buffer);
|
||||
} else {
|
||||
// this.port.postMessage('Input buffer is full! Skipping input frame.'); // Uncomment this line to debug input buffer.
|
||||
}
|
||||
}
|
||||
const process_output = GodotProcessor.array_has_data(outputs);
|
||||
if (process_output) {
|
||||
const output = outputs[0];
|
||||
const chunk = output[0].length * output.length;
|
||||
if (this.output_buffer.length !== chunk) {
|
||||
this.output_buffer = new Float32Array(chunk);
|
||||
}
|
||||
if (this.output.data_left() >= chunk) {
|
||||
this.output.read(this.output_buffer);
|
||||
GodotProcessor.write_output(output, this.output_buffer);
|
||||
if (!this.threads) {
|
||||
this.port.postMessage({ 'cmd': 'read', 'data': chunk });
|
||||
}
|
||||
} else {
|
||||
// this.port.postMessage('Output buffer has not enough frames! Skipping output frame.'); // Uncomment this line to debug output buffer.
|
||||
}
|
||||
}
|
||||
this.process_notify();
|
||||
return true;
|
||||
}
|
||||
|
||||
static write_output(dest, source) {
|
||||
const channels = dest.length;
|
||||
for (let ch = 0; ch < channels; ch++) {
|
||||
for (let sample = 0; sample < dest[ch].length; sample++) {
|
||||
dest[ch][sample] = source[sample * channels + ch];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static write_input(dest, source) {
|
||||
const channels = source.length;
|
||||
for (let ch = 0; ch < channels; ch++) {
|
||||
for (let sample = 0; sample < source[ch].length; sample++) {
|
||||
dest[sample * channels + ch] = source[ch][sample];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
registerProcessor('godot-processor', GodotProcessor);
|
||||
@@ -0,0 +1,199 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0">
|
||||
<title>SaberCut</title>
|
||||
<style>
|
||||
html, body, #canvas {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
color: white;
|
||||
background-color: black;
|
||||
overflow: hidden;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
#canvas {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#canvas:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#status, #status-splash, #status-progress {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#status, #status-splash {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
#status {
|
||||
background-color: #242424;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#status-splash {
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#status-progress, #status-notice {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#status-progress {
|
||||
bottom: 10%;
|
||||
width: 50%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#status-notice {
|
||||
background-color: #5b3943;
|
||||
border-radius: 0.5rem;
|
||||
border: 1px solid #9b3943;
|
||||
color: #e0e0e0;
|
||||
font-family: 'Noto Sans', 'Droid Sans', Arial, sans-serif;
|
||||
line-height: 1.3;
|
||||
margin: 0 2rem;
|
||||
overflow: hidden;
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
}
|
||||
</style>
|
||||
<link id="-gd-engine-icon" rel="icon" type="image/png" href="index.icon.png" />
|
||||
<link rel="apple-touch-icon" href="index.apple-touch-icon.png"/>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="canvas">
|
||||
Your browser does not support the canvas tag.
|
||||
</canvas>
|
||||
|
||||
<noscript>
|
||||
Your browser does not support JavaScript.
|
||||
</noscript>
|
||||
|
||||
<div id="status">
|
||||
<img id="status-splash" src="index.png" alt="">
|
||||
<progress id="status-progress"></progress>
|
||||
<div id="status-notice"></div>
|
||||
</div>
|
||||
|
||||
<script src="index.js"></script>
|
||||
<script>
|
||||
const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"ensureCrossOriginIsolationHeaders":true,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":10715440,"index.wasm":43016933},"focusCanvas":true,"gdextensionLibs":[]};
|
||||
const GODOT_THREADS_ENABLED = false;
|
||||
const engine = new Engine(GODOT_CONFIG);
|
||||
|
||||
(function () {
|
||||
const statusOverlay = document.getElementById('status');
|
||||
const statusProgress = document.getElementById('status-progress');
|
||||
const statusNotice = document.getElementById('status-notice');
|
||||
|
||||
let initializing = true;
|
||||
let statusMode = '';
|
||||
|
||||
function setStatusMode(mode) {
|
||||
if (statusMode === mode || !initializing) {
|
||||
return;
|
||||
}
|
||||
if (mode === 'hidden') {
|
||||
statusOverlay.remove();
|
||||
initializing = false;
|
||||
return;
|
||||
}
|
||||
statusOverlay.style.visibility = 'visible';
|
||||
statusProgress.style.display = mode === 'progress' ? 'block' : 'none';
|
||||
statusNotice.style.display = mode === 'notice' ? 'block' : 'none';
|
||||
statusMode = mode;
|
||||
}
|
||||
|
||||
function setStatusNotice(text) {
|
||||
while (statusNotice.lastChild) {
|
||||
statusNotice.removeChild(statusNotice.lastChild);
|
||||
}
|
||||
const lines = text.split('\n');
|
||||
lines.forEach((line) => {
|
||||
statusNotice.appendChild(document.createTextNode(line));
|
||||
statusNotice.appendChild(document.createElement('br'));
|
||||
});
|
||||
}
|
||||
|
||||
function displayFailureNotice(err) {
|
||||
console.error(err);
|
||||
if (err instanceof Error) {
|
||||
setStatusNotice(err.message);
|
||||
} else if (typeof err === 'string') {
|
||||
setStatusNotice(err);
|
||||
} else {
|
||||
setStatusNotice('An unknown error occured');
|
||||
}
|
||||
setStatusMode('notice');
|
||||
initializing = false;
|
||||
}
|
||||
|
||||
const missing = Engine.getMissingFeatures({
|
||||
threads: GODOT_THREADS_ENABLED,
|
||||
});
|
||||
|
||||
if (missing.length !== 0) {
|
||||
if (GODOT_CONFIG['serviceWorker'] && GODOT_CONFIG['ensureCrossOriginIsolationHeaders'] && 'serviceWorker' in navigator) {
|
||||
// There's a chance that installing the service worker would fix the issue
|
||||
Promise.race([
|
||||
navigator.serviceWorker.getRegistration().then((registration) => {
|
||||
if (registration != null) {
|
||||
return Promise.reject(new Error('Service worker already exists.'));
|
||||
}
|
||||
return registration;
|
||||
}).then(() => engine.installServiceWorker()),
|
||||
// For some reason, `getRegistration()` can stall
|
||||
new Promise((resolve) => {
|
||||
setTimeout(() => resolve(), 2000);
|
||||
}),
|
||||
]).catch((err) => {
|
||||
console.error('Error while registering service worker:', err);
|
||||
}).then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
} else {
|
||||
// Display the message as usual
|
||||
const missingMsg = 'Error\nThe following features required to run Godot projects on the Web are missing:\n';
|
||||
displayFailureNotice(missingMsg + missing.join('\n'));
|
||||
}
|
||||
} else {
|
||||
setStatusMode('progress');
|
||||
engine.startGame({
|
||||
'onProgress': function (current, total) {
|
||||
if (current > 0 && total > 0) {
|
||||
statusProgress.value = current;
|
||||
statusProgress.max = total;
|
||||
} else {
|
||||
statusProgress.removeAttribute('value');
|
||||
statusProgress.removeAttribute('max');
|
||||
}
|
||||
},
|
||||
}).then(() => {
|
||||
setStatusMode('hidden');
|
||||
}, displayFailureNotice);
|
||||
}
|
||||
}());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
@@ -0,0 +1 @@
|
||||
{"Keys":["com.unity.services.core.cloud-environment","com.unity.services.core.version","com.unity.services.core.initializer-assembly-qualified-names","com.unity.services.authentication.version","com.unity.services.authentication.initializer-assembly-qualified-names","com.unity.services.qos.version","com.unity.services.qos.initializer-assembly-qualified-names","com.unity.services.relay.version","com.unity.services.relay.initializer-assembly-qualified-names","com.unity.services.core.all-package-names","com.unity.services.core.environment-name"],"Values":[{"m_Value":"production","m_IsReadOnly":false},{"m_Value":"1.12.4","m_IsReadOnly":true},{"m_Value":"Unity.Services.Core.Registration.CorePackageInitializer, Unity.Services.Core.Registration, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;Unity.Services.Core.Internal.IInitializablePackageV2, Unity.Services.Core.Internal, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_IsReadOnly":true},{"m_Value":"2.7.2","m_IsReadOnly":true},{"m_Value":"Unity.Services.Authentication.AuthenticationPackageInitializer, Unity.Services.Authentication, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_IsReadOnly":true},{"m_Value":"1.2.1","m_IsReadOnly":true},{"m_Value":"Unity.Services.Qos.QosPackageInitializer, Unity.Services.QoS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_IsReadOnly":true},{"m_Value":"1.0.5","m_IsReadOnly":true},{"m_Value":"Unity.Services.Relay.RelayServiceProvider, Unity.Services.Relay, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_IsReadOnly":true},{"m_Value":"com.unity.services.core;com.unity.services.authentication;com.unity.services.qos;com.unity.services.relay","m_IsReadOnly":false},{"m_Value":"production","m_IsReadOnly":false}]}
|
||||
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,105 @@
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
*, *:before, *:after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
canvas {
|
||||
display: block;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
#unity-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#unity-canvas {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #231F20;
|
||||
}
|
||||
#loading-cover {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
#unity-loading-bar {
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
#unity-logo {
|
||||
text-align: center;
|
||||
}
|
||||
#unity-logo img {
|
||||
max-width: 80%;
|
||||
}
|
||||
#unity-progress-bar-empty {
|
||||
width: 80%;
|
||||
height: 24px;
|
||||
margin: 10px 20px 20px 10px;
|
||||
text-align: left;
|
||||
border: 1px solid white;
|
||||
padding: 2px;
|
||||
}
|
||||
#unity-progress-bar-full {
|
||||
width: 0%;
|
||||
height: 100%;
|
||||
background: white;
|
||||
}
|
||||
.light #unity-progress-bar-empty {
|
||||
border-color: black;
|
||||
}
|
||||
.light #unity-progress-bar-full {
|
||||
background: black;
|
||||
}
|
||||
|
||||
#unity-fullscreen-button {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
background: url('fullscreen-button.png') no-repeat center;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
.spinner,
|
||||
.spinner:after {
|
||||
border-radius: 50%;
|
||||
width: 5em;
|
||||
height: 5em;
|
||||
}
|
||||
.spinner {
|
||||
margin: 10px;
|
||||
font-size: 10px;
|
||||
position: relative;
|
||||
text-indent: -9999em;
|
||||
border-top: 1.1em solid rgba(255, 255, 255, 0.2);
|
||||
border-right: 1.1em solid rgba(255, 255, 255, 0.2);
|
||||
border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);
|
||||
border-left: 1.1em solid #ffffff;
|
||||
transform: translateZ(0);
|
||||
animation: spinner-spin 1.1s infinite linear;
|
||||
}
|
||||
@keyframes spinner-spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
<title>Tic-Tac-What</title>
|
||||
<link rel="shortcut icon" href="TemplateData/favicon.ico">
|
||||
<link rel="stylesheet" href="TemplateData/style.css">
|
||||
</head>
|
||||
<body class="dark">
|
||||
<div id="unity-container" class="unity-desktop">
|
||||
<canvas id="unity-canvas"></canvas>
|
||||
</div>
|
||||
<div id="loading-cover" style="display:none;">
|
||||
<div id="unity-loading-bar">
|
||||
<div id="unity-logo"><img src="logo.png"></div>
|
||||
<div id="unity-progress-bar-empty" style="display: none;">
|
||||
<div id="unity-progress-bar-full"></div>
|
||||
</div>
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="unity-fullscreen-button" style="display: none;"></div>
|
||||
<script>
|
||||
const hideFullScreenButton = "1";
|
||||
const buildUrl = "Build";
|
||||
const loaderUrl = buildUrl + "/tic.loader.js";
|
||||
const config = {
|
||||
dataUrl: buildUrl + "/tic.data.br",
|
||||
frameworkUrl: buildUrl + "/tic.framework.js.br",
|
||||
codeUrl: buildUrl + "/tic.wasm.br",
|
||||
streamingAssetsUrl: "StreamingAssets",
|
||||
companyName: "BlueEagle421",
|
||||
productName: "Tic-Tac-What",
|
||||
productVersion: "1.0.1",
|
||||
};
|
||||
|
||||
const container = document.querySelector("#unity-container");
|
||||
const canvas = document.querySelector("#unity-canvas");
|
||||
const loadingCover = document.querySelector("#loading-cover");
|
||||
const progressBarEmpty = document.querySelector("#unity-progress-bar-empty");
|
||||
const progressBarFull = document.querySelector("#unity-progress-bar-full");
|
||||
const fullscreenButton = document.querySelector("#unity-fullscreen-button");
|
||||
const spinner = document.querySelector('.spinner');
|
||||
|
||||
const canFullscreen = (function() {
|
||||
for (const key of [
|
||||
'exitFullscreen',
|
||||
'webkitExitFullscreen',
|
||||
'webkitCancelFullScreen',
|
||||
'mozCancelFullScreen',
|
||||
'msExitFullscreen',
|
||||
]) {
|
||||
if (key in document) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}());
|
||||
|
||||
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
|
||||
container.className = "unity-mobile";
|
||||
config.devicePixelRatio = 1;
|
||||
}
|
||||
loadingCover.style.display = "";
|
||||
|
||||
const script = document.createElement("script");
|
||||
script.src = loaderUrl;
|
||||
script.onload = () => {
|
||||
createUnityInstance(canvas, config, (progress) => {
|
||||
spinner.style.display = "none";
|
||||
progressBarEmpty.style.display = "";
|
||||
progressBarFull.style.width = `${100 * progress}%`;
|
||||
}).then((unityInstance) => {
|
||||
loadingCover.style.display = "none";
|
||||
if (canFullscreen) {
|
||||
if (!hideFullScreenButton) {
|
||||
fullscreenButton.style.display = "";
|
||||
}
|
||||
fullscreenButton.onclick = () => {
|
||||
unityInstance.SetFullscreen(1);
|
||||
};
|
||||
}
|
||||
}).catch((message) => {
|
||||
alert(message);
|
||||
});
|
||||
};
|
||||
document.body.appendChild(script);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 6.6 KiB |