Spaces:
Running
Running
<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>Pj - 2D-to-3D</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> | |
// ... (Tu código JavaScript existente está aquí) ... | |
</script> | |
<!-- Aquí es donde hemos insertado el nuevo script --> | |
<script type="text/javascript"> | |
function readFromClipboard() { | |
navigator.clipboard.readText().then( | |
function (text) { | |
if (typeof UnityInstance !== 'undefined') { | |
UnityInstance.SendMessage('ClipboardManager', 'OnTextPasted', text); | |
} | |
}, | |
function (err) { | |
console.error('Error al leer del portapapeles: ', err); | |
} | |
); | |
} | |
</script> | |
</body> | |
</html> |