26.05.02 Artifact Volumev0.1.27 → v0.1.28
Changed in v0.1.28 (2026-04-02): now artifact volume support volumeBoxLimit in 3 dimention and scaleVolumeMultiplier in 3 dimention
→+11 −5
| v0.1.27 | v0.1.28 | ||
|---|---|---|---|
| 1 | # 26.05.02 Artifact Volume | 1 | # 26.05.02 Artifact Volume |
| 2 | 2 | ||
| 3 | Artifact volume models each artifact as a three-dimensional box. The box then participates in the reconstruction logic, instead of relying on the explicit content of the artifact. For layout modes that use artifact volume, the `scale` member of the `Embedding` object SHOULD be ignored and a new member is introduced to `Artifact`'s `Metadata`: | 3 | Artifact volume models each artifact as a three-dimensional box. The box then participates in the reconstruction logic, instead of relying on the explicit content of the artifact. For layout modes that use artifact volume, the `scale` member of the `Embedding` object SHOULD be ignored and a new member is introduced to `Artifact`'s `Metadata`: |
| 4 | ```ts | 4 | ```ts |
| 5 | interface Metadata { | 5 | interface Metadata { |
| 6 | volume: Volume // OPTIONAL | 6 | volume: Volume // RECOMMENDED |
| 7 | // ... | 7 | // ... |
| 8 | } | 8 | } |
| 9 | ``` | 9 | ``` |
| 10 | where | 10 | where |
| 11 | - `volume` is OPTIONAL, and its value MUST be of type `Volume`. If it is not provided but is needed for the reconstruction logic, the default value MUST be used. | 11 | - `volume` is RECOMMENDED, and its value MUST be of type `Volume`. If it is not provided but is needed for the reconstruction logic, the default value MUST be used. |
| 12 | 12 | ||
| 13 | The `Volume` type object is used to represent the dimensions of the artifact for the reconstruction logic, such as the stacking logic. The `Volume` type is defined as | 13 | The `Volume` type object is used to represent the dimensions of the artifact for the reconstruction logic, such as the stacking logic. The `Volume` type is defined as |
| 14 | ```ts | 14 | ```ts |
| 25 | 25 | ||
| 26 | The default value for `volume` is `1` for each member of the `Volume` type. | 26 | The default value for `volume` is `1` for each member of the `Volume` type. |
| 27 | 27 | ||
| 28 | Implementations SHOULD proportionally scale down oversized artifacts to fit within their volume box, or their volume box multiplied by a factor. The Layout Mode module introduces a new member in `FormProperties`: | 28 | Implementations SHOULD proportionally scale down oversized artifacts to fit within their volume box, or their volume box multiplied by a factor. The Layout Mode module introduces two new members in `FormProperties`: |
| 29 | ```ts | 29 | ```ts |
| 30 | interface FormProperties { | 30 | interface FormProperties { |
| 31 | scaleVolumeMultiplier: number // OPTIONAL | 31 | volumeBoxLimit: [boolean, boolean, boolean] // OPTIONAL |
| 32 | scaleVolumeMultiplier: [number, number, number] // OPTIONAL | ||
| 32 | // ... | 33 | // ... |
| 33 | } | 34 | } |
| 34 | ``` | 35 | ``` |
| 35 | where | 36 | where |
| 36 | - `scaleVolumeMultiplier` is OPTIONAL and its value MUST be of type `number`. It represents the tolerance for oversized artifacts and the target size of the scale-down, i.e., `volume` $\times$ `scaleVolumeMultiplier`. If it is not provided, the default value `1` MAY be used, or implementations MAY use their own default value and SHOULD state the default value they use. | 37 | - `volumeBoxLimit` is OPTIONAL and its value MUST be an array of 3 `boolean` values, corresponding to which directions the volume box limit is imposed on, where the three `boolean` values represent whether the limit is imposed on `width`, `length`, and `height`, in that order. If it is not provided, the default value `[true, true, true]` MAY be used, or implementations MAY use their own default value and SHOULD state the default value they use.[^1] |
| 38 | - `scaleVolumeMultiplier` is OPTIONAL and its value MUST be an array of 3 `number` values. It represents the tolerance for oversized artifacts and the target size of the scale-down on `width`, `length`, and `height`, in that order. On each direction, the artifact SHOULD be scaled down to its `volume` on that direction multiplied by the corresponding element in `scaleVolumeMultiplier`. If the corresponding value in `volumeBoxLimit` is `false` for that direction, then the corresponding value in `scaleVolumeMultiplier` MUST be ignored. If it is not provided, the default value `[1, 1, 1]` MAY be used, or implementations MAY use their own default value and SHOULD state the default value they use.[^2] | ||
| 39 | |||
| 40 | [^1]: In the reference implementation Exterior Space, the default value `[true, true, false]` is used for `volumeBoxLimit` to allow oversizing in height. | ||
| 41 | |||
| 42 | [^2]: In the reference implementation Exterior Space, the default value `[1.5, 1.5, 1.5]` is used for `scaleVolumeMultiplier` to allow slightly oversized artifacts. | ||