# `PartState`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

Interface · `import type { PartState } from '@holostep-configurators/runtime-client/contract';` · stable · since 2.0.0 · section 6. Queries, rules and parts

What a write through [`find()`](Writer.find.md) (a rule) may change. `null` removes your value and shows what is
underneath. No field here can be matched by a Query (a contract type test enforces it).
On a group part (a model root, a glTF node with children, a collection group) a rule cascades
(spec section 6.10, R8): `visible: false` and `pickable: false` apply to the whole subtree, and a
descendant can't undo them; [`shadows`](PartState.shadows.md) and [`material`](PartState.material.md) are inherited by every mesh below that has
no value of its own from a rule. Parts hung under a part ([`Placement.parent`](Placement.parent.md), an item's `parent`)
are in its subtree for `visible: false` and `pickable: false` whatever its kind: a mesh with a
hung part keeps `kind: 'mesh'`, and its [`shadows`](PartState.shadows.md), [`material`](PartState.material.md) and [`outline`](PartState.outline.md) stay on it. A part hung with [`Placement.parent`](Placement.parent.md) never takes a group parent's [`shadows`](PartState.shadows.md), [`material`](PartState.material.md) or [`outline`](PartState.outline.md) either (R8).

## Members

| Member | Kind | Summary |
| --- | --- | --- |
| <a id="visible"></a>[`visible?`](PartState.visible.md) | property | Shows or hides the parts (look only). |
| <a id="pose"></a>[`pose?`](PartState.pose.md) | property | A pose rule beats the scene model's pose, loses whole to a collection item's own `at` (spec section 6.10, R1), and is never saved. |
| <a id="material"></a>[`material?`](PartState.material.md) | property | A MaterialSpec, however complete, merges field by field (RFC 7396) over what the part wears, and a field set to null (a [`MaterialPatch`](MaterialPatch.md)) removes your value of it in this rule (spec section 6.10, R5); a Material or … |
| <a id="shadows"></a>[`shadows?`](PartState.shadows.md) | property | Shadow casting and receiving. |
| <a id="pickable"></a>[`pickable?`](PartState.pickable.md) | property | false also keeps the part out of camera collision. |
| <a id="outline"></a>[`outline?`](PartState.outline.md) | property | A screen-space outline around the parts, for hover and selection. |

## Declaration

```ts
export interface PartState {
  visible?: boolean | null;
  pose?: PoseInput | null;
  material?: MaterialInput | MaterialPatch | null;
  shadows?: {
    cast?: boolean;
    receive?: boolean;
  } | null;
  pickable?: boolean | null;
  outline?: {
    color: ColorValue;
    widthPx?: number;
  } | null;
}
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `PartState` names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | pass: 19 apps (fleet cross-check: app-04c2774145, app-0c773a4ee3, app-37356bf09f, app-4762caacdc, app-4f16d2f6da, app-59c5b5751e, app-822bb9d6aa, app-8675b3225c and 11 more) |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |
