Skip to content
API reference

portable

Import
import * as api from "@fungi.computer/sprite-zdog/portable";
Kind Export Description
function toCharacter() Compile trusted scene-authoring code into a document that contains no code.

toCharacter()function

Section titled “toCharacter()”
Signature
function toCharacter(definition): object;

Compile trusted scene-authoring code into a document that contains no code.

Parameter Type
definition SpriteDefinition

object

Name Type
version 1
name string
renderer string
controls z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"number">; label: z.ZodString; default: z.ZodNumber; min: z.ZodNumber; max: z.ZodNumber; step: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"choice">; label: z.ZodString; default: z.ZodString; options: z.ZodArray<z.ZodObject<{ value: z.ZodString; label: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"color">; label: z.ZodString; default: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"boolean">; label: z.ZodString; default: z.ZodBoolean; }, z.core.$strict>], "type">>>
poster? string
data JSONType