A sleek, elegant, and fully customizable loading animation inspired by the classic Super Breakout game.
Features • Quick Start • Versions • Customization • API • Examples
- Features
- Quick Start
- Repository Structure
- Versions
- Customization
- API Documentation
- Examples
- Animation Settings
- Browser Support
- Contributing
- License
- Acknowledgments
- 🎯 ASCII Brick Art - Text displayed as breakable bricks using underscore characters
- 🤖 Intelligent Paddle AI - Automatically tracks and predicts ball landing position
- ⚡ Smooth 60fps Animation - Powered by
requestAnimationFrame - 🎨 Clean Minimal Design - Elegant color scheme (#f3f3eb background, #0d0d19 elements)
- 📱 Responsive - Works on any screen size
- 🪶 Lightweight - No dependencies, pure HTML/CSS/JavaScript
- ✨ Particle Effects - Sparkles on brick breaks and paddle hits
- 🎮 Manual Control Mode - Take control by clicking paddle 3 times
- 📲 Touch Support - Full mobile device compatibility
- 🏃 Dynamic Speed - Ball speed varies on different collisions
- 🔄 Auto-Reset - Bricks respawn when ball is lost
- 🔤 Custom Text - Replace "LOADING" with any text
- 🛠️ JavaScript API - Programmatic text-to-brick conversion
- 🌐 Web Converter - Interactive tool for generating brick patterns
- ⚙️ Configurable - Adjust pixel width, spacing, colors, and more
-
Download the HTML file you want to use:
- Basic Version - Lightweight, simple
- Advanced Version - Full-featured
-
Include it in your project:
<iframe src="path/to/breakout-loading-basic.html" width="823" height="230" frameborder="0"></iframe>- Copy the contents of your chosen HTML file
- Paste into your project
- Customize the
BRICK_ARTarray with your text
git clone https://github.com/melancholic-ksm/Super-Breakout-Loading-Animation..git
cd Super-Breakout-Loading-Animation.Super-Breakout-Loading-Animation/
├── src/ # Animation source files
│ ├── breakout-loading-basic.html # Basic version (lightweight)
│ └── breakout-loading-advanced.html # Advanced version (full-featured)
│
├── api/ # Customization API
│ ├── brick-art-converter.js # JavaScript API module
│ └── text-to-brick-converter.html # Web-based converter tool
│
├── docs/ # Documentation
│ └── API.md # Detailed API reference
│
├── examples/ # Usage examples
│ └── custom-text-example.html # Interactive text example
│
├── assets/ # Images and resources
│ └── loading-preview.png # Preview image
│
├── Loading.html # Original basic version
├── Loadingv2.html # Original advanced version
├── README.md # This file
├── CHANGELOG.md # Version history
└── LICENSE # MIT License
File: src/breakout-loading-basic.html (or Loading.html)
Features:
- ✅ Core breakout animation
- ✅ Automatic paddle AI
- ✅ Ball physics with bouncing
- ✅ Anti-stuck deflection logic
- ✅ ~14KB file size
Best for: Simple loading screens, minimal resource usage
File: src/breakout-loading-advanced.html (or Loadingv2.html)
Features:
- ✅ All basic features
- ✅ Particle sparkle effects
- ✅ Manual control mode (3 clicks)
- ✅ Touch device support
- ✅ Dynamic speed variation
- ✅ Improved paddle AI
- ✅ Auto brick reset
- ✅ ~32KB file size
Best for: Interactive loading screens, enhanced visual appeal
Use the interactive web tool to generate custom brick patterns:
🌐 Live Demo: https://melancholic-ksm.github.io/super-breakout-loading-animation./api/
- Open the Text-to-Brick Converter in your browser
- Enter your custom text (e.g., "HELLO WORLD")
- Click Render to preview
- Click Copy JS Array to copy the generated code
- Replace the
BRICK_ARTarray in your animation file
Supported Characters:
- Letters:
A-Z(case insensitive) - Numbers:
0-9 - Symbols:
! @ # $ % ^ & * ( ) _ - + = { } [ ] : ; " ' < , > . ? /
Use the JavaScript API for dynamic text conversion:
🔗 API URL: https://melancholic-ksm.github.io/super-breakout-loading-animation./api/brick-art-converter.js
// Import from the live API
import { BrickArtConverter } from 'https://melancholic-ksm.github.io/super-breakout-loading-animation./api/brick-art-converter.js';
// Create converter
const converter = new BrickArtConverter();
// Convert text to brick art
const brickArt = converter.convert('MY TEXT');
// Or get as JavaScript array literal
const jsArray = converter.toJsArray('MY TEXT');
console.log(jsArray);Quick Functions:
import { quickConvert, quickConvertToJs } from 'https://melancholic-ksm.github.io/super-breakout-loading-animation./api/brick-art-converter.js';
// One-liner conversion
const art = quickConvert('HELLO');
const jsCode = quickConvertToJs('HELLO');- Open your chosen animation file
- Locate the
BRICK_ARTarray:
const BRICK_ART = [
`__ ______ ______ ________ ______ __ __ ________`,
`__ __ __ __ __ __ __ __ ____ __ __ `,
// ... more rows
];- Replace with your custom pattern using:
__for filled brick pixels(two spaces) for empty pixels
The main class for converting text to brick art patterns.
const converter = new BrickArtConverter(options);| Option | Type | Default | Description |
|---|---|---|---|
pixelWidth |
Number | 2 |
Characters per "pixel" |
charSpacing |
Number | 2.5 |
Spaces between letters |
targetRows |
Number | 12 |
Number of output rows |
fillChar |
String | '_' |
Character for filled pixels |
emptyChar |
String | ' ' |
Character for empty pixels |
| Method | Parameters | Returns | Description |
|---|---|---|---|
convert(text) |
string |
string[] |
Convert text to brick art array |
toJsArray(text, useBackticks?) |
string, boolean |
string |
Convert to JS array literal |
render(text) |
string |
string |
Render as multi-line string |
addGlyph(char, bitmap) |
string, string[] |
this |
Add custom character glyph |
getSupportedCharacters() |
- | string[] |
Get list of supported chars |
isSupported(char) |
string |
boolean |
Check if char is supported |
configure(options) |
object |
this |
Update configuration |
For complete API documentation, see docs/API.md.
<!DOCTYPE html>
<html>
<head>
<title>Loading...</title>
</head>
<body>
<!-- Include the animation directly -->
<iframe src="src/breakout-loading-basic.html"
width="823" height="230"
frameborder="0">
</iframe>
</body>
</html><script type="module">
// Import from the live API
import { BrickArtConverter } from 'https://melancholic-ksm.github.io/super-breakout-loading-animation./api/brick-art-converter.js';
const converter = new BrickArtConverter();
const BRICK_ART = converter.convert('WELCOME');
// Use BRICK_ART in your animation...
</script>See examples/custom-text-example.html for a full interactive example with live text input.
| Property | Basic | Advanced | Description |
|---|---|---|---|
ballRadius |
5 | 5 | Ball radius in pixels |
speed |
4 | 6 | Initial ball speed |
speedEffect |
- | ±0.1 | Speed variation on collision |
| Property | Basic | Advanced | Description |
|---|---|---|---|
paddleWidth |
40 | 40 (86 manual) | Paddle width in pixels |
paddleHeight |
8 | 8 | Paddle height in pixels |
paddleSpeedNormal |
5.6 | 5.6 | Normal paddle speed |
paddleSpeedBoost |
13 | 13+ | Boosted speed when needed |
| Property | Value | Description |
|---|---|---|
brickWidth |
15 | Brick width in pixels |
brickHeight |
4 | Brick height in pixels |
brickPadding |
2 | Space between bricks |
brickOffsetTop |
13 | Top margin |
| Property | Value | Description |
|---|---|---|
width |
823 | Canvas width in pixels |
height |
230 | Canvas height in pixels |
background |
#f3f3eb | Background color |
foreground |
#0d0d19 | Element color |
| Browser | Supported |
|---|---|
| Chrome | ✅ 60+ |
| Firefox | ✅ 55+ |
| Safari | ✅ 11+ |
| Edge | ✅ 79+ |
| IE | ❌ |
| Mobile Safari | ✅ iOS 11+ |
| Chrome Android | ✅ 60+ |
Requirements:
- HTML5 Canvas support
- ES6 JavaScript (for API)
- Modern CSS
Contributions are welcome! Here's how you can help:
- Check existing issues first
- Create a new issue with:
- Browser and version
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Open an issue describing the feature
- Explain the use case
- Discuss implementation approach
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test thoroughly
- Commit with clear messages
- Push to your fork
- Open a Pull Request
- Use consistent indentation (4 spaces)
- Add comments for complex logic
- Follow existing naming conventions
- Test in multiple browsers
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Harsh Maybe
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
- Inspired by the classic Super Breakout arcade game by Atari
- ASCII art rendering techniques
- HTML5 Canvas API
Made with ❤️ for the web