---
name: "Animation.scale3d"
mode: "api"
versionRequirements:
  - { name: "Base Library", version: "2.21.8" }
title: "Animation.scale3d - 3D 缩放"
---

## Animation.scale3d

> [VERSION] Base Library >= 2.21.8

### Description

3D scaling

### Parameters

`Params`

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

### Return Value

Type: `Animation`

Animation instance

### Examples

#### 3D scaling

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