# Anime and Hammer

## Anime

change position smoothly

{% code overflow="wrap" %}

```javascript
anim({
 name:"player1",//obj name
 position:{//write down the destination
     x:5,y:5
 },
 time:1000,//automatically set to 1000(ms) if you do not enter time
 type:"linear"//automatically set to "linear" if you do not enter time
})
```

{% endcode %}

{% embed url="<https://1070416189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAoN3PvLitJVdWdsmwATH%2Fuploads%2F92NcvfhiZZxfgTijVmTL%2Fanime.mp4?alt=media&token=c7d87a58-c528-43f7-b5e3-914e7e2ca5d8>" %}

{% hint style="info" %}
To view more types: <https://codepen.io/kcjpop/pen/GvdQdX>
{% endhint %}

{% hint style="warning" %}
anime.js must be installed
{% endhint %}

### Install anime.js

```javascript
require("https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js")
```

***

## Hammer

records your swiping movements

{% code fullWidth="true" %}

```javascript
starthammercanvas()
hammercanvas = function(location,time){
    console.log(
    location,//is the direction in which it drags possible outputs: RIGHT,LEFT,UP,DOWN
    time//the time it is held down
    )
}
```

{% endcode %}

{% embed url="<https://1070416189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAoN3PvLitJVdWdsmwATH%2Fuploads%2Fe6eV79RO4v1sN8nSS0no%2Fhammer.mp4?alt=media&token=28c91a09-2581-49c0-a8ea-e92b0c9c0b8c>" %}

{% hint style="warning" %}
hammer.js must be installed
{% endhint %}

### Install hammer.js

```javascript
require("https://cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.8/hammer.min.js")
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://electoriaengine.gitbook.io/api/eap/anime-and-hammer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
