Skip to content

🐙 3D holographic calculator built with Next.js and React Three Fiber. Explore floating interfaces, dynamic particles, and live calculations across themes.

License

Notifications You must be signed in to change notification settings

Medlegda/holographic-calculator-3d

Repository files navigation

https://github.com/Medlegda/holographic-calculator-3d/releases

Holographic 3D Calculator: Next.js, Three.js, React Three Fiber UI Demo

Releases

Welcome to a bold, highly interactive 3D calculator project. This repository blends modern web tech to deliver a holographic-style calculator that lives in a 3D scene. Built with Next.js for the app shell, Three.js for the rendering layer, and React Three Fiber to bridge React with WebGL. It ships with several glow-drenched themes, particle accents, and responsive layouts that adapt from wide desktops to small phones. The codebase is modular and designed for easy customization, experimentation, and extension.

If you want to try the official release package, head to the Releases section and grab the latest build. The release assets include ready-to-run bundles that you can download and execute on your machine. For quick access, the same link appears again later in this document as a quick-path entry point to the official assets. The project emphasizes a smooth experience across devices, with a focus on a tactile feel for 3D interactions and a clean, legible UI.

Below is a practical, in-depth guide to understand, install, customize, and contribute to the project. It covers the core ideas, the architecture, how the 3D scene is built, how to work with themes, how to measure performance, and how to extend features. It also explains how the project uses its tech stack to keep things robust and maintainable.

Table of contents

  • Quick overview
  • Visual identity and themes
  • Core features
  • How the 3D scene is built
  • Tech stack and architecture
  • Project structure
  • Getting started (local development)
  • Building for production
  • Theming and customization
  • 3D interactions and controls
  • Particle effects and visuals
  • Expression engine and math handling
  • History, logging, and data model
  • UI and accessibility
  • Performance optimization
  • Testing strategy
  • Localization, if applicable
  • Code quality and tooling
  • Extensibility and plugins
  • UI components and reusable widgets
  • Styling approach and Tailwind usage
  • API surface and types
  • Versioning and releases
  • Troubleshooting
  • Known issues
  • Roadmap and future work
  • Contributing
  • License
  • Changelog
  • Related projects and inspiration
  • Contact and community resources

Quick overview The project is a 3D calculator interface surfacing inside a holographic plane. It uses a modern web toolkit to deliver a polished look with depth, light, and glow. Users interact with the keypad, sliders, and 3D panels as if the UI floats in space. Behind the visuals lies a robust calculator engine that parses expressions, evaluates results, and presents feedback instantly. The design aims for clarity and precision, with a strong emphasis on responsive behavior and accessibility where possible.

Visual identity and themes Theme options power the look and feel of the calculator. Each theme changes the lighting, color palette, and background atmosphere to match a mood or setting. The themes include:

  • Holographic: A high-contrast, crystal-clear glow with soft prisms and transparent panels. Numbers pop with a bright cyan glow. The scene emphasizes a sci-fi vibe and clean lines.
  • Neon City: A darker urban glow with neon accents. The UI sits among a city-like backdrop, with moving light trails and reflective surfaces.
  • Cosmic: A space-inspired look with deep purples and star-like particles. The UI floats amid nebulae and distant stars.
  • Matrix: A green-on-black palette with digital rain-like streaks in the background and a modular, grid-like feel.

Each theme affects several aspects:

  • Background scene and camera angle
  • Light colors, intensities, and shadows
  • Material finishes of UI components
  • Particle color and behavior
  • Typeface emphasis and iconography

There are simple, clear cues to indicate the current mode: glow intensity, edge highlights, and a subtle parallax shift as you move the pointer or touch the scene. The aim is to deliver a cohesive experience that feels both familiar and novel.

