Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>BrickVault - Premium Lego Minifigure Marketplace</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script> | |
| <style> | |
| :root { | |
| --primary: #ff6b00; | |
| --primary-dark: #e55e00; | |
| --secondary: #1a1a2e; | |
| --accent: #00c896; | |
| --light: #f8f9fa; | |
| --dark: #212529; | |
| --gray: #6c757d; | |
| --border-radius: 12px; | |
| --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); | |
| --transition: all 0.3s ease; | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| } | |
| body { | |
| background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%); | |
| color: var(--dark); | |
| line-height: 1.6; | |
| } | |
| .container { | |
| width: 100%; | |
| max-width: 1400px; | |
| margin: 0 auto; | |
| padding: 0 20px; | |
| } | |
| /* Header Styles */ | |
| header { | |
| background: rgba(255, 255, 255, 0.95); | |
| box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1); | |
| position: sticky; | |
| top: 0; | |
| z-index: 1000; | |
| backdrop-filter: blur(10px); | |
| } | |
| .navbar { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: 20px 0; | |
| } | |
| .logo { | |
| display: flex; | |
| align-items: center; | |
| gap: 12px; | |
| font-size: 1.8rem; | |
| font-weight: 800; | |
| color: var(--primary); | |
| text-decoration: none; | |
| } | |
| .logo i { | |
| font-size: 2.2rem; | |
| } | |
| .nav-links { | |
| display: flex; | |
| gap: 30px; | |
| } | |
| .nav-links a { | |
| text-decoration: none; | |
| color: var(--dark); | |
| font-weight: 600; | |
| transition: var(--transition); | |
| position: relative; | |
| } | |
| .nav-links a:hover { | |
| color: var(--primary); | |
| } | |
| .nav-links a::after { | |
| content: ''; | |
| position: absolute; | |
| bottom: -5px; | |
| left: 0; | |
| width: 0; | |
| height: 3px; | |
| background: var(--primary); | |
| transition: var(--transition); | |
| } | |
| .nav-links a:hover::after { | |
| width: 100%; | |
| } | |
| .nav-buttons { | |
| display: flex; | |
| gap: 15px; | |
| align-items: center; | |
| } | |
| .btn { | |
| padding: 12px 24px; | |
| border-radius: var(--border-radius); | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| border: none; | |
| font-size: 1rem; | |
| } | |
| .btn-primary { | |
| background: var(--primary); | |
| color: white; | |
| } | |
| .btn-primary:hover { | |
| background: var(--primary-dark); | |
| transform: translateY(-2px); | |
| box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3); | |
| } | |
| .btn-outline { | |
| background: transparent; | |
| border: 2px solid var(--primary); | |
| color: var(--primary); | |
| } | |
| .btn-outline:hover { | |
| background: var(--primary); | |
| color: white; | |
| } | |
| /* Hero Section */ | |
| .hero { | |
| padding: 80px 0; | |
| display: flex; | |
| align-items: center; | |
| gap: 50px; | |
| } | |
| .hero-content { | |
| flex: 1; | |
| } | |
| .hero h1 { | |
| font-size: 3.5rem; | |
| line-height: 1.2; | |
| margin-bottom: 20px; | |
| background: linear-gradient(90deg, var(--primary), var(--accent)); | |
| -webkit-background-clip: text; | |
| background-clip: text; | |
| color: transparent; | |
| } | |
| .hero p { | |
| font-size: 1.2rem; | |
| color: var(--gray); | |
| margin-bottom: 30px; | |
| max-width: 600px; | |
| } | |
| .hero-image { | |
| flex: 1; | |
| display: flex; | |
| justify-content: center; | |
| position: relative; | |
| } | |
| .hero-image::before { | |
| content: ''; | |
| position: absolute; | |
| width: 300px; | |
| height: 300px; | |
| border-radius: 50%; | |
| background: linear-gradient(135deg, var(--primary), var(--accent)); | |
| filter: blur(80px); | |
| opacity: 0.3; | |
| z-index: -1; | |
| } | |
| .hero-model { | |
| width: 100%; | |
| height: 400px; | |
| background: rgba(255, 255, 255, 0.2); | |
| border-radius: var(--border-radius); | |
| box-shadow: var(--box-shadow); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| overflow: hidden; | |
| } | |
| /* Features Section */ | |
| .features { | |
| padding: 100px 0; | |
| background: white; | |
| } | |
| .section-title { | |
| text-align: center; | |
| margin-bottom: 60px; | |
| } | |
| .section-title h2 { | |
| font-size: 2.5rem; | |
| margin-bottom: 15px; | |
| color: var(--secondary); | |
| } | |
| .section-title p { | |
| color: var(--gray); | |
| max-width: 700px; | |
| margin: 0 auto; | |
| font-size: 1.1rem; | |
| } | |
| .features-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |
| gap: 30px; | |
| } | |
| .feature-card { | |
| background: white; | |
| border-radius: var(--border-radius); | |
| padding: 30px; | |
| box-shadow: var(--box-shadow); | |
| transition: var(--transition); | |
| text-align: center; | |
| } | |
| .feature-card:hover { | |
| transform: translateY(-10px); | |
| box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15); | |
| } | |
| .feature-icon { | |
| width: 80px; | |
| height: 80px; | |
| background: linear-gradient(135deg, var(--primary), var(--accent)); | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| margin: 0 auto 20px; | |
| color: white; | |
| font-size: 2rem; | |
| } | |
| .feature-card h3 { | |
| font-size: 1.5rem; | |
| margin-bottom: 15px; | |
| color: var(--secondary); | |
| } | |
| /* Marketplace Section */ | |
| .marketplace { | |
| padding: 100px 0; | |
| } | |
| .marketplace-header { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| margin-bottom: 40px; | |
| } | |
| .search-bar { | |
| display: flex; | |
| width: 100%; | |
| max-width: 500px; | |
| background: white; | |
| border-radius: 50px; | |
| overflow: hidden; | |
| box-shadow: var(--box-shadow); | |
| } | |
| .search-bar input { | |
| flex: 1; | |
| padding: 15px 25px; | |
| border: none; | |
| outline: none; | |
| font-size: 1rem; | |
| } | |
| .search-bar button { | |
| padding: 15px 25px; | |
| background: var(--primary); | |
| color: white; | |
| border: none; | |
| cursor: pointer; | |
| font-weight: 600; | |
| } | |
| .filters { | |
| display: flex; | |
| gap: 15px; | |
| flex-wrap: wrap; | |
| } | |
| .filter-btn { | |
| padding: 10px 20px; | |
| background: white; | |
| border: 1px solid #e0e0e0; | |
| border-radius: 50px; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| } | |
| .filter-btn.active, .filter-btn:hover { | |
| background: var(--primary); | |
| color: white; | |
| border-color: var(--primary); | |
| } | |
| .listings-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); | |
| gap: 30px; | |
| } | |
| .listing-card { | |
| background: white; | |
| border-radius: var(--border-radius); | |
| overflow: hidden; | |
| box-shadow: var(--box-shadow); | |
| transition: var(--transition); | |
| } | |
| .listing-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15); | |
| } | |
| .card-model { | |
| height: 200px; | |
| background: #f0f4f8; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .card-model canvas { | |
| width: 100%; | |
| height: 100%; | |
| } | |
| .card-content { | |
| padding: 20px; | |
| } | |
| .card-content h3 { | |
| font-size: 1.3rem; | |
| margin-bottom: 10px; | |
| } | |
| .card-content p { | |
| color: var(--gray); | |
| font-size: 0.9rem; | |
| margin-bottom: 15px; | |
| } | |
| .price { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .price span { | |
| font-weight: 700; | |
| font-size: 1.4rem; | |
| color: var(--primary); | |
| } | |
| .bid-btn { | |
| padding: 8px 15px; | |
| background: var(--primary); | |
| color: white; | |
| border: none; | |
| border-radius: 5px; | |
| cursor: pointer; | |
| font-weight: 600; | |
| transition: var(--transition); | |
| } | |
| .bid-btn:hover { | |
| background: var(--primary-dark); | |
| } | |
| /* Vault Section */ | |
| .vault { | |
| padding: 100px 0; | |
| background: linear-gradient(135deg, var(--secondary) 0%, #2d2d4d 100%); | |
| color: white; | |
| } | |
| .vault .section-title h2 { | |
| color: white; | |
| } | |
| .vault .section-title p { | |
| color: rgba(255, 255, 255, 0.7); | |
| } | |
| .vault-stats { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); | |
| gap: 30px; | |
| margin-bottom: 50px; | |
| } | |
| .stat-card { | |
| background: rgba(255, 255, 255, 0.1); | |
| border-radius: var(--border-radius); | |
| padding: 30px; | |
| text-align: center; | |
| backdrop-filter: blur(10px); | |
| } | |
| .stat-card h3 { | |
| font-size: 2.5rem; | |
| margin-bottom: 10px; | |
| color: var(--accent); | |
| } | |
| .stat-card p { | |
| color: rgba(255, 255, 255, 0.7); | |
| } | |
| .vault-features { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |
| gap: 30px; | |
| } | |
| .vault-feature { | |
| background: rgba(255, 255, 255, 0.05); | |
| border-radius: var(--border-radius); | |
| padding: 30px; | |
| transition: var(--transition); | |
| } | |
| .vault-feature:hover { | |
| background: rgba(255, 255, 255, 0.1); | |
| transform: translateY(-5px); | |
| } | |
| .vault-feature h3 { | |
| font-size: 1.5rem; | |
| margin-bottom: 15px; | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| } | |
| .vault-feature h3 i { | |
| color: var(--accent); | |
| } | |
| /* Footer */ | |
| footer { | |
| background: var(--secondary); | |
| color: white; | |
| padding: 70px 0 30px; | |
| } | |
| .footer-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); | |
| gap: 40px; | |
| margin-bottom: 50px; | |
| } | |
| .footer-column h3 { | |
| font-size: 1.3rem; | |
| margin-bottom: 20px; | |
| position: relative; | |
| padding-bottom: 10px; | |
| } | |
| .footer-column h3::after { | |
| content: ''; | |
| position: absolute; | |
| bottom: 0; | |
| left: 0; | |
| width: 50px; | |
| height: 3px; | |
| background: var(--primary); | |
| } | |
| .footer-column p { | |
| color: rgba(255, 255, 255, 0.7); | |
| margin-bottom: 20px; | |
| } | |
| .footer-links { | |
| list-style: none; | |
| } | |
| .footer-links li { | |
| margin-bottom: 12px; | |
| } | |
| .footer-links a { | |
| color: rgba(255, 255, 255, 0.7); | |
| text-decoration: none; | |
| transition: var(--transition); | |
| } | |
| .footer-links a:hover { | |
| color: var(--primary); | |
| padding-left: 5px; | |
| } | |
| .social-links { | |
| display: flex; | |
| gap: 15px; | |
| margin-top: 20px; | |
| } | |
| .social-links a { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| width: 40px; | |
| height: 40px; | |
| background: rgba(255, 255, 255, 0.1); | |
| border-radius: 50%; | |
| color: white; | |
| transition: var(--transition); | |
| } | |
| .social-links a:hover { | |
| background: var(--primary); | |
| transform: translateY(-3px); | |
| } | |
| .copyright { | |
| text-align: center; | |
| padding-top: 30px; | |
| border-top: 1px solid rgba(255, 255, 255, 0.1); | |
| color: rgba(255, 255, 255, 0.5); | |
| font-size: 0.9rem; | |
| } | |
| /* Responsive Design */ | |
| @media (max-width: 992px) { | |
| .hero { | |
| flex-direction: column; | |
| text-align: center; | |
| } | |
| .hero-content { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| } | |
| .hero p { | |
| text-align: center; | |
| } | |
| .marketplace-header { | |
| flex-direction: column; | |
| gap: 20px; | |
| } | |
| } | |
| @media (max-width: 768px) { | |
| .navbar { | |
| flex-direction: column; | |
| gap: 20px; | |
| } | |
| .nav-links { | |
| flex-wrap: wrap; | |
| justify-content: center; | |
| } | |
| .hero h1 { | |
| font-size: 2.5rem; | |
| } | |
| .section-title h2 { | |
| font-size: 2rem; | |
| } | |
| } | |
| @media (max-width: 576px) { | |
| .nav-buttons { | |
| flex-wrap: wrap; | |
| justify-content: center; | |
| } | |
| .hero h1 { | |
| font-size: 2rem; | |
| } | |
| .search-bar { | |
| flex-direction: column; | |
| border-radius: var(--border-radius); | |
| } | |
| .search-bar input, .search-bar button { | |
| width: 100%; | |
| border-radius: 0; | |
| } | |
| .search-bar button { | |
| border-radius: 0 0 var(--border-radius) var(--border-radius); | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <!-- Header --> | |
| <header> | |
| <div class="container"> | |
| <nav class="navbar"> | |
| <a href="#" class="logo"> | |
| <i class="fas fa-cube"></i> | |
| BrickVault | |
| </a> | |
| <div class="nav-links"> | |
| <a href="#">Marketplace</a> | |
| <a href="#">Vault</a> | |
| <a href="#">Portfolio</a> | |
| <a href="#">Community</a> | |
| </div> | |
| <div class="nav-buttons"> | |
| <button class="btn btn-outline">Sign In</button> | |
| <button class="btn btn-primary">Register</button> | |
| </div> | |
| </nav> | |
| </div> | |
| </header> | |
| <!-- Hero Section --> | |
| <section class="hero"> | |
| <div class="container"> | |
| <div class="hero-content"> | |
| <h1>Premium Lego Minifigures Marketplace</h1> | |
| <p>Buy, sell, and trade rare Lego minifigures with 3D visualization, authentication, and secure vault storage. Invest in collectibles like never before.</p> | |
| <div class="hero-buttons"> | |
| <button class="btn btn-primary">Explore Marketplace</button> | |
| <button class="btn btn-outline">Learn More</button> | |
| </div> | |
| </div> | |
| <div class="hero-image"> | |
| <div class="hero-model" id="hero-model"> | |
| <canvas id="hero-canvas"></canvas> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Features Section --> | |
| <section class="features"> | |
| <div class="container"> | |
| <div class="section-title"> | |
| <h2>Revolutionary Lego Trading Experience</h2> | |
| <p>Our platform combines cutting-edge technology with the passion for Lego collecting to create the ultimate marketplace.</p> | |
| </div> | |
| <div class="features-grid"> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-cube"></i> | |
| </div> | |
| <h3>3D Visualization</h3> | |
| <p>Inspect every detail of minifigures with our advanced 3D viewer. Rotate, zoom, and examine for authenticity.</p> | |
| </div> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-shield-alt"></i> | |
| </div> | |
| <h3>Authentication</h3> | |
| <p>Every item is verified by experts to ensure authenticity and condition before listing.</p> | |
| </div> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-vault"></i> | |
| </div> | |
| <h3>Secure Vault Storage</h3> | |
| <p>Store your valuable minifigures in our secure facility with insurance coverage.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Marketplace Section --> | |
| <section class="marketplace"> | |
| <div class="container"> | |
| <div class="marketplace-header"> | |
| <h2>Featured Minifigures</h2> | |
| <div class="search-bar"> | |
| <input type="text" placeholder="Search minifigures..."> | |
| <button><i class="fas fa-search"></i></button> | |
| </div> | |
| </div> | |
| <div class="filters"> | |
| <button class="filter-btn active">All</button> | |
| <button class="filter-btn">Star Wars</button> | |
| <button class="filter-btn">Marvel</button> | |
| <button class="filter-btn">DC</button> | |
| <button class="filter-btn">Harry Potter</button> | |
| <button class="filter-btn">Exclusive</button> | |
| </div> | |
| <div class="listings-grid"> | |
| <div class="listing-card"> | |
| <div class="card-model" id="model1"> | |
| <canvas class="model-canvas"></canvas> | |
| </div> | |
| <div class="card-content"> | |
| <h3>Gold C-3PO</h3> | |
| <p>Star Wars Episode IV-VI</p> | |
| <div class="price"> | |
| <span>$2,450</span> | |
| <button class="bid-btn">Bid Now</button> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="listing-card"> | |
| <div class="card-model" id="model2"> | |
| <canvas class="model-canvas"></canvas> | |
| </div> | |
| <div class="card-content"> | |
| <h3>Chrome Batman</h3> | |
| <p>Batman Movie Exclusive</p> | |
| <div class="price"> | |
| <span>$1,890</span> | |
| <button class="bid-btn">Bid Now</button> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="listing-card"> | |
| <div class="card-model" id="model3"> | |
| <canvas class="model-canvas"></canvas> | |
| </div> | |
| <div class="card-content"> | |
| <h3>Holographic Superman</h3> | |
| <p>Justice League Limited</p> | |
| <div class="price"> | |
| <span>$3,200</span> | |
| <button class="bid-btn">Bid Now</button> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="listing-card"> | |
| <div class="card-model" id="model4"> | |
| <canvas class="model-canvas"></canvas> | |
| </div> | |
| <div class="card-content"> | |
| <h3>Ghost Vader</h3> | |
| <p>Star Wars Episode III</p> | |
| <div class="price"> | |
| <span>$1,650</span> | |
| <button class="bid-btn">Bid Now</button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Vault Section --> | |
| <section class="vault"> | |
| <div class="container"> | |
| <div class="section-title"> | |
| <h2>BrickVault Storage & Trading</h2> | |
| <p>Store your valuable minifigures in our secure facility and trade them like ETFs</p> | |
| </div> | |
| <div class="vault-stats"> | |
| <div class="stat-card"> | |
| <h3>$12.4M</h3> | |
| <p>Assets Under Management</p> | |
| </div> | |
| <div class="stat-card"> | |
| <h3>15,800+</h3> | |
| <p>Items in Storage</p> | |
| </div> | |
| <div class="stat-card"> | |
| <h3>99.9%</h3> | |
| <p>Authentication Accuracy</p> | |
| </div> | |
| <div class="stat-card"> | |
| <h3>24/7</h3> | |
| <p>Security Monitoring</p> | |
| </div> | |
| </div> | |
| <div class="vault-features"> | |
| <div class="vault-feature"> | |
| <h3><i class="fas fa-warehouse"></i> Secure Storage</h3> | |
| <p>State-of-the-art facilities with climate control, 24/7 surveillance, and insurance coverage up to $100,000 per item.</p> | |
| </div> | |
| <div class="vault-feature"> | |
| <h3><i class="fas fa-chart-line"></i> ETF Trading</h3> | |
| <p>Trade fractional ownership of rare minifigures through our digital asset platform with real-time pricing.</p> | |
| </div> | |
| <div class="vault-feature"> | |
| <h3><i class="fas fa-passport"></i> Authentication</h3> | |
| <p>Each item undergoes rigorous authentication by our expert team with detailed condition reports.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Footer --> | |
| <footer> | |
| <div class="container"> | |
| <div class="footer-grid"> | |
| <div class="footer-column"> | |
| <h3>BrickVault</h3> | |
| <p>The premier marketplace for rare and valuable Lego minifigures with secure storage and trading capabilities.</p> | |
| <div class="social-links"> | |
| <a href="#"><i class="fab fa-facebook-f"></i></a> | |
| <a href="#"><i class="fab fa-twitter"></i></a> | |
| <a href="#"><i class="fab fa-instagram"></i></a> | |
| <a href="#"><i class="fab fa-linkedin-in"></i></a> | |
| </div> | |
| </div> | |
| <div class="footer-column"> | |
| <h3>Marketplace</h3> | |
| <ul class="footer-links"> | |
| <li><a href="#">Browse Minifigures</a></li> | |
| <li><a href="#">How It Works</a></li> | |
| <li><a href="#">Selling Guide</a></li> | |
| <li><a href="#">Authentication</a></li> | |
| <li><a href="#">Pricing</a></li> | |
| </ul> | |
| </div> | |
| <div class="footer-column"> | |
| <h3>Vault Services</h3> | |
| <ul class="footer-links"> | |
| <li><a href="#">Storage Options</a></li> | |
| <li><a href="#">ETF Trading</a></li> | |
| <li><a href="#">Insurance</a></li> | |
| <li><a href="#">Withdrawals</a></li> | |
| <li><a href="#">Security</a></li> | |
| </ul> | |
| </div> | |
| <div class="footer-column"> | |
| <h3>Support</h3> | |
| <ul class="footer-links"> | |
| <li><a href="#">Help Center</a></li> | |
| <li><a href="#">Contact Us</a></li> | |
| <li><a href="#">Community</a></li> | |
| <li><a href="#">Blog</a></li> | |
| <li><a href="#">Careers</a></li> | |
| </ul> | |
| </div> | |
| </div> | |
| <div class="copyright"> | |
| <p>© 2023 BrickVault. All rights reserved. Lego is a trademark of the Lego Group.</p> | |
| </div> | |
| </div> | |
| </footer> | |
| <script> | |
| // Initialize Three.js for 3D models | |
| function init3D(canvasId, modelData) { | |
| const canvas = document.getElementById(canvasId); | |
| const scene = new THREE.Scene(); | |
| const camera = new THREE.PerspectiveCamera(75, canvas.clientWidth / canvas.clientHeight, 0.1, 1000); | |
| const renderer = new THREE.WebGLRenderer({ | |
| canvas: canvas, | |
| alpha: true, | |
| antialias: true | |
| }); | |
| renderer.setSize(canvas.clientWidth, canvas.clientHeight); | |
| renderer.setClearColor(0x000000, 0); | |
| // Add lighting | |
| const ambientLight = new THREE.AmbientLight(0xffffff, 0.6); | |
| scene.add(ambientLight); | |
| const directionalLight = new THREE.DirectionalLight(0xffffff, 0.8); | |
| directionalLight.position.set(1, 1, 1); | |
| scene.add(directionalLight); | |
| // Create a simple cube to represent the minifigure | |
| const geometry = new THREE.BoxGeometry(1, 2, 0.5); | |
| const material = new THREE.MeshPhongMaterial({ | |
| color: modelData.color, | |
| shininess: 30 | |
| }); | |
| const cube = new THREE.Mesh(geometry, material); | |
| scene.add(cube); | |
| // Position camera | |
| camera.position.z = 3; | |
| // Add rotation animation | |
| function animate() { | |
| requestAnimationFrame(animate); | |
| cube.rotation.x += 0.01; | |
| cube.rotation.y += 0.01; | |
| renderer.render(scene, camera); | |
| } | |
| animate(); | |
| // Handle window resize | |
| window.addEventListener('resize', () => { | |
| camera.aspect = canvas.clientWidth / canvas.clientHeight; | |
| camera.updateProjectionMatrix(); | |
| renderer.setSize(canvas.clientWidth, canvas.clientHeight); | |
| }); | |
| } | |
| // Initialize hero model | |
| init3D('hero-canvas', { color: 0xff6b00 }); | |
| // Initialize listing models | |
| init3D('model1', { color: 0xffd700 }); // Gold | |
| init3D('model2', { color: 0x1e90ff }); // Blue | |
| init3D('model3', { color: 0x00bfff }); // Light Blue | |
| init3D('model4', { color: 0x2f4f4f }); // Dark Gray | |
| // Filter button functionality | |
| const filterButtons = document.querySelectorAll('.filter-btn'); | |
| filterButtons.forEach(button => { | |
| button.addEventListener('click', () => { | |
| filterButtons.forEach(btn => btn.classList.remove('active')); | |
| button.classList.add('active'); | |
| }); | |
| }); | |
| // Smooth scrolling for navigation | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function(e) { | |
| e.preventDefault(); | |
| document.querySelector(this.getAttribute('href')).scrollIntoView({ | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| }); | |
| </script> | |
| </body> | |
| </html> |