Part ​Contract 2.0.0 · package sha256
a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e· generated fromconfigurator-runtime.d.tsbyservices/onsite-scripter/scripts/build-contract-docs.mjs; edit the source, not this file.
Interface · import type { Part } from '@holostep-configurators/runtime-client/contract'; · stable · since 2.0.0 · section 6. Queries, rules and parts
One part of a loaded model or a collection. Reads are sync; each names its read class.
| Member | Kind | Summary |
|---|---|---|
id |
property | Authored: extras.holostep.id, else the cleaned node name (a primitive part's: its cleaned mesh name, see Query); for collection items, the item key (the item's root part is addressed … |
name |
property | Authored: the glTF node name (a primitive part's: its glTF mesh's name), or the item's name. |
kind |
property | Authored: what the part is. |
source |
property | Authored: whether it comes from a loaded model or a collection. |
node |
property | The ModelNode nodeId, for model parts. |
collection |
property | The collection's name, for collection parts. |
key |
property | The item key, for collection parts: the item's root part and every part below it carry it. |
role |
property | The role of its collection; 'product' for model parts, which cast and don't receive shadows until a rule says otherwise (PartState.shadows). |
tags |
property | Authored or creation-time tags. |
slot |
property | Authored: the material slot of a mesh; null for other kinds. |
meta |
property | Creation-time labels (collection items); empty for model parts. |
parent |
property | The parent part; null at the top of a model or a collection. |
children |
property | The child parts, in document order. |
exists |
property | False while the part is not loaded or once it is removed or disposed. |
visible |
property | Intent read. |
pose |
property | Local pose. |
worldPose |
property | Derived: computed on read from the parent chain, animated parts at their observed pose, preparing writes at their intent. |
restPose |
property | Authored: the pose as loaded, before rules and clips. |
material |
property | The material worn now (meshes). |
Inherited from PartActions: set, bounds, find, follow.
export interface Part<C extends object = NoCommitOptions> extends PartActions<C> {
readonly id: string;
readonly name: string;
readonly kind: 'group' | 'mesh' | 'joint' | 'light' | 'lines' | 'label' | 'other';
readonly source: 'model' | 'collection' | 'other';
readonly node: string | null;
readonly collection: string | null;
readonly key: string | null;
readonly role: Role | 'other';
readonly tags: readonly string[];
readonly slot: string | null;
readonly meta: Readonly<Record<string, JsonPrimitive>>;
readonly parent: Part<C> | null;
readonly children: readonly Part<C>[];
readonly exists: boolean;
readonly visible: boolean;
readonly pose: Pose;
readonly worldPose: Pose;
readonly restPose: Pose;
readonly material: Material<C> | null;
}
| Rule | Result |
|---|---|
| 1. Neutral name | pass: Part names no product |
| 2. A precedent | pass: DOM Document.getElementById (row G31) |
| 3. Two apps, or labs | pass: 28 apps (ledger: app-04c2774145, app-b362a81c85, app-c1384707fc, app-f9a32142f1, app-fc306ec3dc; fleet cross-check: app-04c2774145, app-0c773a4ee3, app-37356bf09f, app-378d190f1b, app-4762caacdc, app-4f16d2f6da, app-4fd23bc869, app-510d750508 and 20 more) |
| 4. The cheaper fix first | decided per need in Appendix B: rows G31 at tier stable (a member only where no rule, data, asset or app code serves the need) |