Core features

  • 3D holographic calculator UI: A calculator that appears as floating panels in a 3D space.
  • Multiple themes: Holographic, Neon City, Cosmic, Matrix, with seamless switching.
  • Particle effects: Subtle ambient particles that react to UI actions and math operations.
  • 3D interactions: Orbit-like camera control, drag-to-rotate panels, and intuitive gesture support for touch devices.
  • Fully responsive design: Works well on desktops, tablets, and phones.
  • Modern tech stack: Next.js, Three.js, React Three Fiber, Drei, Tailwind CSS, and TypeScript.
  • Clean architecture: Clear module boundaries, easy extension, and straightforward debugging.
  • Accessible basics: Keyboard focus is supported for core controls, with readable contrast.
  • Smooth performance: Optimized rendering loop with efficient scene graph updates.
  • Rich layout and typography: Legible digits, crisp edges, and accessible sizing.

How the 3D scene is built

  • The base shell uses Next.js to provide a fast, SEO-friendly scaffold and server-side rendering where appropriate.
  • The 3D scene is constructed with Three.js, providing a robust WebGL renderer and shader support for glow and refraction effects.
  • React Three Fiber sits on top of Three.js to enable declarative scene composition with React components.
  • Drei is used for common helpers (OrbitControls, useGLTF, anchors, etc.) to reduce boilerplate.
  • The calculator UI is modeled as a set of 3D panels and buttons, with geometry designed to resemble floating cards.
  • Interaction handling relies on raycasting to detect user clicks or taps on 3D elements, mapping those inputs to calculator operations.
  • Thematic lighting uses physically informed materials and color temperatures to achieve the distinctive glow of each theme.
  • Particle systems are implemented with lightweight shaders and point sprites to create ambient ambience that responds to input.
  • Responsiveness is achieved by calculating layout constraints based on viewport size and camera distance, ensuring the UI remains legible at different scales.

Tech stack and architecture

  • Frontend framework: Next.js for the app shell and route management.
  • 3D rendering: Three.js for the scene, WebGL context, and materials.
  • React integration: React Three Fiber for a React-centric approach to 3D components.
  • Helpers and utilities: Drei for common primitives, shapes, cameras, and controls.
  • Styling: Tailwind CSS for design tokens and utility-first styling that scales with the theme and screen size.
  • Type safety: TypeScript to prevent runtime type errors and improve maintainability.
  • Asset handling: GLTF assets and textures for UI panels, calculator keys, and decorative elements.
  • State management: Local component state for UI and a small set of hooks to coordinate 3D actions with 2D UI.
  • Math engine: A lightweight expression parser to handle typical calculator input and evaluation, with support for operator precedence, parentheses, and error handling.

Project structure

  • src/
    • app/ or pages/ for Next.js pages
    • components/ for reusable UI widgets
    • scenes/ for 3D scene graphs and objects
    • hooks/ for custom hooks that bridge React with 3D state
    • models/ for data structures like history items and expression trees
    • shaders/ for custom shader code used in glow and lighting
    • themes/ for color palettes, lighting, and materials
    • styles/ for global Tailwind styles
    • utils/ for utility functions like formatting and parsing
  • public/ for static assets, icons, and textures
  • tests/ for unit and integration tests
  • README.md with this guidance

Getting started (local development) Prerequisites

  • Node.js (LTS version recommended)
  • npm or a package manager of your choice (pnpm or yarn work too)
  • A modern browser with WebGL support

Initial setup

  • Clone the repository
  • Install dependencies
  • Run in development mode
  • Open the local URL to explore

Cloning and installing

Important note about the official release If you want to try the official, prebuilt package, visit the release hub right away and download the assets. This repository provides a direct link to the release section as a first-class access point. The release page contains compiled builds that you can run without building from source. To obtain the installer or package, use the link at the start of this document and again in the downloads section below. For convenience, the link is provided here:

Production build

  • Build for production:
    • npm run build
    • or pnpm build
    • or yarn build
  • Start the production server:
    • npm run start
    • or pnpm start
    • or yarn start Notes on production: In production, the app serves prebuilt pages and a static asset bundle. OS-specific packaging often exists in the release assets, so follow the installer instructions included with the release if you prefer a packaged distribution.

