AvatarPreviewOptions
Defined in: client/api.d.ts:7116
What an AvatarPreview shows and where. Every field but anchor is optional; update() merges a partial object.
Properties
Section titled “Properties”anchor
Section titled “anchor”anchor: {
rect: {h:number;visible?:boolean;w:number;x:number;y:number; };view:number; } | {screen: {h:number;w:number;x:number;y:number; }; }
Defined in: client/api.d.ts:7125
The rect to frame into, in CSS pixels: relative to a Web view (what the page’s getBoundingClientRect() reports; amp-hole.js sends it) or to the screen. visible: false hides the figure and keeps it ready.
backdrop?
Section titled “backdrop?”
optionalbackdrop?:"none"| {color?:string|number[];gradient?:string|number[] |null;match?:boolean; }
Defined in: client/api.d.ts:7140
An unlit slab behind the figure sized to the rect. ‘#rrggbb’ (sRGB) or [r, g, b] (linear); gradient blends top to bottom. Without match the color is the slab’s emissive, so the view’s exposure, tone curve and grading move it. match: true makes the colors what the slab’s pixels must be: it measures the screen and corrects the slab until a CSS color beside it matches, at any rect size, place or hour (SDR only; state().match reports progress). Default { color: ‘#16181e’, match: false }.
backend?
Section titled “backend?”
optionalbackend?:"auto"|"world"|"texture"
Defined in: client/api.d.ts:7145
“world” is the camera-locked slab and the only one built; “texture” falls back to it and says so in status.
camera?
Section titled “camera?”
optionalcamera?:object
Defined in: client/api.d.ts:7130
framing: how much of the figure fills the rect’s height (default full). yaw: degrees added to facing you (default -15). fov and pitch are texture-backend settings the world backend ignores.
optionalfov?:number
framing?
Section titled “framing?”
optionalframing?:"full"|"head"|"body"
pitch?
Section titled “pitch?”
optionalpitch?:number
optionalyaw?:number
light?
Section titled “light?”
optionallight?:object
Defined in: client/api.d.ts:7135
The private studio rig; “none” or scale 0 hands the figure back to world light. “fieldguide” is not built yet and uses “studio”.
optionalrig?:"none"|"studio"|"fieldguide"
scale?
Section titled “scale?”
optionalscale?:number
quality?
Section titled “quality?”
optionalquality?:object
Defined in: client/api.d.ts:7150
Texture backend only; ignored.
optionalfps?:number
scale?
Section titled “scale?”
optionalscale?:number
subject?
Section titled “subject?”
optionalsubject?:"self"
Defined in: client/api.d.ts:7120
Whose figure. Only your own look for now.
world?
Section titled “world?”
optionalworld?:object
Defined in: client/api.d.ts:7155
World-backend knobs. scale: actor scale (default 0.6; smaller sits nearer the camera, so less of the world gets in front). depth: cm from the figure to the slab (40). margin: px the slab runs past the rect (8). isolate: drop fog and ambient light from the whole view and fix its exposure, honoured only while the rect covers 75% of the screen.
depth?
Section titled “depth?”
optionaldepth?:number
isolate?
Section titled “isolate?”
optionalisolate?:boolean
margin?
Section titled “margin?”
optionalmargin?:number
scale?
Section titled “scale?”
optionalscale?:number