Skip to content

Commit f99b9fe

Browse files
committed
chore: bump version to 3.3.1
1 parent 95fb0dc commit f99b9fe

5 files changed

Lines changed: 36 additions & 48 deletions

File tree

README.md

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33

44
<p><strong>A powerful JavaScript API for building bots, tools, and automation scripts for diep.io</strong></p>
55

6-
![Version](https://img.shields.io/badge/version-3.3.0-blue.svg)
7-
![License](https://img.shields.io/badge/license-MIT-green.svg)
8-
![GitHub Stars](https://img.shields.io/github/stars/Cazka/diepAPI?style=social)
6+
![Version](https://img.shields.io/badge/version-3.3.1-blue.svg)
7+
![License](https://img.shields.io/badge/license-MIT-green.svg)
8+
![GitHub Stars](https://img.shields.io/github/stars/Cazka/diepAPI?style=social)
9+
910
</div>
1011

1112
---
@@ -15,6 +16,7 @@
1516
**diepAPI** is a comprehensive library that gives you programmatic access to the diep.io game. Build powerful bots and tools with just a few lines of code! Whether you want to create an AFK script, automate shape farming, or build advanced analytics tools, diepAPI makes it easy.
1617

1718
**Key capabilities:**
19+
1820
- 🎮 **Real-time game state** - Access player position, velocity, level, tank type, and more
1921
- 🤖 **Player control** - Move, aim, shoot, and upgrade programmatically
2022
- 👁️ **Entity tracking** - Track all visible players, shapes, and projectiles
@@ -110,6 +112,7 @@ game.on('frame', () => {
110112
```
111113

112114
**How to use:**
115+
113116
1. Copy the code above
114117
2. In Tampermonkey/Violentmonkey, click "Create new script"
115118
3. Paste the code and save
@@ -158,6 +161,7 @@ player.on('tank', (tankType) => console.log('Tank changed:', tankType));
158161
```
159162

160163
Remove event listeners with `.off()`:
164+
161165
```javascript
162166
const handler = () => console.log('Frame');
163167
game.on('frame', handler);
@@ -249,6 +253,7 @@ game.on('frame', () => {
249253
```
250254

251255
**What you'll learn:**
256+
252257
- Basic event handling with keyboard and game events
253258
- Using `player.useGamepad()` to enable API control
254259
- Using `player.moveTo()` to control player position
@@ -318,6 +323,7 @@ game.on('frame', () => {
318323
```
319324

320325
**What you'll learn:**
326+
321327
- Loading and using the `entityManager` extension
322328
- Filtering entities by type to find specific targets
323329
- Using `Vector.distance()` for distance calculations
@@ -333,48 +339,50 @@ game.on('frame', () => {
333339

334340
Quick reference for the main APIs:
335341

336-
| API | Description | Key Properties/Methods |
337-
|-----|-------------|----------------------|
338-
| **game** | Game state and events | `.on(event, handler)`, `.off(event, handler)`, `.isReady` |
339-
| **player** | Player state and control | `.position`, `.velocity`, `.level`, `.tank`, `.isDead`, `.spawn(name)`, `.moveTo(pos)`, `.lookAt(pos)`, `.upgrade_stat(stat, amount)`, `.upgrade_tank(choice)`, `.useGamepad(enabled)` |
340-
| **input** | Keyboard and mouse control | `.keyDown(key)`, `.keyUp(key)`, `.keyPress(key)`, `.mouse(x, y)`, `.mousePress(button)` |
341-
| **arena** | Arena information | `.size` (arena dimensions) |
342-
| **camera** | Camera position tracking | `.position` (current camera position) |
343-
| **scaling** | Coordinate system conversion | `.toArenaPos(canvasPos)`, `.toCanvasPos(arenaPos)`, `.screenToCanvas(screenPos)`, `.canvasToScreen(canvasPos)` |
344-
| **minimap** | Minimap position tracking | `.position` (minimap position) |
345-
| **playerMovement** | Advanced movement tracking | Position/velocity tracking with prediction |
342+
| API | Description | Key Properties/Methods |
343+
| ------------------ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
344+
| **game** | Game state and events | `.on(event, handler)`, `.off(event, handler)`, `.isReady` |
345+
| **player** | Player state and control | `.position`, `.velocity`, `.level`, `.tank`, `.isDead`, `.spawn(name)`, `.moveTo(pos)`, `.lookAt(pos)`, `.upgrade_stat(stat, amount)`, `.upgrade_tank(choice)`, `.useGamepad(enabled)` |
346+
| **input** | Keyboard and mouse control | `.keyDown(key)`, `.keyUp(key)`, `.keyPress(key)`, `.mouse(x, y)`, `.mousePress(button)` |
347+
| **arena** | Arena information | `.size` (arena dimensions) |
348+
| **camera** | Camera position tracking | `.position` (current camera position) |
349+
| **scaling** | Coordinate system conversion | `.toArenaPos(canvasPos)`, `.toCanvasPos(arenaPos)`, `.screenToCanvas(screenPos)`, `.canvasToScreen(canvasPos)` |
350+
| **minimap** | Minimap position tracking | `.position` (minimap position) |
351+
| **playerMovement** | Advanced movement tracking | Position/velocity tracking with prediction |
346352

347353
### Extensions (`diepAPI.extensions`)
348354

349355
Extensions must be loaded with `.load()` before use:
350356

351-
| Extension | Description | Usage |
352-
|-----------|-------------|-------|
357+
| Extension | Description | Usage |
358+
| ----------------- | --------------------------------------------------------- | ----------------------------------------------------------------------- |
353359
| **entityManager** | Track all visible entities (players, shapes, projectiles) | `.load()`, `.entities` (array), `.getPlayer()` (get your player entity) |
354-
| **debugTool** | Visual debugging overlays for development | `.load()`, `.enable()`, `.disable()` |
360+
| **debugTool** | Visual debugging overlays for development | `.load()`, `.enable()`, `.disable()` |
355361

356362
### Tools (`diepAPI.tools`)
357363

358-
| Tool | Description | Usage |
359-
|------|-------------|-------|
360-
| **overlay** | Canvas overlay for drawing custom graphics | `.ctx` (CanvasRenderingContext2D) |
361-
| **backgroundOverlay** | Background layer overlay | `.ctx` (CanvasRenderingContext2D) |
364+
| Tool | Description | Usage |
365+
| --------------------- | ------------------------------------------ | --------------------------------- |
366+
| **overlay** | Canvas overlay for drawing custom graphics | `.ctx` (CanvasRenderingContext2D) |
367+
| **backgroundOverlay** | Background layer overlay | `.ctx` (CanvasRenderingContext2D) |
362368

363369
### Core Utilities (`diepAPI.core`)
364370

365-
| Utility | Description | Key Methods |
366-
|---------|-------------|-------------|
371+
| Utility | Description | Key Methods |
372+
| ---------- | ---------------------- | ---------------------------------------------------------------------------------- |
367373
| **Vector** | Vector math operations | `.add()`, `.subtract()`, `.scale()`, `.distance()`, `.magnitude()`, `.normalize()` |
368374

369375
### Event Reference
370376

371377
**Game Events:**
378+
372379
- `ready` - Fired when diepAPI is ready to use
373380
- `frame` - Fired every game frame
374381
- `frame_start` - Fired at the start of each frame
375382
- `frame_end` - Fired at the end of each frame
376383

377384
**Player Events:**
385+
378386
- `spawn` - Fired when the player spawns
379387
- `dead` - Fired when the player dies
380388
- `level` - Fired when the player levels up (callback receives level number)

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "diepapi",
3-
"version": "3.3.0",
3+
"version": "3.3.1",
44
"description": "An API for https://diep.io",
55
"author": "Cazka",
66
"directories": {

template.user.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

webpack.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module.exports = {
4343
if (_window.diepAPI) return;
4444
4545
`,
46-
footer: '\n\n _window.diepAPI = diepAPI;\n})();'
47-
})
48-
]
46+
footer: '\n\n _window.diepAPI = diepAPI;\n})();',
47+
}),
48+
],
4949
};

0 commit comments

Comments
 (0)