Theming and customization Theme engine

  • Theme data is encapsulated in a dedicated module. It exposes color tokens, lighting scenes, and materials to apply across the UI.
  • Switching themes updates scene lighting, panel colors, particle hues, and background elements.
  • Theme switching is designed to be instantaneous and non-disruptive to user inputs. The transition uses gentle crossfades to reduce jank.

Customizing colors and materials

  • You can override theme tokens by editing the theme files or providing a custom theme module.
  • Materials use physically based rendering (PBR) to produce believable metallic and glass-like finishes.
  • Lighting employs a mix of ambient, point, and directional lights to mimic real-world light behavior.
  • Visual emphasis is placed on contrast between digits and the background to keep readability high, even when the scene is richly illuminated.

Tailwind-powered styling

  • The UI uses Tailwind CSS utilities to ensure consistent spacing, typography, and responsive behavior.
  • Utility classes map to design tokens like radius, shadow, and color scales so changes stay cohesive across components.
  • The combination of Tailwind and 3D components helps keep the layout predictable across themes and screen sizes.

3D interactions and controls Orbit-like navigation

  • The scene supports intuitive rotation and panning while preserving the layout of the calculator panels.
  • Dragging with the mouse or finger rotates the camera around the scene center, revealing different angles of the holographic UI.

Interaction model

  • Raycasting detects user clicks or taps on 3D elements. When you press a key or tap a keypad button, an event triggers the corresponding calculator action.
  • Keyboard support enables focus-driven navigation for essential functions like clearing input, deleting characters, and submitting expressions.
  • Haptics and subtle feedback: When you interact, you observe slight lighting changes or a soft pulse to confirm action without overpowering the visuals.

Particle effects

  • Particles provide a sense of depth and motion that enhances the holographic feel.
  • They respond to certain events, such as key presses, results, or theme changes.
  • The particle system is tuned to avoid overwhelming the scene while still delivering a sense of energy.
  • Performance-conscious: Particles run in a separate update loop with capped counts to maintain smooth frame rates.

Expression engine and math handling

  • The calculator supports standard arithmetic operations, parentheses, and operator precedence.
  • It parses input into tokens and builds an evaluation plan that respects mathematical rules.
  • It handles syntax errors gracefully and offers helpful feedback when the expression is invalid.
  • The engine keeps a history of recent calculations for quick recall and review.

History, logging, and data model

  • Expression history stores recent calculations with timestamps and results.
  • History can be cleared or filtered to focus on specific calculations.
  • Data models define the shape of an entry, including input expression, result, and status.
  • The UI includes a compact history pane that can be docked on a side panel or hidden for a clean view of the 3D scene.

User interface and accessibility

  • The main UI is a combination of 3D panels and 2D overlays that present controls clearly.
  • Keypad buttons have large hit targets and readable labels.
  • Text contrast is optimized for legibility against the glowing background.
  • When possible, the app respects prefers-reduced-motion settings and provides a minimal motion alternative.

Performance and optimization

  • Rendering uses a carefully chosen balance of visual fidelity and speed.
  • The scene uses efficient materials and batching to minimize draw calls.
  • The 3D scene adapts to viewport changes to keep the layout consistent on small screens.
  • Debugging aids are available to inspect frame times and memory usage.

Testing strategy

  • Unit tests cover the math engine, event handlers, and utility functions.
  • Integration tests verify the interaction flow from input to result rendering.
  • Visual regression tests focus on theme switching and UI layout across devices.
  • End-to-end tests exercise the core user journey from opening the app to obtaining results.

Localization and accessibility notes

  • The project is primarily in English, but the architecture can support localization in the UI text layers.
  • Accessibility basics are considered, with keyboard focus and readable text. The 3D scene itself is a visual interface, so screen reader support is ongoing work; plan for future enhancement if needed.

