Skip to content

Concepts

The package root exports the Zdog renderer as the default export. To render a served character document whose renderer is zdog, register it with Sprite. This illustrative configuration uses assetPolicy as the host’s configured Sprite asset policy:

const service = createSprite({
assets: assetPolicy,
renderers: {
zdog: () => import("@fungi.computer/sprite-zdog"),
},
});

assetPolicy stands for the host’s configured Sprite asset policy. Admit the document’s origin and set its byte and request limits. A local character does not need remote asset access.

For authoring, defineSprite validates a trusted scene definition, check returns a compact author-time summary, and toCharacter converts the definition into a JSON character document. The resulting document contains data, not executable authoring code. @fungi.computer/sprite-zdog/builtins exports the base, mushroom, cat, and burger characters.