diepAPI
diepAPI copied to clipboard
An API for https://diep.io
I tried to use this api to get coordinates, but I always get (0,0).
we used the minimap viewport to find out the players fov. Other ways to find players fov: - size of a background tile - whenever a square is seen, use...
since they removed minimap viewport #64, it is not possible to determine the arena size anymore. Should diepAPI transition from canvas based to memory based api?
So needless to say, EventTarget is pretty damn slow. I wrote an identical interface to yours in `event_emitter.ts`: ```js export class ObjectEventEmitter { #events: Object = {}; /** * *...
I wanna detect barrel of tanks. But I don't know how to do it. is there way to detect barrel of tank?
Other classes could be added via styling or by hooking to `document.createElement()`. This is the safe way to do it.
hello, can you add something that allows to detect the position of a text
```js // entities will be empty here const entities = diepAPI.extensions.entityManager.entities; ``` ```js diepAPI.apis.game.on('frame', () =>{ // entities will not be empty here const entities = diepAPI.extensions.entityManager.entities; }); ```
We are using the variable `_window` instead of `window` to reference the global object. Using this one liner, we make sure that `_window` is referencing the real global object. `const...
**Why?** Useful when you want to detect changes in the entities. ```js entityManager.on('add', (entity) => { // do something... }); // events for removed entities is probably less important entityManager.on('remove',...