<!--
{
  "availability" : [
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabletopKit",
  "identifier" : "/documentation/TabletopKit/DieState",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "TabletopKit"
    ],
    "preciseIdentifier" : "s:11TabletopKit8DieStateV"
  },
  "title" : "DieState"
}
-->

# DieState

A state for dice that contains the current value.

```
struct DieState
```

## Topics

### Creating a die state

[`init(value: Int, parentID: EquipmentIdentifier, seatControl: ControllingSeats, pose: TableVisualState.Pose2D, boundingBox: Rect3D)`](/documentation/TabletopKit/DieState/init(value:parentID:seatControl:pose:boundingBox:))

Creates the state of a die using the specified current value, location, and player interactions.

[`init(value: Int, parentID: EquipmentIdentifier, seatControl: ControllingSeats, pose: TableVisualState.Pose2D, entity: Entity)`](/documentation/TabletopKit/DieState/init(value:parentID:seatControl:pose:entity:))

Creates a die state with the given die value, parent, controlling seats, pose, and associated entity providing the bounding box.

### Getting the die data

[`var value: Int`](/documentation/TabletopKit/DieState/value)

The numerical value that appears on the top face of the die.

### Getting the parent equipment

[`var parentID: EquipmentIdentifier`](/documentation/TabletopKit/DieState/parentID)

The identifier for the parent equipment that holds or contains this equipment.

### Rendering the equipment

[`var boundingBox: Rect3D`](/documentation/TabletopKit/DieState/boundingBox)

A 3D bounding box that encloses the die.

[`var pose: TableVisualState.Pose2D`](/documentation/TabletopKit/DieState/pose)

The 2D position and rotation of the equipment relative to the equipment parent, or table.

### Controlling the equipment

[`var lockedBy: PlayerIdentifier?`](/documentation/TabletopKit/DieState/lockedBy)

The identifier for the player who exclusively controls the equipment.

[`var seatControl: ControllingSeats`](/documentation/TabletopKit/DieState/seatControl)

The seats that can manipulate or interact with the equipment.

## Relationships

### Conforms To

[`Escapable`](/documentation/Swift/Escapable)

[`Equatable`](/documentation/Swift/Equatable)

[`MutableEquipmentState`](/documentation/TabletopKit/MutableEquipmentState)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Copyable`](/documentation/Swift/Copyable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`EquipmentState`](/documentation/TabletopKit/EquipmentState)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)