author
@fungi.computer/sprite-zdog / author
author
Section titled “author”Interfaces
Section titled “Interfaces”SceneNode
Section titled “SceneNode”An opaque node in a renderer-neutral Sprite scene.
Properties
Section titled “Properties”__sceneNodeBrand
Section titled “__sceneNodeBrand”
readonly__sceneNodeBrand: typeof__sceneNodeBrand
Nominal marker that keeps renderer details out of the author surface.
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”One cubic Bezier path segment.
Properties
Section titled “Properties”bezier
Section titled “bezier”Two control points followed by the segment endpoint.
Transform
Section titled “Transform”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”Shared renderer-neutral options for one scene node.
Extended by
Section titled “Extended by”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.
ShapeOptions
Section titled “ShapeOptions”Renderer-neutral options for a freeform shape.
Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlyoptionalname?:string
Definition-local name used by authored references.
Inherited from
Section titled “Inherited from”parent?
Section titled “parent?”
readonlyoptionalparent?:SceneNode
Parent node in the same definition.
Inherited from
Section titled “Inherited from”
readonlyoptionalx?:number
Horizontal translation that takes precedence over translate.x.
Inherited from
Section titled “Inherited from”
readonlyoptionaly?:number
Vertical translation that takes precedence over translate.y.
Inherited from
Section titled “Inherited from”
readonlyoptionalz?:number
Depth translation that takes precedence over translate.z.
Inherited from
Section titled “Inherited from”translate?
Section titled “translate?”
readonlyoptionaltranslate?:Transform
Translation components not supplied by the direct coordinates.
Inherited from
Section titled “Inherited from”rotate?
Section titled “rotate?”
readonlyoptionalrotate?:Transform
Rotation around each scene axis, in radians.
Inherited from
Section titled “Inherited from”scale?
Section titled “scale?”
readonlyoptionalscale?:Transform
Scale applied along each scene axis.
Inherited from
Section titled “Inherited from”visible?
Section titled “visible?”
readonlyoptionalvisible?:boolean
Whether the node participates in rendering.
Inherited from
Section titled “Inherited from”color?
Section titled “color?”
readonlyoptionalcolor?:string
Literal paint or an opaque reference returned by color.
Inherited from
Section titled “Inherited from”stroke?
Section titled “stroke?”
readonlyoptionalstroke?:number|false
A false stroke keeps a solid primitive edge-free, as in Zdog fills.
Inherited from
Section titled “Inherited from”
readonlyoptionalfill?:boolean
Inherited from
Section titled “Inherited from”backface?
Section titled “backface?”
readonlyoptionalbackface?:string
Optional rear/forward surface palette slots for 3D solids.
Inherited from
Section titled “Inherited from”frontFace?
Section titled “frontFace?”
readonlyoptionalfrontFace?:string
Paint used for a primitive’s front face when supported.
Inherited from
Section titled “Inherited from”updateSort?
Section titled “updateSort?”
readonlyoptionalupdateSort?:boolean
Whether supported primitives update child depth ordering.
Inherited from
Section titled “Inherited from”
readonlyoptionalpath?: readonlyShapePathStep[]
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”Renderer-neutral options for an ellipse.
Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlyoptionalname?:string
Definition-local name used by authored references.
Inherited from
Section titled “Inherited from”parent?
Section titled “parent?”
readonlyoptionalparent?:SceneNode
Parent node in the same definition.
Inherited from
Section titled “Inherited from”
readonlyoptionalx?:number
Horizontal translation that takes precedence over translate.x.
Inherited from
Section titled “Inherited from”
readonlyoptionaly?:number
Vertical translation that takes precedence over translate.y.
Inherited from
Section titled “Inherited from”
readonlyoptionalz?:number
Depth translation that takes precedence over translate.z.
Inherited from
Section titled “Inherited from”translate?
Section titled “translate?”
readonlyoptionaltranslate?:Transform
Translation components not supplied by the direct coordinates.
Inherited from
Section titled “Inherited from”rotate?
Section titled “rotate?”
readonlyoptionalrotate?:Transform
Rotation around each scene axis, in radians.
Inherited from
Section titled “Inherited from”scale?
Section titled “scale?”
readonlyoptionalscale?:Transform
Scale applied along each scene axis.
Inherited from
Section titled “Inherited from”visible?
Section titled “visible?”
readonlyoptionalvisible?:boolean
Whether the node participates in rendering.
Inherited from
Section titled “Inherited from”color?
Section titled “color?”
readonlyoptionalcolor?:string
Literal paint or an opaque reference returned by color.
Inherited from
Section titled “Inherited from”stroke?
Section titled “stroke?”
readonlyoptionalstroke?:number|false
A false stroke keeps a solid primitive edge-free, as in Zdog fills.
Inherited from
Section titled “Inherited from”
readonlyoptionalfill?:boolean
Inherited from
Section titled “Inherited from”backface?
Section titled “backface?”
readonlyoptionalbackface?:string
Optional rear/forward surface palette slots for 3D solids.
Inherited from
Section titled “Inherited from”frontFace?
Section titled “frontFace?”
readonlyoptionalfrontFace?:string
Paint used for a primitive’s front face when supported.
Inherited from
Section titled “Inherited from”updateSort?
Section titled “updateSort?”
readonlyoptionalupdateSort?:boolean
Whether supported primitives update child depth ordering.
Inherited from
Section titled “Inherited from”
readonlywidth:number
Horizontal diameter.
height
Section titled “height”
readonlyheight:number
Vertical diameter.
HemisphereOptions
Section titled “HemisphereOptions”Renderer-neutral options for a hemisphere.
Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlyoptionalname?:string
Definition-local name used by authored references.
Inherited from
Section titled “Inherited from”parent?
Section titled “parent?”
readonlyoptionalparent?:SceneNode
Parent node in the same definition.
Inherited from
Section titled “Inherited from”
readonlyoptionalx?:number
Horizontal translation that takes precedence over translate.x.
Inherited from
Section titled “Inherited from”
readonlyoptionaly?:number
Vertical translation that takes precedence over translate.y.
Inherited from
Section titled “Inherited from”
readonlyoptionalz?:number
Depth translation that takes precedence over translate.z.
Inherited from
Section titled “Inherited from”translate?
Section titled “translate?”
readonlyoptionaltranslate?:Transform
Translation components not supplied by the direct coordinates.
Inherited from
Section titled “Inherited from”rotate?
Section titled “rotate?”
readonlyoptionalrotate?:Transform
Rotation around each scene axis, in radians.
Inherited from
Section titled “Inherited from”scale?
Section titled “scale?”
readonlyoptionalscale?:Transform
Scale applied along each scene axis.
Inherited from
Section titled “Inherited from”visible?
Section titled “visible?”
readonlyoptionalvisible?:boolean
Whether the node participates in rendering.
Inherited from
Section titled “Inherited from”color?
Section titled “color?”
readonlyoptionalcolor?:string
Literal paint or an opaque reference returned by color.
Inherited from
Section titled “Inherited from”stroke?
Section titled “stroke?”
readonlyoptionalstroke?:number|false
A false stroke keeps a solid primitive edge-free, as in Zdog fills.
Inherited from
Section titled “Inherited from”
readonlyoptionalfill?:boolean
Inherited from
Section titled “Inherited from”backface?
Section titled “backface?”
readonlyoptionalbackface?:string
Optional rear/forward surface palette slots for 3D solids.
Inherited from
Section titled “Inherited from”frontFace?
Section titled “frontFace?”
readonlyoptionalfrontFace?:string
Paint used for a primitive’s front face when supported.
Inherited from
Section titled “Inherited from”updateSort?
Section titled “updateSort?”
readonlyoptionalupdateSort?:boolean
Whether supported primitives update child depth ordering.
Inherited from
Section titled “Inherited from”diameter
Section titled “diameter”
readonlydiameter:number
Diameter of the hemisphere’s base.
CylinderOptions
Section titled “CylinderOptions”Renderer-neutral options for a cylinder.
Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlyoptionalname?:string
Definition-local name used by authored references.
Inherited from
Section titled “Inherited from”parent?
Section titled “parent?”
readonlyoptionalparent?:SceneNode
Parent node in the same definition.
Inherited from
Section titled “Inherited from”
readonlyoptionalx?:number
Horizontal translation that takes precedence over translate.x.
Inherited from
Section titled “Inherited from”
readonlyoptionaly?:number
Vertical translation that takes precedence over translate.y.
Inherited from
Section titled “Inherited from”
readonlyoptionalz?:number
Depth translation that takes precedence over translate.z.
Inherited from
Section titled “Inherited from”translate?
Section titled “translate?”
readonlyoptionaltranslate?:Transform
Translation components not supplied by the direct coordinates.
Inherited from
Section titled “Inherited from”rotate?
Section titled “rotate?”
readonlyoptionalrotate?:Transform
Rotation around each scene axis, in radians.
Inherited from
Section titled “Inherited from”scale?
Section titled “scale?”
readonlyoptionalscale?:Transform
Scale applied along each scene axis.
Inherited from
Section titled “Inherited from”visible?
Section titled “visible?”
readonlyoptionalvisible?:boolean
Whether the node participates in rendering.
Inherited from
Section titled “Inherited from”color?
Section titled “color?”
readonlyoptionalcolor?:string
Literal paint or an opaque reference returned by color.
Inherited from
Section titled “Inherited from”stroke?
Section titled “stroke?”
readonlyoptionalstroke?:number|false
A false stroke keeps a solid primitive edge-free, as in Zdog fills.
Inherited from
Section titled “Inherited from”
readonlyoptionalfill?:boolean
Inherited from
Section titled “Inherited from”backface?
Section titled “backface?”
readonlyoptionalbackface?:string
Optional rear/forward surface palette slots for 3D solids.
Inherited from
Section titled “Inherited from”frontFace?
Section titled “frontFace?”
readonlyoptionalfrontFace?:string
Paint used for a primitive’s front face when supported.
Inherited from
Section titled “Inherited from”updateSort?
Section titled “updateSort?”
readonlyoptionalupdateSort?:boolean
Whether supported primitives update child depth ordering.
Inherited from
Section titled “Inherited from”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”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”shape()
Section titled “shape()”shape(
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”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.
StateGeometry
Section titled “StateGeometry”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”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”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”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”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”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”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.
SpriteCheckResult
Section titled “SpriteCheckResult”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.
Type Aliases
Section titled “Type Aliases”ShapePathStep
Section titled “ShapePathStep”ShapePathStep =
Point|BezierStep
One renderer-neutral shape path segment.
StandardActivity
Section titled “StandardActivity”StandardActivity =
"idle"|"listening"|"processing"|"speaking"|"thinking"|"error"
The standard presentation activity names accepted by every Sprite.
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
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