This commit is contained in:
Alex38Lyon
2025-06-03 09:56:26 +02:00
parent 5eaa53b34d
commit d4b7efa424
166 changed files with 83065 additions and 611 deletions
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4edf2efde1c818d43be9cf5e9a0f76e5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ab0a39f2b48b8634dacf1639a56e00cc
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,164 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{{{ PRODUCT_NAME }}}</title>
<style>
html, body {
background: {{{ BACKGROUND || '#000' }}};
width: 100%;
height: 100%;
overflow: visible;
padding: 0;
margin: 0;
font-family: Arial, sans-serif;
color: white;
}
#container {
background: transparent !important;
position: absolute;
}
#container canvas {
position: absolute;
}
#container canvas[data-pixel-art="true"] {
image-rendering: pixelated;
-ms-interpolation-mode: nearest-neighbor;
}
#loading-box {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
z-index: 1000;
}
#logo {
max-width: 600px;
margin-bottom: 20px;
}
#progress-container {
width: 300px;
height: 20px;
background-color: rgba(255, 255, 255, 0.2);
border-radius: 10px;
overflow: hidden;
margin: 0 auto;
}
#progress-bar {
height: 100%;
width: 0%;
background-color: #4caf50;
transition: width 0.1s ease;
}
#progress-info {
margin-top: 10px;
font-size: 14px;
}
</style>
</head>
<body>
<div id="container">
<canvas id="game-canvas" data-pixel-art="{{{ OPTIMIZE_FOR_PIXEL_ART }}}"></canvas>
<!-- Logo et barre de chargement -->
<div id="loading-box">
<img id="logo" src="Logo.png" alt="Logo">
<div id="progress-container">
<div id="progress-bar"></div>
</div>
<div id="progress-info">Chargement... 0%</div>
</div>
<script src="Build/{{{ LOADER_FILENAME }}}"></script>
<script>
const canvas = document.querySelector("#game-canvas");
const progressBar = document.getElementById("progress-bar");
const progressInfo = document.getElementById("progress-info");
const loadingBox = document.getElementById("loading-box");
let lastTime = performance.now();
let lastProgress = 0;
const config = {
dataUrl: "Build/{{{ DATA_FILENAME }}}",
frameworkUrl: "Build/{{{ FRAMEWORK_FILENAME }}}",
codeUrl: "Build/{{{ CODE_FILENAME }}}",
#if MEMORY_FILENAME
memoryUrl: "Build/{{{ MEMORY_FILENAME }}}",
#endif
#if SYMBOLS_FILENAME
symbolsUrl: "Build/{{{ SYMBOLS_FILENAME }}}",
#endif
streamingAssetsUrl: "StreamingAssets",
companyName: "{{{ COMPANY_NAME }}}",
productName: "{{{ PRODUCT_NAME }}}",
productVersion: "{{{ PRODUCT_VERSION }}}"
};
let scaleToFit;
try {
scaleToFit = !!JSON.parse("{{{ SCALE_TO_FIT }}}");
} catch (e) {
scaleToFit = true;
}
function progressHandler(progress) {
const percent = Math.floor(progress * 100);
const now = performance.now();
const deltaTime = (now - lastTime) / 1000; // en secondes
const deltaProgress = progress - lastProgress;
const speed = deltaProgress > 0 ? (deltaProgress * 100 / deltaTime).toFixed(2) : "0";
progressBar.style.width = percent + "%";
// <!-- progressInfo.textContent = `Chargement... ${percent}% (${speed}%/s)`; -->
progressInfo.textContent = `Chargement... ${percent}%`;
lastTime = now;
lastProgress = progress;
if (percent >= 100) {
// Masquer le logo et la barre après chargement
setTimeout(() => loadingBox.style.display = "none", 500);
}
}
function onResize() {
const container = canvas.parentElement;
let w, h;
if (scaleToFit) {
w = window.innerWidth;
h = window.innerHeight;
const r = {{{ HEIGHT }}} / {{{ WIDTH }}};
if (w * r > h) w = Math.min(w, Math.ceil(h / r));
h = Math.floor(w * r);
} else {
w = {{{ WIDTH }}};
h = {{{ HEIGHT }}};
}
container.style.width = canvas.style.width = w + "px";
container.style.height = canvas.style.height = h + "px";
container.style.top = Math.floor((window.innerHeight - h) / 2) + "px";
container.style.left = Math.floor((window.innerWidth - w) / 2) + "px";
}
createUnityInstance(canvas, config, progressHandler).then(function (instance) {
canvas = instance.Module.canvas;
onResize();
});
window.addEventListener('resize', onResize);
onResize();
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
const 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);
}
</script>
</div>
</body>
</html>
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d8e8dd66a912f614796f99466620f969
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 42d5536162b0eb5468173d96da115b36
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,2 @@
1.0.:
- zResponsive template for WebGL launches in the Unity Asset Store on May 2025!
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 5f57cfc0f85a7d948853e816bfed1ba3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 317535
packageName: zResponsive template for WebGL
packageVersion: 1.0.0
assetPath: Assets/WebGLTemplates/zResponsive/ChangeLog.txt
uploadId: 752965
@@ -0,0 +1,24 @@
-- zResponsive template for WebGL --
* DO NOT CHANGE THE TOOL PATH! -> Assets/WebGLTemplates/zResponsive
* HOW TO USE?
1º Go to Edit -> Project Settings -> Player.
2º Select 'Web Settings'. *You must have the 'WebGL Build Support' module installed in your Unity editor.
3º Expand 'Resolution and Presentation'.
4º Select 'zResponsive' option at 'WebGL Template' section.
5º Set properties with your custom values:
- Background: requires a color in RGBA format. For example white #FFFFFF -> https://imagecolorpicker.com/color-code/ffffff
- Optimize for pixel art: set true or false to optimize for pixel art.
- Scale to fit: set true or false to scale to fit.
* Thanks for use it, have an amazing day!
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 30fdb025d9a50b8448bfdbfe2b42ae90
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 317535
packageName: zResponsive template for WebGL
packageVersion: 1.0.0
assetPath: Assets/WebGLTemplates/zResponsive/Readme.txt
uploadId: 752965
@@ -0,0 +1,105 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{{{ PRODUCT_NAME }}}</title>
<style>
html, body {background:{{{ BACKGROUND || '#000' }}};width:100%;height:100%;overflow:visible;padding:0;margin:0;}
div#container {background:transparent !important;position:absolute;}
div#container canvas {position:absolute;}
div#container canvas[data-pixel-art="true"] {position:absolute;image-rendering:optimizeSpeed;image-rendering:-webkit-crisp-edges;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:crisp-edges;image-rendering:-webkit-optimize-contrast;image-rendering:optimize-contrast;image-rendering:pixelated;-ms-interpolation-mode:nearest-neighbor;}
</style>
</head>
<body>
<div id="container">
<canvas id="game-canvas" data-pixel-art="{{{ OPTIMIZE_FOR_PIXEL_ART }}}"></canvas>
<script src="Build/{{{ LOADER_FILENAME }}}"></script>
<script>
var canvas = document.querySelector("#game-canvas");
var config =
{
dataUrl: "Build/{{{ DATA_FILENAME }}}",
frameworkUrl: "Build/{{{ FRAMEWORK_FILENAME }}}",
codeUrl: "Build/{{{ CODE_FILENAME }}}",
#if MEMORY_FILENAME
memoryUrl: "Build/{{{ MEMORY_FILENAME }}}",
#endif
#if SYMBOLS_FILENAME
symbolsUrl: "Build/{{{ SYMBOLS_FILENAME }}}",
#endif
streamingAssetsUrl: "StreamingAssets",
companyName: "{{{ COMPANY_NAME }}}",
productName: "{{{ PRODUCT_NAME }}}",
productVersion: "{{{ PRODUCT_VERSION }}}",
};
var scaleToFit;
try
{
scaleToFit = !!JSON.parse("{{{ SCALE_TO_FIT }}}");
} catch (e) {
scaleToFit = true;
}
function progressHandler(progress)
{
var percent = progress * 100 + '%';
canvas.style.background = 'linear-gradient(to right, white, white ' + percent + ', transparent ' + percent + ', transparent) no-repeat center';
canvas.style.backgroundSize = '100% 1rem';
}
function onResize()
{
var container = canvas.parentElement;
var w;
var h;
if (scaleToFit)
{
w = window.innerWidth;
h = window.innerHeight;
var r = {{{ HEIGHT }}} / {{{ WIDTH }}};
if (w * r > window.innerHeight)
{
w = Math.min(w, Math.ceil(h / r));
}
h = Math.floor(w * r);
}
else
{
w = {{{ WIDTH }}};
h = {{{ HEIGHT }}};
}
container.style.width = canvas.style.width = w + "px";
container.style.height = canvas.style.height = h + "px";
container.style.top = Math.floor((window.innerHeight - h) / 2) + "px";
container.style.left = Math.floor((window.innerWidth - w) / 2) + "px";
}
createUnityInstance(canvas, config, progressHandler).then(function (instance)
{
canvas = instance.Module.canvas;
onResize();
});
window.addEventListener('resize', onResize);
onResize();
// Style for mobile devices.
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent))
{
// Fill the whole browser client area with the game canvas.
const 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);
}
</script>
</div>
</body>
</html>
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 6d64e7bc3de959c4abf1d416e612d6da
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 317535
packageName: zResponsive template for WebGL
packageVersion: 1.0.0
assetPath: Assets/WebGLTemplates/zResponsive/index.html
uploadId: 752965
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: b61bba61c0f6ad440a19bc857cef8293
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 317535
packageName: zResponsive template for WebGL
packageVersion: 1.0.0
assetPath: Assets/WebGLTemplates/zResponsive/thumbnail.png
uploadId: 752965