Materials.create ​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.
Method of Materials · stable · since 2.0.0 · called as session.materials.create
create(spec: MaterialSpec, options?: {
signal?: AbortSignal;
}): Material<C>;
Lifecycle call: immediate. Owned by the session; disposed when signal aborts, at once when it
already has (pass collection.signal to dispose it with a collection). Wear it through a rule
(find(q).set({ material })).
Errors: throws HoloInputError on an invalid spec.
Default: options.signal undefined
Through Session:
| Option | Type | Default | What it does |
|---|---|---|---|
signal |
AbortSignal |
— |
Through Tx:
| Option | Type | Default | What it does |
|---|---|---|---|
signal |
AbortSignal |
— |
signal) ​This call is a creator (SignalOption.signal, the kinds of call).
A creator (
collectionfor a new name,materials.create,on,onFrame,beforeCommit,follow,input.drag,labs.lightLinking) given a signal already aborted returns at once, already ended: aCollectionorMaterialreadingdisposed: truethat holds no content and no live name, or a registration that never runs and whose disposer does nothing.It records no Problem for the abort and throws only what it would throw anyway, as the DOM's
addEventListenerwith an aborted signal adds nothing (spec section 6.5).
| Rule | Result |
|---|---|
| 1. Neutral name | pass: create names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | not recorded: no ledger row names this member or its owner |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |