Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Art/jasonjun122-3d-neon-cube/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>3D Neon Cube</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<div class="scene">
<div class="cube">
<div class="face front"></div>
<div class="face back"></div>
<div class="face right"></div>
<div class="face left"></div>
<div class="face top"></div>
<div class="face bottom"></div>
</div>
</div>
</body>
</html>
4 changes: 4 additions & 0 deletions Art/jasonjun122-3d-neon-cube/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"artName": "3d-neon-cube",
"githubHandle": "jasonjun1221"
}
74 changes: 74 additions & 0 deletions Art/jasonjun122-3d-neon-cube/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
height: 100vh;
background: radial-gradient(circle at center, #020617, #000);
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}

/* 3D scene */
.scene {
width: 300px;
height: 300px;
perspective: 900px;
}

/* Cube */
.cube {
width: 100%;
height: 100%;
position: relative;
transform-style: preserve-3d;
animation: spin 12s infinite linear;
}

/* Faces */
.face {
position: absolute;
width: 300px;
height: 300px;
background: linear-gradient(135deg, #22d3ee, #6366f1);
opacity: 0.85;
border: 2px solid rgba(56, 189, 248, 0.6);
box-shadow: 0 0 20px rgba(56, 189, 248, 0.8), inset 0 0 30px rgba(99, 102, 241, 0.9);
}

/* Position faces */
.front {
transform: translateZ(150px);
}
.back {
transform: rotateY(180deg) translateZ(150px);
}
.right {
transform: rotateY(90deg) translateZ(150px);
}
.left {
transform: rotateY(-90deg) translateZ(150px);
}
.top {
transform: rotateX(90deg) translateZ(150px);
}
.bottom {
transform: rotateX(-90deg) translateZ(150px);
}

/* Rotation animation */
@keyframes spin {
0% {
transform: rotateX(0deg) rotateY(0deg);
}
50% {
transform: rotateX(180deg) rotateY(180deg);
}
100% {
transform: rotateX(360deg) rotateY(360deg);
}
}