---
name: "Animation.scaleZ"
mode: "api"
versionRequirements:
  - { name: "Base Library", version: "2.21.8" }
title: "Animation.scaleZ - 缩放 Z 轴"
---

## Animation.scaleZ

> [VERSION] Base Library >= 2.21.8

### Description

Scale the Z axis

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `scaleZ` | `number` | No | Scale factor on the Z axis |

### Return Value

Type: `Animation`

Animation instance

### Examples

#### Z-axis scaling

```ts
Page({
  data: {
    animationData: {},
  },
  onReady() {
    const animation = ty.createAnimation({ duration: 500 });
    animation.scaleZ(1.5).step();
    this.setData({ animationData: animation.export() });
  },
});
```
