Cosmic Crane -WIP

Size
3,578 Kb
Views
8,096

How do I make an cosmic crane -wip?

What is a cosmic crane -wip? How do you make a cosmic crane -wip? This script and codes were developed by David Bellotti on 30 October 2022, Sunday.

Cosmic Crane -WIP Previews

Cosmic Crane -WIP - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Cosmic Crane -WIP</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="cosmos"> <div class="controls"> <label for="x-axis">X</label><input id="x-axis" max="360" min="0" type="range" value="0" /><label for="y-axis">Y</label><input id="y-axis" max="360" min="0" type="range" value="0" /> </div> <div class="controls"> <button class="start">start</button><button class="fold-1">fold 1</button> </div> <div class="crane"> <div class="triangle"></div> <div class="triangle"></div> <div class="triangle"></div> <div class="triangle"></div> <div class="triangle"></div> <div class="triangle"></div> <div class="triangle"></div> <div class="triangle"></div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Cosmic Crane -WIP - Script Codes CSS Codes

.crane { height: 400px; width: 600px; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; -webkit-transform-origin: center; transform-origin: center;
}
.crane .triangle { -webkit-transition: all 10s ease; transition: all 10s ease; position: absolute; width: 0; height: 0; border-top: 100px solid transparent; border-bottom: 100px solid transparent;
}
.crane .triangle:nth-of-type(1) { border-left: 100px solid rgba(156, 0, 235, 0.7);
}
.crane .triangle:nth-of-type(2) { border-left: 100px solid rgba(143, 0, 214, 0.7);
}
.crane .triangle:nth-of-type(3) { border-left: 100px solid rgba(129, 0, 194, 0.7);
}
.crane .triangle:nth-of-type(4) { border-left: 100px solid rgba(116, 0, 173, 0.7);
}
.crane .triangle:nth-of-type(5) { border-left: 100px solid rgba(102, 0, 153, 0.7);
}
.crane .triangle:nth-of-type(6) { border-left: 100px solid rgba(88, 0, 133, 0.7);
}
.crane .triangle:nth-of-type(7) { border-left: 100px solid rgba(75, 0, 112, 0.7);
}
.crane .triangle:nth-of-type(8) { border-left: 100px solid rgba(61, 0, 92, 0.7);
}
.crane .triangle:nth-of-type(1) { -webkit-transform: translate3d(300px, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg); transform: translate3d(300px, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
}
.crane .triangle:nth-of-type(2) { -webkit-transform: translate3d(200px, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(180deg); transform: translate3d(200px, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(180deg);
}
.crane .triangle:nth-of-type(3) { -webkit-transform: translate3d(150px, 50px, 0) rotateX(0deg) rotateY(0deg) rotateZ(-90deg); transform: translate3d(150px, 50px, 0) rotateX(0deg) rotateY(0deg) rotateZ(-90deg);
}
.crane .triangle:nth-of-type(4) { -webkit-transform: translate3d(150px, 150px, 0) rotateX(0deg) rotateY(0deg) rotateZ(90deg); transform: translate3d(150px, 150px, 0) rotateX(0deg) rotateY(0deg) rotateZ(90deg);
}
.crane .triangle:nth-of-type(5) { -webkit-transform: translate3d(200px, 200px, 0) rotateX(0deg) rotateY(0deg) rotateZ(180deg); transform: translate3d(200px, 200px, 0) rotateX(0deg) rotateY(0deg) rotateZ(180deg);
}
.crane .triangle:nth-of-type(6) { -webkit-transform: translate3d(300px, 200px, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg); transform: translate3d(300px, 200px, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
}
.crane .triangle:nth-of-type(7) { -webkit-transform: translate3d(350px, 150px, 0) rotateX(0deg) rotateY(0deg) rotateZ(90deg); transform: translate3d(350px, 150px, 0) rotateX(0deg) rotateY(0deg) rotateZ(90deg);
}
.crane .triangle:nth-of-type(8) { -webkit-transform: translate3d(350px, 50px, 0) rotateX(0deg) rotateY(0deg) rotateZ(-90deg); transform: translate3d(350px, 50px, 0) rotateX(0deg) rotateY(0deg) rotateZ(-90deg);
}
.crane .triangle.fold-1:nth-of-type(1) { -webkit-transform: translate3d(300px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(0deg); transform: translate3d(300px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(0deg);
}
.crane .triangle.fold-1:nth-of-type(2) { -webkit-transform: translate3d(200px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(180deg); transform: translate3d(200px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(180deg);
}
.crane .triangle.fold-1:nth-of-type(3) { -webkit-transform: translate3d(200px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(-180deg); transform: translate3d(200px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(-180deg);
}
.crane .triangle.fold-1:nth-of-type(4) { -webkit-transform: translate3d(200px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(180deg); transform: translate3d(200px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(180deg);
}
.crane .triangle.fold-1:nth-of-type(5) { -webkit-transform: translate3d(200px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(180deg); transform: translate3d(200px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(180deg);
}
.crane .triangle.fold-1:nth-of-type(6) { -webkit-transform: translate3d(300px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(0deg); transform: translate3d(300px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(0deg);
}
.crane .triangle.fold-1:nth-of-type(7) { -webkit-transform: translate3d(300px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(0deg); transform: translate3d(300px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(0deg);
}
.crane .triangle.fold-1:nth-of-type(8) { -webkit-transform: translate3d(300px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(0deg); transform: translate3d(300px, 100px, 0) rotateX(-90deg) rotateY(0deg) rotateZ(0deg);
}
.controls { position: relative; top: 20px; left: 150px; margin-bottom: 60px;
}
label { color: rgba(170, 0, 255, 0.7);
}
input[type="range"] { display: block; width: 300px; margin-bottom: 10px;
}
.cosmos { position: absolute; top: 0; bottom: 0; right: 0; left: 0; overflow: hidden;
}
body { background-color: black;
}

Cosmic Crane -WIP - Script Codes JS Codes

$('.start').on('click', function() { $('.triangle').removeClass('fold-1'); });
$('.fold-1').on('click', function() { $('.triangle').addClass('fold-1'); });
var rotation = { x: 0, y: 0 };
$('input#x-axis').on('change mousemove', function() { rotateCrane(this.value, rotation.y);
});
$('input#y-axis').on('change mousemove', function() { rotateCrane(rotation.x, this.value);
});
var rotateCrane = function(x, y) { $('.crane').css({ transform: 'rotateX('+ x +'deg) rotateY('+ y +'deg)' }); rotation.x = x; rotation.y = y;
};
Cosmic Crane -WIP - Script Codes
Cosmic Crane -WIP - Script Codes
Home Page Home
Developer David Bellotti
Username dbellotti
Uploaded October 30, 2022
Rating 3
Size 3,578 Kb
Views 8,096
Do you need developer help for Cosmic Crane -WIP?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

David Bellotti (dbellotti) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!