Disney Infinity 2.0 Game
About this app
A working official PC 3D real life graphics game of Disney Infinity 2.0
Disney Infinity 2.0 Game
Related apps
Put this on your site
Source
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Disney Infinity 2.0 Game</title>
<meta name="description" content="A working official PC 3D real life graphics game of Disney Infinity 2.0">
<meta name="keywords" content="Disney, Infinity, 2.0, game, PC, 3D, graphics">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
var isJumping = false;
var idleTimeout;
function jump() {
if (!isJumping) {
isJumping = true;
// Perform jump animation
$("#player").addClass("jump-animation");
// Wait for the animation to complete and then reset the jump state
setTimeout(function() {
$("#player").removeClass("jump-animation");
isJumping = false;
}, 1000);
}
}
function bellyFlop() {
if (!isJumping) {
isJumping = true;
// Perform belly flop animation
$("#player").addClass("belly-flop-animation");
// Wait for the animation to complete and then reset the jump state
setTimeout(function() {
$("#player").removeClass("belly-flop-animation");
isJumping = false;
}, 2000);
}
}
function idleAction() {
clearTimeout(idleTimeout);
// Perform idle action
$("#player").addClass("idle-animation");
// Wait for 30 seconds of idle time
idleTimeout = setTimeout(function() {
// Perform stretch back action
$("#player").removeClass("idle-animation");
$("#player").addClass("stretch-back-animation");
// Wait for the animation to complete and then reset the idle state
setTimeout(function() {
$("#player").removeClass("stretch-back-animation");
}, 1000);
}, 30000);
}
// Event listeners
$(document).keydown(function(e) {
if (e.keyCode == 32) { // Spacebar
if (isJumping) {
bellyFlop();
} else {
jump();
}
} else if (e.keyCode >= 37 && e.keyCode <= 40) { // Arrow keys
idleAction();
}
});
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
/* App CSS Goes Here */
body {
font-family: 'Roboto', sans-serif;
background-color: #f2f2f2;
}
#main-container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
#player {
width: 200px;
height: 200px;
background-color: #f9c922;
border-radius: 50%;
position: relative;
animation-duration: 1s;
animation-fill-mode: forwards;
}
.jump-animation {
animation-name: jump;
}
.belly-flop-animation {
animation-name: belly-flop;
}
.stretch-back-animation {
animation-name: stretch-back;
}
.idle-animation {
animation-name: idle;
}
.crack {
width: 50px;
height: 50px;
background-color: #000;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
animation-duration: 1s;
animation-fill-mode: forwards;
}
@keyframes jump {
0% {
top: 0;
}
50% {
top: -100px;
}
100% {
top: 0;
}
}
@keyframes belly-flop {
0% {
transform: rotate(0deg);
}
50% {
transform: rotate(180deg);
}
100% {
transform: rotate(0deg);
}
}
@keyframes stretch-back {
0% {
transform: scaleY(1);
}
50% {
transform: scaleY(0.8);
}
100% {
transform: scaleY(1);
}
}
@keyframes idle {
0% {
transform: rotate(0deg);
}
50% {
transform: rotate(10deg);
}
100% {
transform: rotate(0deg);
}
}
</style>
</head>
<body>
<div id="main-container" class="container">
<div id="player"></div>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!