author
Type Aliases
Section titled “Type Aliases”SceneNode
Section titled “SceneNode”SceneNode =
object
An opaque node in a renderer-neutral Sprite scene.
Properties
Section titled “Properties”[sceneNodeBrand]
Section titled “[sceneNodeBrand]”
readonly[sceneNodeBrand]:true
Nominal marker that keeps renderer details out of the author surface.
Point =
object
A point in Sprite scene space.
Properties
Section titled “Properties”
readonlyx:number
Horizontal scene coordinate.
readonlyy:number
Vertical scene coordinate.
readonlyoptionalz?:number
Optional depth coordinate.
BezierStep
Section titled “BezierStep”BezierStep =
object
One cubic Bezier path segment.
Properties
Section titled “Properties”bezier
Section titled “bezier”Two control points followed by the segment endpoint.
PathStep
Section titled “PathStep”PathStep =
Point|BezierStep
One renderer-neutral shape path segment.
Transform
Section titled “Transform”Transform =
object
Optional translation, rotation, or scale coordinates.
Properties
Section titled “Properties”
readonlyoptionalx?:number
Optional horizontal component.
readonlyoptionaly?:number
Optional vertical component.
readonlyoptionalz?:number
Optional depth component.
SceneNodeOptions
Section titled “SceneNodeOptions”SceneNodeOptions =
object
Shared renderer-neutral options for one scene node.
Properties
Section titled “Properties”
readonlyoptionalname?:string
Definition-local name used by authored references.
parent?
Section titled “parent?”
readonlyoptionalparent?:SceneNode
Parent node in the same definition.
readonlyoptionalx?:number
Horizontal translation that takes precedence over translate.x.
readonlyoptionaly?:number
Vertical translation that takes precedence over translate.y.
readonlyoptionalz?:number
Depth translation that takes precedence over translate.z.
translate?
Section titled “translate?”
readonlyoptionaltranslate?:Transform
Translation components not supplied by the direct coordinates.
rotate?
Section titled “rotate?”
readonlyoptionalrotate?:Transform
Rotation around each scene axis, in radians.
scale?
Section titled “scale?”
readonlyoptionalscale?:Transform
Scale applied along each scene axis.
visible?
Section titled “visible?”
readonlyoptionalvisible?:boolean
Whether the node participates in rendering.
color?
Section titled “color?”
readonlyoptionalcolor?:string
Literal paint or an opaque reference returned by color.
stroke?
Section titled “stroke?”
readonlyoptionalstroke?:number|false
A false stroke keeps a solid primitive edge-free, as in Zdog fills.
readonlyoptionalfill?:boolean
backface?
Section titled “backface?”
readonlyoptionalbackface?:string
Optional rear/forward surface palette slots for 3D solids.
frontFace?
Section titled “frontFace?”
readonlyoptionalfrontFace?:string
Paint used for a primitive’s front face when supported.
updateSort?
Section titled “updateSort?”
readonlyoptionalupdateSort?:boolean
Whether supported primitives update child depth ordering.
PathOptions
Section titled “PathOptions”PathOptions =
object&SceneNodeOptions
Renderer-neutral options for a freeform shape.
Type Declaration
Section titled “Type Declaration”
readonlyoptionalpath?: readonlyPathStep[]
Ordered points and cubic Bezier segments in the path.
closed?
Section titled “closed?”
readonlyoptionalclosed?:boolean
Whether the renderer closes the path.
EllipseOptions
Section titled “EllipseOptions”EllipseOptions =
object&SceneNodeOptions
Renderer-neutral options for an ellipse.
Type Declaration
Section titled “Type Declaration”
readonlywidth:number
Horizontal diameter.
height
Section titled “height”
readonlyheight:number
Vertical diameter.
HemisphereOptions
Section titled “HemisphereOptions”HemisphereOptions =
object&SceneNodeOptions
Renderer-neutral options for a hemisphere.
Type Declaration
Section titled “Type Declaration”diameter
Section titled “diameter”
readonlydiameter:number
Diameter of the hemisphere’s base.
CylinderOptions
Section titled “CylinderOptions”CylinderOptions =
object&SceneNodeOptions
Renderer-neutral options for a cylinder.
Type Declaration
Section titled “Type Declaration”diameter
Section titled “diameter”
readonlydiameter:number
Diameter of the cylinder’s circular faces.
length
Section titled “length”
readonlylength:number
Distance between the cylinder’s faces.
SceneBuilder
Section titled “SceneBuilder”SceneBuilder =
object
The complete renderer-neutral scene authoring surface.
Methods
Section titled “Methods”group()
Section titled “group()”group(
options?):SceneNode
Create a grouping node.
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”path()
Section titled “path()”path(
options):SceneNode
Create a freeform path node.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”ellipse()
Section titled “ellipse()”ellipse(
options):SceneNode
Create an ellipse node.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”hemisphere()
Section titled “hemisphere()”hemisphere(
options):SceneNode
Create a hemisphere node.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”cylinder()
Section titled “cylinder()”cylinder(
options):SceneNode
Create a cylinder node.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”MotionSpec
Section titled “MotionSpec”MotionSpec =
object
A named motion applied while presenting a Sprite.
Properties
Section titled “Properties”target
Section titled “target”
readonlytarget:string
Name of the scene node targeted by the motion.
translate?
Section titled “translate?”
readonlyoptionaltranslate?:Transform
Authored translation change.
rotate?
Section titled “rotate?”
readonlyoptionalrotate?:Transform
Authored rotation change.
durationMs?
Section titled “durationMs?”
readonlyoptionaldurationMs?:number
Duration of one motion pass in milliseconds.
repeat?
Section titled “repeat?”
readonlyoptionalrepeat?:"none"|"loop"|"yoyo"
Repetition mode for the motion.
StandardActivity
Section titled “StandardActivity”StandardActivity =
"idle"|"listening"|"processing"|"speaking"|"thinking"|"error"
The standard presentation activity names accepted by every Sprite.
StateGeometry
Section titled “StateGeometry”StateGeometry =
object
Variant selections applied to one expression or activity.
Properties
Section titled “Properties”expression?
Section titled “expression?”
readonlyoptionalexpression?:string
Expression selected by an activity.
readonlyoptionaleyes?:string
Value selected from the eyes variant channel.
mouth?
Section titled “mouth?”
readonlyoptionalmouth?:string
Value selected from the mouth variant channel.
blush?
Section titled “blush?”
readonlyoptionalblush?:number
Normalized blush intensity.
MouthCycleStep
Section titled “MouthCycleStep”MouthCycleStep =
object
One timed mouth state in a speaking cycle.
Properties
Section titled “Properties”durationMs
Section titled “durationMs”
readonlydurationMs:number
Time spent in this mouth state, in milliseconds.
readonlymouth:"base"|"open"
Mouth state shown during the step.
ActivitySpec
Section titled “ActivitySpec”ActivitySpec =
object
Presentation behavior associated with an activity.
Properties
Section titled “Properties”motion?
Section titled “motion?”
readonlyoptionalmotion?:MotionSpec
Optional motion authored for the activity.
geometry?
Section titled “geometry?”
readonlyoptionalgeometry?:StateGeometry
Optional geometry selections authored for the activity.
mouseInfluence?
Section titled “mouseInfluence?”
readonlyoptionalmouseInfluence?:number
Authored pointer-influence strength.
mouthCycle?
Section titled “mouthCycle?”
readonlyoptionalmouthCycle?: readonlyMouthCycleStep[]
Ordered timed mouth states for the activity.
ExpressionSpec
Section titled “ExpressionSpec”ExpressionSpec =
object
Variant and motion behavior associated with an expression.
Properties
Section titled “Properties”variants?
Section titled “variants?”
readonlyoptionalvariants?:Record<string,string>>
Fixed value selected for each variant channel.
variantChoices?
Section titled “variantChoices?”
readonlyoptionalvariantChoices?:Record<string, readonlystring[]>
Candidate values authored for each variant channel.
blush?
Section titled “blush?”
readonlyoptionalblush?:number
Normalized blush intensity.
motion?
Section titled “motion?”
readonlyoptionalmotion?:MotionSpec
Optional motion authored for the expression.
BuildResult
Section titled “BuildResult”BuildResult =
object
The root and named variants produced by one author build.
Properties
Section titled “Properties”
readonlyroot:SceneNode
Root node of the rendered scene tree.
variants?
Section titled “variants?”
readonlyoptionalvariants?:Record<string,Record<string,SceneNode>>>>
Definition-local nodes grouped by variant channel and value.
AuthorContext
Section titled “AuthorContext”AuthorContext =
object
Renderer-neutral capabilities available while authoring a Sprite.
Properties
Section titled “Properties”
readonlyscene:SceneBuilder
Scene builder valid only for the duration of build.
readonlycolor: (name) =>string
Create an opaque reference to an own palette slot.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
SpriteDefinitionInput
Section titled “SpriteDefinitionInput”SpriteDefinitionInput =
object
Input accepted by the Sprite authoring seam.
Properties
Section titled “Properties”apiVersion
Section titled “apiVersion”
readonlyapiVersion:1
Version of the authoring contract used by this definition.
readonlyname:string
Human-readable Sprite definition name.
palette
Section titled “palette”
readonlypalette:Record<string,string>>
Named default paints available to the author callback.
readonlybuild: (context) =>BuildResult
Construct the renderer-neutral scene and its named variants.
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”expressions
Section titled “expressions”
readonlyexpressions:Record<string,ExpressionSpec>>
Named expression specifications; at least one is required.
activities?
Section titled “activities?”
readonlyoptionalactivities?:Record<string,ActivitySpec>>
Optional custom activity specifications.
defaultPresentation?
Section titled “defaultPresentation?”
readonlyoptionaldefaultPresentation?:object
Initial activity and expression selected when mounted.
activity?
Section titled “activity?”
readonlyoptionalactivity?:string
Standard or custom activity selected initially.
expression?
Section titled “expression?”
readonlyoptionalexpression?:string
Declared expression selected initially.
SpriteDefinition
Section titled “SpriteDefinition”SpriteDefinition<
Input> > =Readonly<Input>>
An authored Sprite definition preserving the author’s input shape.
Type Parameters
Section titled “Type Parameters”Input extends SpriteDefinitionInput =
SpriteDefinitionInput
SpriteCheckResult
Section titled “SpriteCheckResult”SpriteCheckResult =
object
A compact receipt describing one already-authored Sprite definition.
Properties
Section titled “Properties”
readonlyvalid:true
Whether the definition has completed author-time validation.
readonlyname:string
Human-readable name of the checked definition.
nodeCount
Section titled “nodeCount”
readonlynodeCount:number
Number of scene nodes reachable from the definition root.
expressions
Section titled “expressions”
readonlyexpressions: readonlystring[]
Expression names in author insertion order.
activities
Section titled “activities”
readonlyactivities: readonlystring[]
Standard activities followed by unique custom activities in author order.
variants
Section titled “variants”
readonlyvariants:Readonly<Record<string, readonlystring[]>>
Variant values by channel, preserving author insertion order.
Variables
Section titled “Variables”STANDARD_ACTIVITIES
Section titled “STANDARD_ACTIVITIES”
constSTANDARD_ACTIVITIES: readonly ["idle","listening","processing","speaking","thinking","error"]
The standard presentation activities every Sprite understands.
Functions
Section titled “Functions”defineSprite()
Section titled “defineSprite()”defineSprite<
Input>>(input):SpriteDefinition<Input>>
Validate and freeze one renderer-neutral Sprite definition.
Type Parameters
Section titled “Type Parameters”Input extends SpriteDefinitionInput
Parameters
Section titled “Parameters”Input
Returns
Section titled “Returns”SpriteDefinition<Input>
check()
Section titled “check()”check(
definition):SpriteCheckResult
Return a compact, machine-readable receipt for an already authored definition.
Parameters
Section titled “Parameters”definition
Section titled “definition”Returns
Section titled “Returns”References
Section titled “References”toCharacter
Section titled “toCharacter”Re-exports toCharacter