> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Throttle

> Throttle

# Throttle

Y축 전용 조이스틱의 특수 버전입니다. 드라이빙 게임을 위해 설계되었습니다.

## Properties

`type` - "throttle"

`axisUp` - *string*. 컨트롤의 상단 부분이 매핑되는 트리거입니다. `"leftTrigger"` 또는 `"rightTrigger"`여야 합니다.

`axisDown` - *string*. 컨트롤의 하단 부분이 매핑되는 트리거입니다. `"leftTrigger"` 또는 `"rightTrigger"`여야 합니다.

`relative` - *boolean*, *optional*. 스로틀이 값을 계산하는 방식을 제어합니다. `true`이면 값은 사용자의 초기 터치 위치를 기준으로 합니다. `false`이면 값은 컨트롤의 중심점을 기준으로 합니다. 기본값은 `true`입니다.

`sticky` - *boolean*, *optional*. 사용자가 컨트롤 터치를 중지할 때 발생하는 동작을 제어합니다. `true`이면 스로틀은 마지막 값을 유지합니다. `false`이면 0으로 재설정됩니다. 기본값은 `false`입니다.

`enabled` - *boolean*, *optional*. 기본값은 `true`입니다. 컨트롤의 시각적 상태를 활성/비활성으로 설정합니다. 비활성화된 컨트롤은 플레이어로부터 여전히 입력을 받지만, 입력에 따라 시각적 스타일이 *변경되지는* 않습니다.

