Skip to content

Replace static frontend logo with rotating preloaded 3D GLB logo - #5

Merged
AtharvM02222 merged 1 commit into
mainfrom
copilot/replace-logo-with-3d-model
Jul 8, 2026
Merged

Replace static frontend logo with rotating preloaded 3D GLB logo#5
AtharvM02222 merged 1 commit into
mainfrom
copilot/replace-logo-with-3d-model

Conversation

Copilot AI commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

The registration frontend used a static image logo; this updates it to render the provided 3D GLB logo with a visible loading state and continuous rotation. The change keeps the existing page structure while upgrading only the logo surface.

  • 3D logo integration

    • Replaced the <img> logo block in Front-end/register.html with <model-viewer> pointing to the Cloudinary GLB asset.
    • Added the @google/model-viewer module script for runtime rendering.
  • Preload + loading UX

    • Added preconnect and preload hints for the GLB URL to reduce initial fetch latency.
    • Added a lightweight loader overlay (Loading 3D logo...) shown until the model finishes loading.
  • Motion and runtime behavior

    • Enabled continuous spin via auto-rotate, immediate start via auto-rotate-delay="0", and tuned speed with rotation-per-second.
    • Added load/error event handling in Front-end/index.js to hide the loader on success and show a fallback message on failure.
  • Styling updates

    • Added dedicated styles in Front-end/style.css for the 3D logo container, loader overlay, and model fade-in once ready.
<model-viewer
  id="logo3d"
  src="https://res.cloudinary.com/drqqqhudz/image/upload/v1783427413/logo-optimized_evx5on.glb"
  auto-rotate
  auto-rotate-delay="0"
  rotation-per-second="25deg"
  loading="eager"
></model-viewer>

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
robotronics Ready Ready Preview, Comment Jul 8, 2026 11:28am

@AtharvM02222
AtharvM02222 marked this pull request as ready for review July 8, 2026 11:28
Copilot AI review requested due to automatic review settings July 8, 2026 11:28
@AtharvM02222
AtharvM02222 merged commit 1a26cdf into main Jul 8, 2026
2 checks passed
@AtharvM02222
AtharvM02222 deleted the copilot/replace-logo-with-3d-model branch July 8, 2026 11:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the registration page’s branding from a static image to an embedded 3D GLB logo rendered via <model-viewer>, adding preload hints, a loader overlay, and runtime handling for load/error states while keeping the existing registration form structure intact.

Changes:

  • Replaces the <img> logo in Front-end/register.html with a <model-viewer> pointing at the Cloudinary GLB and adds preload/preconnect hints.
  • Adds a loading overlay and fade-in behavior for the 3D logo via new styles in Front-end/style.css.
  • Adds JS event handling in Front-end/index.js to hide the loader on successful model load and show an error message on failure.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
Front-end/register.html Swaps the logo markup to <model-viewer>, adds resource hints, loader element, and loads the model-viewer runtime.
Front-end/index.js Adds load/error handlers to control the loader overlay and model visibility.
Front-end/style.css Introduces layout + loader overlay styling and model fade-in once ready.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Front-end/register.html
<title>Robotronics Registration</title>
<link rel="icon" type="image/png" href="/favicon.png" />
<link rel="icon" type="image/webp" href="/logo.webp" />
<link rel="preconnect" href="https://res.cloudinary.com" />
Comment thread Front-end/register.html
Comment on lines +10 to +15
<link
rel="preload"
href="https://res.cloudinary.com/drqqqhudz/image/upload/v1783427413/logo-optimized_evx5on.glb"
as="fetch"
crossorigin="anonymous"
/>
Comment thread Front-end/register.html
style="max-width: 200px; height: auto"
/>
<div class="logo-3d-wrap">
<div class="logo-loader" id="logoLoader">Loading 3D logo...</div>
Comment thread Front-end/register.html
Comment on lines +37 to +40
<script
type="module"
src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"
></script>
Comment thread Front-end/index.js
Comment on lines +5 to +18
document.addEventListener('DOMContentLoaded', () => {
const logoModel = document.getElementById('logo3d');
const logoLoader = document.getElementById('logoLoader');
if (!logoModel || !logoLoader) return;

logoModel.addEventListener('load', () => {
logoModel.classList.add('is-ready');
logoLoader.style.display = 'none';
}, { once: true });

logoModel.addEventListener('error', () => {
logoLoader.textContent = '3D logo failed to load';
}, { once: true });
});
Comment thread Front-end/style.css
Comment on lines +32 to +40
model-viewer {
width: 100%;
height: 100%;
opacity: 0;
transition: opacity 0.3s ease;
}
model-viewer.is-ready {
opacity: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants