ObjectRenderer

The property writer: Wardic's values written onto a plain object's properties, by their names, as they are (object[key] = value), once a frame, in the frame that computed them. layer is what WardicObject provides; GATE is what its Flush gate reads of an object.

import * as ObjectRenderer from "@wardic/object/ObjectRenderer"

ObjectRenderer.commit(material, { opacity: 0.5 }) // material.opacity === 0.5

Variables

GATE

const GATE: FlushGate.GateEnvironment;

The Flush gate's reads of an object: nothing saved before a write, and a template key no object has.


layer

const layer: Layer.Layer<Renderer.Renderer>;

The property writer as the Environment's Renderer.

Functions

commit()

function commit(target, patch): void;

patch written onto target's properties: each key's value, a key the gate puts back with nothing saved left as it is.

Parameters

target

unknown

patch

Patch

Returns

void


project()

function project(values): Patch;

A plain object's patch: its values as they are, one property each.

Parameters

values

Readonly<Record<string, unknown>>

Returns

Patch