Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Book of Answers - The Deity of Decisions

Vị thần của những quyết định / 决定之神

A mystical decision-making web application inspired by "The Book of Answers" that helps users make decisions through cosmic guidance and intuitive interaction.

Description

The Deity of Decisions is an interactive web application that combines mystical aesthetics with modern web technology to create a unique decision-making experience. Users can ask questions and receive guidance through an immersive, multi-language interface featuring Vietnamese, English, and Chinese text.

The application features a beautiful animated background with constellation patterns, floating tarot symbols, mystical orbs, and particle effects that create an otherworldly atmosphere. The core interaction involves pressing and holding a button while focusing on a question, then releasing it when intuition feels right to receive an answer.

Features

Visual & Interactive Elements

  • Mystical Background: Animated constellation patterns with twinkling stars and connecting lines
  • Floating Tarot Symbols: 12 different mystical symbols (☽☾✦✧⚶☆♦♧♠♥✪⚡) with floating animations
  • Mystical Orbs: 5 floating energy orbs with dynamic movement and glow effects
  • Particle System: Rising particles that create a magical atmosphere
  • Text Scrambling Animation: Custom text effect that scrambles characters before revealing answers

Multilingual Support

  • Vietnamese (Primary language)
  • English (Secondary language)
  • Chinese (Tertiary language)

Interactive Experience

  • Hold-to-Release Mechanism: Users hold the "Khai mở" (Open/Reveal) button and release when intuition guides them
  • Real-time Loading Effects: Dynamic text scrambling with mystical loading messages
  • Progressive Text Revelation: Vietnamese text appears first with scramble effect, followed by English and Chinese translations

Browser Extension

  • Chrome extension with side panel integration
  • Portable access through browser toolbar
  • Full-screen iframe implementation

Project Structure

book-of-answers/
├── index.html              # Main web application
├── script.js               # Core JavaScript functionality
├── styles.css              # Mystical styling and animations
├── index.php               # PHP server file (if needed)
├── book-of-answers-ext/    # Chrome Extension
│   ├── manifest.json       # Extension configuration
│   ├── background.js       # Extension background script
│   ├── sidebar.html        # Extension sidebar interface
│   ├── icon16.png          # Extension icon (16px)
│   ├── icon48.png          # Extension icon (48px)
│   └── icon128.png         # Extension icon (128px)
└── README.md               # This file

Technical Implementation

Frontend Technology Stack

  • HTML5: Semantic structure with multilingual content
  • CSS3: Advanced animations, gradients, and visual effects
    • Radial gradients for mystical backgrounds
    • Keyframe animations for floating elements
    • CSS transforms and filters for dynamic effects
    • Responsive design for mobile compatibility
  • Vanilla JavaScript: Core functionality without external dependencies
    • Custom TextScramble class for text effects
    • Event handling for touch and mouse interactions
    • Fetch API for server communication
    • Animation frame management

Key JavaScript Classes & Functions

TextScramble Class

Custom text animation class that creates a typewriter effect with random character scrambling:

  • Uses mystical symbols for scrambling effect
  • Configurable animation duration and randomization
  • Promise-based completion detection

Core Functions

  • handleMouseDown() / handleMouseUp(): Button interaction handlers
  • startScrambleEffect(): Initiates loading animation with rotating mystical messages
  • callAPI(): Fetches answers from remote server
  • showAnswer(): Displays final answer with progressive text revelation

API Integration

  • External API endpoint: https://tunghuynh.net/games/book-of-answers/
  • Returns JSON responses with Vietnamese, English, and Chinese text
  • Error handling with user-friendly fallback messages

Installation & Setup

Web Application

  1. Clone or download the repository
  2. Open index.html in a web browser
  3. Ensure internet connection for API functionality

Chrome Extension

  1. Open Chrome and navigate to chrome://extensions/
  2. Enable "Developer mode" in the top right
  3. Click "Load unpacked" and select the book-of-answers-ext folder
  4. The extension will appear in your browser toolbar
  5. Click the extension icon to open the side panel

Local Server (Optional)

If running a local server:

# For PHP
php -S localhost:8000

# For Python 3
python -m http.server 8000

# For Node.js (with http-server)
npx http-server

Usage Instructions

  1. Focus on your question: Clear your mind and concentrate on the decision you need to make
  2. Press and hold: Click and hold the "Khai mở" (Open/Reveal) button
  3. Feel the energy: Close your eyes and sense the mystical energy building
  4. Release when ready: Let go of the button when your intuition tells you the time is right
  5. Receive guidance: Read the answer revealed in three languages

Browser Compatibility

  • Chrome: Full support (recommended)
  • Firefox: Full support
  • Safari: Full support
  • Edge: Full support
  • Mobile browsers: Responsive design with touch support

Dependencies

  • None: Pure HTML, CSS, and JavaScript implementation
  • External API: Requires internet connection for answer retrieval
  • Font: Uses system fonts (Segoe UI, Tahoma, Geneva, Verdana, sans-serif)

Contributing

This project was created by Tung Huynh in 2025. The application draws inspiration from "The Book of Answers" concept while adding a modern, mystical interface.

License

Inspired by "The Book of Answers" • Tung Huynh 2025

Support

If you enjoy this mystical experience, consider supporting the creator: ☕ Buy me a coffee


"Nothing is random. Everything is destined."
"Không có gì là ngẫu nhiên. Mọi chuyện đều là tất nhiên."
"没有什么是随机的。一切都是命中注定的。"

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages