API reference
portable
Import
Section titled “Import”import * as api from "@fungi.computer/sprite-zdog/portable";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| function | toCharacter() | Compile trusted scene-authoring code into a document that contains no code. |
toCharacter()function
Section titled “toCharacter()”function toCharacter(definition): object;Compile trusted scene-authoring code into a document that contains no code.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
definition |
SpriteDefinition |
Returns
Section titled “Returns”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 |