# Throwable

![Plugin Banner](https://github.com/qarayahya/throwable/blob/master/.wordpress-org/banner-1544x500.png)

A physics-based WordPress block that lets you throw and bounce content around with realistic physics simulation.

## Features

- **Physics Simulation**: Powered by Matter.js for realistic physics
- **InnerBlocks Support**: Add any content blocks (paragraphs, headings, buttons, images)
- **Customizable Physics**: Adjust gravity and bounce settings
- **Responsive Design**: Works perfectly on all devices
- **Easy to Use**: Simple drag-and-drop interface

## Quick Start

1. **Install the Plugin**
   - Upload to `/wp-content/plugins/throwable/`
   - Or install through WordPress admin → Plugins

2. **Activate the Plugin**
   - Go to Plugins screen in WordPress admin
   - Click "Activate" on the Throwable plugin

3. **Add the Block**
   - Open any page/post in the block editor
   - Search for "Throwable" block
   - Add it to your content

4. **Add Content**
   - Add any blocks inside the Throwable container
   - Paragraphs, headings, buttons, images all work!

5. **Customize Physics**
   - Select the Throwable block
   - Use the sidebar settings to adjust:
     - **Gravity**: Control fall speed (0.1 - 2.0)
     - **Bounce**: Control how much blocks bounce (0 - 1)

## How It Works

The Throwable block creates an interactive physics playground where your content blocks become physical objects that:

- **Fall with gravity** - Content naturally drops down
- **Bounce realistically** - Blocks bounce off each other and walls
- **Collide with each other** - Objects interact physically

## Physics Settings

### Gravity
- **Range**: 0.1 to 2.0
- **Default**: 1.0
- **Effect**: Controls how fast objects fall
- **Lower values**: Slower, more floaty movement
- **Higher values**: Faster, more dramatic falls

### Bounce (Restitution)
- **Range**: 0 to 1
- **Default**: 0.5
- **Effect**: Controls how much objects bounce
- **0**: No bounce (objects stick)
- **1**: Perfect bounce (no energy loss)

## Supported Blocks

The Throwable block works with most common WordPress blocks:

- **Text Blocks**: Paragraphs, headings
- **Media Blocks**: Images
- **Interactive Blocks**: Buttons

## Mobile Support

- Fully responsive design
- Touch-friendly interactions
- Optimized performance on mobile devices
- Physics simulation works smoothly on all screen sizes

## Development

### Technologies Used
- **Matter.js**: Physics simulation engine ([MIT License](https://github.com/liabru/matter-js/blob/master/LICENSE))

## Changelog

### 0.1.0
- Initial release

## Contributing

We welcome contributions! Please feel free to submit issues and pull requests.

## License

This plugin is licensed under the GPL-2.0-or-later license.

## Links

- **Plugin URI**: https://blocklayouts.com/plugins/throwable
- **Contributors**: [qarayahya](https://qarayahya.com/)

---

**Made with ❤️ by [qarayahya](https://qarayahya.com/)**