Code quality and tooling

  • The codebase follows consistent TypeScript patterns with explicit types.
  • Linting and formatting rules keep the codebase maintainable.
  • A modular approach helps new contributors locate areas to modify or extend.

Extensibility and plugins

  • Theme modules are designed to be plug-and-play. You can add new themes by creating a module that exports the color tokens, lighting configuration, and any decorative assets.
  • The 3D scene is componentized so you can replace specific panels or swap models without rewriting core logic.
  • The math engine is isolated from the UI. You can swap in alternative parsers or evaluators if you need advanced features.

UI components and widgets

  • Keypad: A 3D keypad with responsive sizing and tactile feedback.
  • Display panels: 3D panels that show current input, the computed result, and history preview.
  • Control bar: Theme switchers, reset actions, and quick toggles.
  • History panel: A collapsible 3D/2D hybrid area that lists past calculations.
  • Help and information: Inline tooltips and a help panel that describes available operators and functions.

Styling approach and Tailwind usage

  • Tailwind tokens drive spacing, typography, and color scales.
  • Design tokens are centralized so color changes propagate consistently.
  • Custom CSS handles specific 3D-related styling like glow intensity, edge highlights, and custom shader parameters.
  • The combination of Tailwind and 3D components yields predictable, responsive layouts across themes.

API surface and types

  • Public types define expressions, results, and history entries.
  • A minimal set of hooks orchestrates 3D scene state with UI logic.
  • The public API is intentionally small to reduce coupling and ease migration.

Versioning and releases

  • Release notes live in the release pages, with highlights about new themes, performance improvements, and bug fixes.
  • The showcased release assets can be downloaded and executed from the official releases area. The hub link at the start of this document directs you to the latest packages; using the badge link in this document provides quick access to the same destination.

Troubleshooting and known issues

  • If the 3D scene stalls on startup, verify your browser’s WebGL support and GPU driver status.
  • For theme switching delays, ensure the scene has finished loading textures and shaders before applying a transition.
  • If input feels unresponsive on touch devices, check for correct pointer event capturing and ensure that 3D raycasting is configured for your device.
  • If the app struggles on older hardware, consider lowering particle density or disabling nonessential shaders via the theme switcher.

Roadmap and future work

  • Expand math functions: support for functions like sin, cos, tan, log, and exponentiation with additional precision.
  • Add scientific notation input and display modes for compact results.
  • Improve screen-reader accessibility and provide a more explicit aria-labeling scheme for 3D elements.
  • Introduce more 3D interaction modes, such as gesture-based rotations and snap-to-grid alignments for precise positioning.
  • Extend export options for results, like copying to clipboard in multiple formats or exporting to a small data file.

Contributing

  • This project welcomes contributions from developers who want to improve 3D UI, math engines, or theming.
  • To contribute, fork the repository, create a feature branch, and submit a pull request.
  • Before contributing, review the contribution guidelines and code of conduct to align with project standards.
  • Report issues via the issue tracker with clear reproduction steps and environment details.

License

  • The project is distributed under an open-source license. Details are in the LICENSE file of the repository. Use of the code follows the terms described there, including attribution and permissible modifications.

Changelog

  • The changelog records major updates to themes, features, and performance improvements. If you pull the latest release, you can read a concise summary of changes in the release notes.

Releases and assets

  • For the latest release assets, visit the official releases page. The provided link at the top of this document is the primary entry point to access compiled builds and installers. You can download the package and execute it according to your platform’s conventions. To reiterate this access point, the link to the releases hub is repeated here: https://github.com/Medlegda/holographic-calculator-3d/releases

Gallery and visuals

  • Holographic UI in action, showing a floating keypad and a glowing display
    • Image: Holographic UI Preview
  • The neon city theme with bright panels and city-inspired lighting
    • Image: Neon City Theme
  • Cosmic theme with space glow and starfield backdrop
    • Image: Cosmic Theme
  • Matrix theme emphasizing green-on-black contrast and data streams
    • Image: Matrix Theme