`visible` - *boolean*, *optional*. 기본값은 `true`입니다. 플레이어가 상호 작용할 수 있도록 컨트롤을 표시할지 여부를 결정합니다. 게임 플레이 중에 이를 변경하려면 [게임 상태를 사용하여 터치 레이아웃 변경](https://devdocs.xbox.com/ko/build/core-features/common/game-streaming/building-touch-layouts/game-streaming-touch-changing-layouts-game-state.md#change_state)을 참조하세요.

`styles` - *object*, *optional*. 컨트롤의 시각적 표현을 커스터마이즈합니다. 스타일은 스타일을 지정할 수 있는 상태별 오브젝트로 표현됩니다.

스로틀 컨트롤은 다음 상태에 대해 스타일을 지정할 수 있습니다.

* `default` - 기본 스타일입니다.
* `activated` - 플레이어가 노브를 터치하고 있으며 노브가 축 방향으로 정확히 0 값에 있을 때 적용됩니다.
* `activatedDown` - 플레이어가 노브를 터치하고 있으며 스로틀 축의 음수(하단) 섹션에 있도록 노브를 이동한 경우에 적용됩니다.
* `activatedUp` - 플레이어가 노브를 터치하고 있으며 스로틀 축의 양수(상단) 섹션에 있도록 노브를 이동한 경우에 적용됩니다.
* `idle` - 플레이어가 컨트롤과 *상호 작용하지 않고* 노브도 축의 상단 섹션에서 `sticky` 상태가 아닐 때 적용됩니다.
* `idleUp` - 플레이어가 컨트롤과 *상호 작용하지 않으며* 노브가 상단 섹션으로 이동되었고 `sticky`가 `true`로 설정된 경우에 적용됩니다.

**Styling properties per state**

`opacity` - *number*, *optional*. 컨트롤에 적용될 불투명도입니다. `disabled`를 제외한 모든 상태에서 기본값은 1.0입니다.

[`axisUp`](https://devdocs.xbox.com/ko/reference/system/touchadaptationkit/types/game-streaming-touch-throttle-axis) - *object*, *optional*. 스로틀의 양수(상단) 부분에 대한 스타일을 지정하는 [`axis`](https://devdocs.xbox.com/ko/reference/system/touchadaptationkit/types/game-streaming-touch-throttle-axis) 오브젝트입니다.

[`axisDown`](https://devdocs.xbox.com/ko/reference/system/touchadaptationkit/types/game-streaming-touch-throttle-axis) - *object*, *optional*. 스로틀의 음수(하단) 부분에 대한 스타일을 지정하는 [`axis`](https://devdocs.xbox.com/ko/reference/system/touchadaptationkit/types/game-streaming-touch-throttle-axis) 오브젝트입니다.

[`knob`](https://devdocs.xbox.com/ko/reference/system/touchadaptationkit/types/game-streaming-touch-knob) - *object*, *optional*. 스로틀의 노브 부분 스타일을 지정하는 [`knob`](https://devdocs.xbox.com/ko/reference/system/touchadaptationkit/types/game-streaming-touch-knob) 오브젝트입니다.

`indicator` - *object*, *optional*. 노브를 축의 현재 위치에 연결하는 컴포넌트에 적용할 스타일을 지정하는 [stroke](https://devdocs.xbox.com/ko/reference/system/touchadaptationkit/types/game-streaming-touch-stroke)입니다.

**Asset dimensions**

이미지 애셋을 허용하는 각 스타일 오브젝트에 대해, 주어진 애셋은 기본 해상도와 해당 기본 해상도의 1.5x, 2.0x, 3.0x, 4.0x 배율로 제공됩니다. 주어진 이미지의 해상도는 다음 최대 해상도보다 작거나 같아야 합니다.

| Object | @1.0x | @1.5x | @2.0x | @3.0x | @4.0x |
| :- | :- | :- | :- | :- | :- |
| knob.faceImage | 60x60 | 90x90 | 120x120 | 180x180 | 240x240 |
| knob.background | 60x60 | 90x90 | 120x120 | 180x180 | 240x240 |

## Remarks

`throttle` 컨트롤을 사용하면 플레이어가 터치 컨트롤을 통해 트리거의 가변 압력을 제공할 수 있습니다.

`throttle` 컨트롤은 휠의 중앙 위치에 배치되도록 설계되었으며, 그 위치와 화면 측면 사이의 유일한 컨트롤이 되도록 설계되었습니다.

플레이어가 트리거에 일정한 압력을 계속 가하고자 하는 경우, 값을 설정한 후 손가락을 다른 액션에 사용할 수 있도록 `sticky`를 true로 설정합니다.

**Styling remarks**

> [!WARNING]
>
> Windows 버전의 Content Test Application을 통해 스트리밍하는 경우, 모든 스타일이 올바르게 표시되지 않을 수 있습니다.

## Sample

#### Example 1: Basic throttle

**Figure 1. Throttle control**

![스로틀과 상호 작용하는 사용자](https://mintcdn.com/microsoft-4404708b/gzrdvT5kpqAXKEQt/images/gdk/reference/game-streaming-touch-control-images-throttle.gif?s=effd39103fb6dd47dbe5275bdfc07426)

기본 스타일을 사용합니다.

```JSON theme={null}
{
    "type": "throttle",
    "axisUp": "rightTrigger",
    "axisDown": "leftTrigger",
    "sticky": true
}
```

#### Example 2: Throttle with styled outline and explicitly defined icons

**Figure 1. Customized throttle control**

![커스터마이즈된 스로틀과 상호 작용하는 사용자](https://mintcdn.com/microsoft-4404708b/gzrdvT5kpqAXKEQt/images/gdk/reference/game-streaming-touch-control-images-throttle-customized.gif?s=bfccc19c022aed00a4e3e14833ab2202)

```JSON theme={null}
{
    "type": "throttle",
    "axisUp": "rightTrigger",
    "axisDown": "leftTrigger",
    "sticky": true,
    "styles": {
        "default": {
            "knob" : {
                "faceImage" : {
                    "type": "icon",
                    "value": "gasPedal"
                }
            },
            "axisUp": {
                "stroke" : {
                    "type": "solid",
                    "color":  "#107C10"
                },
                "cap" : {
                    "type": "color",
                    "value": "#107C10"
                }
            },
            "axisDown": {
                "stroke" : {
                    "type": "solid",
                    "color":  "#ff0000"
                },
                "cap" : {
                    "type": "color",
                    "value": "#ff0000"
                }
            }
        },
        "idleUp" : {
            "knob" : {
                "stroke" : {
                    "type": "solid",
                    "color":  "#107C10"
                }
            },
            "indicator" : {
                "type": "solid",
                "color":  "#107C10"
            }
        },
        "activatedUp" : {
            "indicator" : {
                "type": "solid",
                "color":  "#107C10"
            }
        },
        "activatedDown": {
            "knob" : {
                "faceImage" : {
                    "type": "icon",
                    "value": "brakePedal"
                }
            },
            "indicator" : {
                "type": "solid",
                "color":  "#ff0000"
            }
        }
    }
}
```

## Requirements

**Layout Version:** 1.0+ (Styling available from layout version 3.2+)


## Related topics

- [Best practices for the RTA service](https://devdocs.xbox.com/services/xbox-services/fundamentals/rta/concepts/live-rta-best-practices.md)
- [Title Storage overview](https://devdocs.xbox.com/services/xbox-services/storage/title-storage/live-title-storage-overview.md)
- [Fine-Grained Rate Limiting](https://devdocs.xbox.com/services/xbox-services/develop/best-practices/live-fine-grained-rate-limiting.md)
- [PlayFab Party 版本資訊](https://devdocs.xbox.com/zh-TW/services/playfab/multiplayer/networking/release-notes.md)
- [PlayFab Party Release Notes](https://devdocs.xbox.com/services/playfab/multiplayer/networking/release-notes.md)
