Skip to content
ParaShape

Layers

ModelJson.layers.

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AddLayerMethod } from "./AddLayerMethod.js";
import type { Argument } from "./Argument.js";
import type { PropertyNode } from "./PropertyNode.js";

/**
 * A `layers[]` entry: a head with no args, identity is `key`, plus
 * `properties` carrying `attributes`/`visible`.
 */
export type LayerNode = { 
/**
 * identity — unique in the document's one key namespace, every lane.
 */
key: string, 
/**
 * intent — editor-chrome display name, printed verbatim; absent falls
 * back to `key` (`RecordView.ts`: "header = label (or key)").
 */
label?: string, 
/**
 * intent — the one closed-literal layers-lane head.
 */
method: AddLayerMethod, 
/**
 * intent — this head takes no args; kept for NODE LAW shape parity.
 */
args?: Array<Argument>, 
/**
 * intent — `attributes`/`visible`.
 */
properties?: Array<PropertyNode>, };
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
 * The one layers-lane head method.
 */
export type AddLayerMethod = "addLayer";
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Argument } from "./Argument.js";

/**
 * One entry of a `properties` list — `{ method, args? }`, OPEN at the shape
 * tier: which methods are legal in which home is a registry check
 * (`crate::validate::registry` for an object's placement properties,
 * `crate::validate::lanes` for a material/layer/pattern's own), never a
 * schema enum.
 */
export type PropertyNode = { 
/**
 * intent — the registry-checked property method.
 */
method: string, 
/**
 * intent — the method's arguments.
 */
args?: Array<Argument>, };
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
 * intent — `properties.visible`: absent/`true` = every view, `false` = none,
 * a list = exactly those view keys, an arrow `(camera) => boolean` = the
 * cameras the function holds for (its source text, run at render resolve time
 * against the session's camera by `Sight::satisfies`, because a component's
 * own `views` are ignored once it is placed and the host's camera is unknown
 * inside it). Empty list refused at evaluate. Render ships it as `All(bool)`
 * against the session's `Sight` (`render::placement_shown`): the active view's
 * pose, else the free camera the host reported; a list holds only in a named
 * view, and with no pose at all nothing holds.
 */
export type PerViewFlag = boolean | Array<string> | string;

Catalog methods

Every engine_catalog node whose context names "layers".

3 catalog method(s) whose context names "layers".

addLayer

Layer · step · returns layer · context: layers

Default key: layer.

A key a row carries, so a view can hide everything carrying it.

No args.

attributes

Attributes · step · returns object · context: properties, materials, layers, patterns

Default key: attributes.

Free-form domain bag.

keytypedefaultminmaxoptionstooltip
valueobject | function{}Free-form JSON object merged onto this placement's attributes; the engine reads nothing out of it.

visible

Visible · step · returns boolean · context: properties, layers

Default key: visible.

true/false, a non-empty list of view keys, or an arrow (camera) => boolean.

keytypedefaultminmaxoptionstooltip
valueobject | functiontruetrue/false, a non-empty array of view keys, or an arrow (camera) => boolean — shown for every camera the function returns true for, the free camera included (see the view type for the record it receives); absent inherits the content's own visibility.
📖 1 min read