Cosmic Crane -WIP
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 - 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;
};
Developer | David Bellotti |
Username | dbellotti |
Uploaded | October 30, 2022 |
Rating | 3 |
Size | 3,578 Kb |
Views | 8,096 |
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!
Name | Size |
Centered Box | 1,893 Kb |
Material Floating Input Label | 2,915 Kb |
Rogue NASA | 2,278 Kb |
Star Power | 2,438 Kb |
Galaxy | 2,889 Kb |
Chromatic Depth | 2,301 Kb |
CreativeBrains play | 4,188 Kb |
Arora | 10,447 Kb |
Solar System - WIP | 3,510 Kb |
Fab menu v1 | 3,487 Kb |
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!
Name | Username | Size |
RWD- Mostly Fluid Layout Pattern | Marcocastro | 2,312 Kb |
Drag in vanilla js using dotval math instead of translate | Paulq | 2,662 Kb |
Fellowship of the Ring | Aussieyang | 2,639 Kb |
Weird glowy CSS3 game | Toneworm | 3,684 Kb |
Awesome textarea | Ayoungh | 1,977 Kb |
Day 11 - Calendar Card | Arnellebalane | 6,984 Kb |
Experiment | Toddmoy | 2,849 Kb |
SVG Icons Template | Legofsalmon | 2,618 Kb |
Base-Style | Daniel_gooss | 2,614 Kb |
SCSS Unit Conversion | Jakob-e | 8,210 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!