# blue.atroom.room.layout

> Published by [atroom.blue](https://lexicon.garden/identity/did:plc:lb3nbcc4n3s3wzjtcong6nzu)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:lb3nbcc4n3s3wzjtcong6nzu/blue.atroom.room.layout)
- [Documentation](https://lexicon.garden/lexicon/did:plc:lb3nbcc4n3s3wzjtcong6nzu/blue.atroom.room.layout/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:lb3nbcc4n3s3wzjtcong6nzu/blue.atroom.room.layout/examples)

## Definitions

### `blue.atroom.room.layout`

**Type**: `record`

A room layout with placed objects.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `size` | `integer` | Yes | Room size in millimeters (square room). |
| `wall` | `ref` → `#wall` | Yes |  |
| `floor` | `ref` → `#floor` | Yes |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `furnishings` | `array` | Yes |  |

### `blue.atroom.room.layout#wall`

**Type**: `object`

Wall configuration.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `height` | `integer` | Yes | Wall height in millimeters. |
| `surface` | `ref` → `#surface` | Yes |  |
| `thickness` | `integer` | Yes | Wall thickness in millimeters. |

### `blue.atroom.room.layout#color`

**Type**: `object`

RGB color with 8-bit channels.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `red` | `integer` | Yes |  |
| `blue` | `integer` | Yes |  |
| `green` | `integer` | Yes |  |

### `blue.atroom.room.layout#floor`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `surface` | `ref` → `#surface` | Yes |  |

### `blue.atroom.room.layout#surface`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `color` | `ref` → `#color` | Yes |  |
| `texture` | `blob` | No | Texture image. |
| `textureTiling` | `array` | No | Texture tiling [u, v]. |

### `blue.atroom.room.layout#furnishing`

**Type**: `object`

A placed object in the room.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `position` | `array` | Yes | Position [x, y, z] in millimeters. |
| `rotation` | `array` | Yes | Euler rotation [x, y, z] in degrees. |
| `roomObject` | `ref` → `com.atproto.repo.strongRef` | Yes | Strong reference to a blue.atroom.room.object record. |

## Raw Schema

```json
{
  "id": "blue.atroom.room.layout",
  "defs": {
    "main": {
      "key": "any",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "size",
          "floor",
          "wall",
          "furnishings",
          "createdAt"
        ],
        "properties": {
          "size": {
            "type": "integer",
            "maximum": 20000,
            "minimum": 1000,
            "description": "Room size in millimeters (square room)."
          },
          "wall": {
            "ref": "#wall",
            "type": "ref"
          },
          "floor": {
            "ref": "#floor",
            "type": "ref"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "furnishings": {
            "type": "array",
            "items": {
              "ref": "#furnishing",
              "type": "ref"
            },
            "maxLength": 100
          }
        }
      },
      "description": "A room layout with placed objects."
    },
    "wall": {
      "type": "object",
      "required": [
        "height",
        "thickness",
        "surface"
      ],
      "properties": {
        "height": {
          "type": "integer",
          "description": "Wall height in millimeters."
        },
        "surface": {
          "ref": "#surface",
          "type": "ref"
        },
        "thickness": {
          "type": "integer",
          "description": "Wall thickness in millimeters."
        }
      },
      "description": "Wall configuration."
    },
    "color": {
      "type": "object",
      "required": [
        "red",
        "green",
        "blue"
      ],
      "properties": {
        "red": {
          "type": "integer",
          "maximum": 255,
          "minimum": 0
        },
        "blue": {
          "type": "integer",
          "maximum": 255,
          "minimum": 0
        },
        "green": {
          "type": "integer",
          "maximum": 255,
          "minimum": 0
        }
      },
      "description": "RGB color with 8-bit channels."
    },
    "floor": {
      "type": "object",
      "required": [
        "surface"
      ],
      "properties": {
        "surface": {
          "ref": "#surface",
          "type": "ref"
        }
      }
    },
    "surface": {
      "type": "object",
      "required": [
        "color"
      ],
      "properties": {
        "color": {
          "ref": "#color",
          "type": "ref"
        },
        "texture": {
          "type": "blob",
          "accept": [
            "image/png",
            "image/jpeg",
            "image/webp"
          ],
          "maxSize": 1048576,
          "description": "Texture image."
        },
        "textureTiling": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "maxLength": 2,
          "minLength": 2,
          "description": "Texture tiling [u, v]."
        }
      }
    },
    "furnishing": {
      "type": "object",
      "required": [
        "roomObject",
        "position",
        "rotation"
      ],
      "properties": {
        "position": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "maxLength": 3,
          "minLength": 3,
          "description": "Position [x, y, z] in millimeters."
        },
        "rotation": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "maxLength": 3,
          "minLength": 3,
          "description": "Euler rotation [x, y, z] in degrees."
        },
        "roomObject": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref",
          "description": "Strong reference to a blue.atroom.room.object record."
        }
      },
      "description": "A placed object in the room."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
