An interactive 3D visualization of the Qabalistic "Cube of Space" - a geometric model mapping Hebrew letters, Tarot keys, and astrological correspondences onto a three-dimensional cube structure.
Live Demo: https://cube-of-space.vercel.app/
Repository: https://github.com/kmack/cube-of-space
- Features
- Tech Stack
- Prerequisites
- Installation
- Development
- Building for Production
- Project Structure
- Controls
- Contributing
- License & Attribution
- Real-time 3D rendering using React Three Fiber and Three.js
- Interactive camera controls with OrbitControls (rotate, pan, zoom)
- Customizable UI with Leva controls panel for toggling features
- Hebrew Letters: 22 Hebrew letters mapped to geometric elements
- 3 Mother Letters (Aleph, Mem, Shin) → Axes (elemental)
- 7 Double Letters → Faces (planetary)
- 12 Simple Letters → Edges (zodiacal)
- 4 Final Letters → Diagonals
- Tarot Associations: Each letter linked to corresponding Tarot keys
- Astrological Correspondences: Planetary and zodiacal symbols
- Color-coded faces based on Tarot card associations
- Animated energy flows along edges, axes, and diagonals
- Rich labels with Hebrew characters, Tarot names, and astrological symbols
- Double-sided labels for better visibility from all angles
- Responsive design optimized for desktop and mobile devices
- Mouse/Keyboard: Standard 3D navigation controls
- Touch: Full touch gesture support (pinch, pan, rotate) for mobile/tablet
- Gamepad: Complete Xbox-style controller support for navigation and feature toggling
- Double-click/tap: Reset camera to default view
- Mobile-aware rendering: Reduced particle counts and DPI for mobile devices
- Idle detection: Pause animations when user is inactive
- Page visibility API: Stop animations when tab is in background
- Frame rate limiting: Configurable FPS caps for different platforms
- React 19.2 - UI framework
- TypeScript 5.9 - Type-safe development
- Vite 7.1 - Fast build tool and dev server
- Three.js 0.180 - 3D graphics library
- @react-three/fiber 9.3 - React renderer for Three.js
- @react-three/drei 10.7 - Useful helpers for React Three Fiber
- Leva 0.10 - GUI controls for React
- ESLint 9.38 - Linting with Google style guide
- Prettier 3.6 - Code formatting
- TypeScript ESLint 8.46 - TypeScript-aware linting
- Vercel - Hosting and deployment platform
- Node.js: Version 20.x or 22.x (see
enginesinpackage.json) - npm: Latest version (comes with Node.js)
- Git: For version control and contributing
- Modern browser with WebGL support (Chrome, Firefox, Safari, Edge)
- Xbox controller (optional): For gamepad navigation
git clone https://github.com/kmack/cube-of-space.git
cd cube-of-spacenpm installThis will install all required dependencies and apply necessary overrides for React 19 compatibility with Radix UI components.
npm run devThis starts the Vite development server with hot module replacement (HMR). Open http://localhost:5173 in your browser.
| Script | Description |
|---|---|
npm run dev |
Start development server with HMR |
npm run build |
Type check and build for production |
npm run preview |
Preview production build locally |
npm run lint |
Run ESLint to check code quality |
npm run lint:fix |
Auto-fix ESLint issues |
npm run format |
Format code with Prettier |
npm run format:check |
Check code formatting |
npm run typecheck |
Run TypeScript type checking |
npm run deploy |
Deploy to Vercel production |
- Make changes to source files in
src/ - See changes automatically reflected in browser (HMR)
- Run linting before committing:
npm run lint npm run format
- Test build before pushing:
npm run build
npm run buildThis command:
- Runs TypeScript type checking (
tsc --noEmit) - Builds optimized production bundle with Vite
- Outputs to
dist/directory
npm run previewServes the production build locally for testing before deployment.
npm run deployOr connect your repository to Vercel for automatic deployments on push.
cube-of-space/
├── public/ # Static assets
├── src/
│ ├── components/ # React components
│ │ ├── about-modal.tsx # About dialog
│ │ ├── animated-gradient-background.tsx
│ │ ├── axis-energy-flows.tsx # Animated particles on axes
│ │ ├── axis-lines.tsx # Axis geometry
│ │ ├── camera-reset.tsx # Double-click camera reset
│ │ ├── cube-of-space-scene.tsx # Main 3D scene
│ │ ├── diagonal-energy-flows.tsx
│ │ ├── diagonal-labels.tsx
│ │ ├── diagonal-lines.tsx
│ │ ├── edge-energy-flows.tsx
│ │ ├── edge-labels.tsx
│ │ ├── edge-position-labels.tsx
│ │ ├── energy-flow.tsx # Reusable energy flow component
│ │ ├── face-labels.tsx
│ │ ├── face-planes.tsx # Colored cube faces
│ │ ├── gamepad-controls.tsx # Xbox controller integration
│ │ ├── label3d.tsx # 3D text labels
│ │ ├── mother-labels.tsx
│ │ ├── rich-label.tsx # Labels with symbols
│ │ ├── scene-error-boundary.tsx
│ │ ├── standard-rich-label.tsx
│ │ └── wire-cube.tsx # Cube wireframe
│ ├── config/
│ │ └── app-config.ts # Application configuration
│ ├── data/
│ │ ├── axis-energy-flow-config.ts
│ │ ├── constants.ts # Colors, dimensions, paths
│ │ ├── energy-flow-config.ts
│ │ ├── geometry.ts # Cube geometry definitions
│ │ ├── label-spec.ts # Hebrew/Tarot/Astrology mappings
│ │ └── label-styles.ts
│ ├── hooks/
│ │ └── use-gamepad.ts # Gamepad state hook
│ ├── types/
│ │ └── component-props.ts # Shared TypeScript types
│ ├── utils/
│ │ ├── canvas-texture.ts # Canvas-based texture generation
│ │ ├── control-utils.ts # Leva control helpers
│ │ ├── energy-flow-geometry.ts
│ │ ├── geometry-repository.ts
│ │ ├── geometry-validation.ts
│ │ ├── label-factory.ts
│ │ ├── label-positioning.ts
│ │ ├── label-utils.tsx
│ │ ├── mobile-detection.ts
│ │ ├── orientation.ts
│ │ ├── performance-hooks.ts # Idle detection, visibility
│ │ ├── tarot-images.ts
│ │ ├── texture-atlas.ts
│ │ └── types.ts # Core geometry types
│ ├── app.tsx # Root component
│ ├── index.css # Global styles
│ ├── main.tsx # Entry point
│ └── vite-env.d.ts
├── CLAUDE.md # Claude Code AI assistant guidance
├── KNOWN_ISSUES.md # Known bugs and limitations
├── USER_GUIDE.md # User documentation
├── eslint.config.js # ESLint configuration
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── tsconfig.app.json # App-specific TypeScript config
├── tsconfig.node.json # Node-specific TypeScript config
├── vite.config.ts # Vite build configuration
└── vercel.json # Vercel deployment config
src/components/: All React components for 3D scene and UIsrc/data/: Geometric definitions and Qabalistic mappingssrc/utils/: Utility functions and custom hookssrc/config/: Application-wide configuration
| Action | Control |
|---|---|
| Rotate | Left-click + drag |
| Pan | Right-click + drag |
| Zoom | Mouse wheel |
| Reset Camera | Double-click |
| Action | Control |
|---|---|
| Rotate | One-finger drag |
| Zoom | Two-finger pinch |
| Pan | Two-finger drag |
| Reset Camera | Double-tap |
| Control | Function |
|---|---|
| Right Stick | Rotate camera (horizontal/vertical) |
| Left Stick | Pan view in screen space |
| RT (Right Trigger) | Zoom in |
| LT (Left Trigger) | Zoom out |
| A Button | Toggle energy flow |
| B Button | Toggle double-sided labels |
| Y Button | Cycle axis flow direction |
| D-Pad Up | Toggle Mother Letters |
| D-Pad Right | Toggle Double Letters |
| D-Pad Down | Toggle Simple Letters |
| D-Pad Left | Toggle Final Letters |
| LB (Left Bumper) | Toggle face visibility |
| RB (Right Bumper) | Toggle face opacity |
| L3 (Left Stick Press) | Reset pan position |
| R3 (Right Stick Press) | Reset camera view |
For detailed control information, see USER_GUIDE.md.
We welcome contributions! Here's how to get started:
git clone https://github.com/YOUR_USERNAME/cube-of-space.git
cd cube-of-space
npm installgit checkout -b feature/your-feature-name- Follow existing code style (enforced by ESLint/Prettier)
- Add TypeScript types for new code
- Test your changes thoroughly
- Update documentation if needed
# Lint and format
npm run lint
npm run format
# Type check
npm run typecheck
# Build
npm run buildgit add .
git commit -m "Description of your changes"
git push origin feature/your-feature-name- Provide a clear description of changes
- Reference any related issues
- Ensure all CI checks pass
- ESLint: Google style guide with TypeScript/React extensions
- Prettier: 2-space indentation, single quotes, trailing commas
- TypeScript: Strict mode enabled, explicit types preferred
- Imports: Sorted alphabetically with
simple-import-sort - Components: Functional components with hooks
- File naming: kebab-case for files, PascalCase for components
Currently, the project does not have automated tests. Contributions that add test coverage are especially welcome!
This project is licensed under the MIT License - see the LICENSE file for full details.
Summary: You are free to use, modify, distribute, and create derivative works from this code for any purpose, including commercial use, as long as you include the original copyright notice.
Copyright (c) 2025 Kevin Mack
Kevin Mack
- Email: kmack.lvx@proton.me
- GitHub: https://github.com/kmack/cube-of-space
IMPORTANT: The B.O.T.A. Tarot illustrations are NOT covered by the MIT License and remain the property of Builders of the Adytum, Ltd.
Illustrations of Paul Foster Case's B.O.T.A. Tarot Keys are reproduced by kind permission of Builders of the Adytum, Ltd., Los Angeles.
If you fork or redistribute this project, you must either:
- Obtain your own permission from B.O.T.A. to use the Tarot images, OR
- Remove the Tarot images from your distribution
Contact B.O.T.A. for image permissions at:
BUILDERS OF THE ADYTUM, LTD. 5105 N. Figueroa Street Los Angeles, CA 90042 Website: www.bota.org
B.O.T.A. does not in any way endorse the interpretation of the author by granting permission for the use of its materials. Those interested in pursuing the teachings of the B.O.T.A. may write to the address above.
Built with React, TypeScript, Three.js, and React Three Fiber.
- USER_GUIDE.md - Comprehensive user documentation
- CLAUDE.md - AI assistant guidance for development
- KNOWN_ISSUES.md - Known bugs and limitations
If you encounter issues or have questions:
- Check KNOWN_ISSUES.md
- Review USER_GUIDE.md
- Open an issue on GitHub
Explore the sacred geometry and discover the relationships between the Hebrew alphabet, Tarot, astrology, and the structure of space itself.