---
title: "Animate"
description: "Animate"
language: "en"
canonical: "https://l7.antv.antgroup.com/en/api/polygon_layer/animate/"
---

[Resource index](/llms.txt)

The geometry layer is`shape`for`water`or`ocean`When you will get a flowing water surface, at this time we need to use`animate`Method to enable animation.

<div>
  <div style="width:40%;float:left; margin: 16px;">
    <img  width="80%" alt="案例" src='https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*BiawTbtX-CYAAAAAAAAAAAAAARQnAQ'>
  </div>
</div>

### animate(boolean)

`animate`The method supports Boolean and object passing values.

```javascript
layer.animate(true);

layer.animate({
  enable: true,
});
```
