1# SceneType 2The SceneType module provides common data types in 3D graphics. 3 4> **NOTE** 5> 6> The initial APIs of this module are supported since API version 12. Newly added APIs will be marked with a superscript to indicate their earliest API version. 7 8## Modules to Import 9```ts 10import { Vec2, Vec3, Vec4, Color, Rect, Quaternion, Aabb, Position3, Rotation3, 11 Scale3 } from '@kit.ArkGraphics3D'; 12``` 13 14## Vec2 15A two-dimensional vector used to represent a point or a direction in 2D space. It consists of two components: x and y. 16 17**System capability**: SystemCapability.ArkUi.Graphics3D 18| Name| Type| Read Only| Optional| Description| 19| ---- | ---- | ---- | ---- | ---- | 20| x | number | No| No| Component on the X axis. The value is a real number.| 21| y | number | No| No| Component on the Y axis. The value is a real number.| 22 23## Vec3 24A three-dimensional vector used to represent a point, a direction, or a vector transformation in 3D space. It consists of three components: x, y, and z. 25 26**System capability**: SystemCapability.ArkUi.Graphics3D 27| Name| Type| Read Only| Optional| Description| 28| ---- | ---- | ---- | ---- | ---- | 29| x | number | No| No| Component on the X axis. The value is a real number.| 30| y | number | No| No| Component on the Y axis. The value is a real number.| 31| z | number | No| No| Component on the Z axis. The value is a real number.| 32 33## Vec4 34A four-dimensional vector used to represent a point, a direction, or a vector transformation in 4D space. It consists of four components: x, y, z, and w. The fourth component (w) enhances normalization and convenience for various calculations and transformations. 35 36**System capability**: SystemCapability.ArkUi.Graphics3D 37| Name| Type| Read Only| Optional| Description| 38| ---- | ---- | ---- | ---- | ---- | 39| x | number | No| No| Component on the X axis. The value is a real number.| 40| y | number | No| No| Component on the Y axis. The value is a real number.| 41| z | number | No| No| Component on the Z axis. The value is a real number.| 42| w | number | No| No| Component on the W axis. The value is a real number.| 43 44## Quaternion 45A mathematical notation for representing spatial rotations of elements in 3D space. Compared with Euler angles, a quaternion has advantages in numerical stability and avoiding the gimbal lock problem. 46 47**System capability**: SystemCapability.ArkUi.Graphics3D 48| Name| Type| Read Only| Optional| Description| 49| ---- | ---- | ---- | ---- | ---- | 50| x | number | No| No| Component on the X axis. The value is a real number.| 51| y | number | No| No| Component on the Y axis. The value is a real number.| 52| z | number | No| No| Component on the Z axis. The value is a real number.| 53| w | number | No| No| Component on the W axis. The value is a real number.| 54 55## Aabb 56Axis aligned boundary box used to determine whether two objects in space are overlapping. 57 58**System capability**: SystemCapability.ArkUi.Graphics3D 59| Name| Type| Read Only| Optional| Description| 60| ---- | ---- | ---- | ---- | ---- | 61| aabbMin | [Vec3](#vec3) | No| No| Minimum bounds of the AABB.| 62| aabbMax | [Vec3](#vec3) | No| No| Maximum bounds of the AABB.| 63 64## Color 65Color in RGBA format. It consists of four components: red, green, blue, and alpha. 66 67**System capability**: SystemCapability.ArkUi.Graphics3D 68| Name| Type| Read Only| Optional| Description| 69| ---- | ---- | ---- | ---- | ---- | 70| r | number | No| No| Red component. The value range is [0, 1].| 71| g | number | No| No| Green component. The value range is [0, 1].| 72| b | number | No| No| Blue component. The value range is [0, 1].| 73| a | number | No| No| Alpha component. The value range is [0, 1].| 74 75## Rect 76Rectangle in a plane. 77 78**System capability**: SystemCapability.ArkUi.Graphics3D 79| Name| Type| Read Only| Optional| Description| 80| ---- | ---- | ---- | ---- | ---- | 81| x | number | No| No| X axis component in the lower left corner of the rectangle. The value is a real number.| 82| y | number | No| No| Y axis component in the lower left corner of the rectangle. The value is a real number.| 83| width | number | No| No| Width of the rectangle. The value must be greater than 0.| 84| height | number | No| No| Height of the rectangle. The value must be greater than 0.| 85 86## Position3 87type Position3 = Vec3 88 89Position of an object in 3D space. The value is of the [Vec3](#vec3) type. 90 91**System capability**: SystemCapability.ArkUi.Graphics3D 92 93| Type | Description| 94| ---- | ---- | 95| [Vec3](#vec3) | Any 3D vector.| 96 97## Rotation3 98type Rotation3 = Vec3 99 100Rotation of an object in 3D space. It is of the [Vec3](#vec3) type. 101 102**System capability**: SystemCapability.ArkUi.Graphics3D 103 104| Type | Description| 105| ---- | ---- | 106| [Vec3](#vec3) | Any 3D vector.| 107 108## Scale3 109type Scale3 = Vec3 110 111Scaling of an object in 3D space. The type is [Vec3](#vec3). 112 113**System capability**: SystemCapability.ArkUi.Graphics3D 114 115| Type| Description| 116| ---- | ---- | 117| [Vec3](#vec3) | Any 3D vector.| 118