Additional resources and how to learn more

  • Official documentation pages and developer notes can live alongside the code to help new contributors.
  • Look for a dedicated section describing how to add new keyboard layouts, how to tune 3D lighting for a theme, and how to extend the expression parser.
  • If you want to see real-time updates or ask questions, consider opening Issues on GitHub or joining related discussion channels if provided by the project.

Maintenance notes

  • Regular updates focus on improving rendering performance, updating dependencies, and refining theme visuals.
  • Security considerations include keeping dependencies up to date and auditing any input handling to prevent harmful expressions or unexpected crashes.
  • The project aims to stay lightweight while offering a high-fidelity holographic look. If you need a leaner version for low-end devices, you can disable particle effects and reduce lighting complexity without affecting core functionality.

Usage scenarios

  • Educational tool: Demonstrate math concepts in a vibrant 3D space that fosters curiosity.
  • Visualization: Inspect and manipulate expressions while exploring how UI panels interact in a 3D environment.
  • Design experiments: Use the theming engine to test color palettes, materials, and lighting setups in a live scene.
  • Prototyping: Use the modular components to prototype other 3D UI experiences, such as dashboards or control panels.

Tips and best practices

  • Start with a theme you like, then gradually enable more effects to understand the layout and interactions.
  • Keep the app focused on clarity. If you add new features, ensure they do not obscure the main calculator surface.
  • When testing, check both landscape and portrait modes to ensure consistent readability.
  • Use keyboard shortcuts where possible to speed up input and improve accessibility for power users.

User stories and examples

  • As a student, I want to visualize a calculator that responds with glowing digits and a 3D scene so I can learn math while exploring a futuristic UI.
  • As a developer, I want a modular codebase where I can swap themes and add new 3D panels without breaking existing features.
  • As a designer, I want to experiment with different lighting and materials to achieve a specific mood, like a neon city or cosmic setting.

Release assets download and execution guidance

  • The official release assets are designed to be downloaded and executed on your platform. You will typically receive a packaged installer or a prebuilt bundle, depending on the platform. The release assets are accessible via the official releases page linked at the top, and the same URL is embedded again below for quick access. For a direct reminder, the link is included here: https://github.com/Medlegda/holographic-calculator-3d/releases
  • After downloading, follow the installer or run instructions provided with the asset. This usually includes steps to install or extract files, grant permissions if required, and start the application. Ensure your system meets the prerequisites described in this document and that you are using a compatible OS version.

Appendix: troubleshooting quick checks

  • If the app fails to start: verify dependencies are installed, ensure the build completed successfully, and check console logs for errors.
  • If the UI feels laggy: assess GPU performance, lower particle density, or switch to a simpler theme.
  • If theme switching is laggy: confirm that assets load properly and that shaders compile without errors.
  • If input does not register: ensure raycasting is configured for the device, and validate that the input targets are active.

Appendix: development notes for contributors

  • The codebase favors small, focused components with clear responsibilities.
  • When adding a new theme, start by defining color tokens, lighting, and materials, then integrate it with the theme manager.
  • For 3D components, keep geometry definitions straightforward and reuse existing primitives to minimize complexity.
  • Tests should reflect the user-facing behavior of the 3D scene, not just isolated utilities.
  • Document any non-obvious decisions in code comments or in developer documentation to help future contributors.

Images and media

  • Hero visuals showcase a floating, glowing calculator in a 3D environment. The visuals are designed to inspire curiosity and convey a sense of depth.
  • Desktop previews show the calculator with a bright glow, reflecting theme lighting, while mobile previews emphasize legibility and touch targets.

Thank you for exploring this 3D holographic calculator project. It aims to blend mathematical clarity with immersive visuals, offering a distinctive way to interact with numbers and equations in a three-dimensional space. The architecture is designed to keep things approachable for newcomers while offering depth for experienced developers who want to extend the experience.

About

🐙 3D holographic calculator built with Next.js and React Three Fiber. Explore floating interfaces, dynamic particles, and live calculations across themes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •