Skip to content
API reference

react

Import
import * as api from "@fungi.computer/sprite/react";
Kind Export Description
type alias SpriteProps Avatar presentation plus ordinary attributes for the DOM host.
constant Sprite Own one player; source and appearance changes do not remount its React host.
function SpriteProvider() Shell-owned renderer and asset configuration; no selected identity lives here.

SpritePropstype alias

Section titled “SpriteProps”
Signature
type SpriteProps = AvatarPresentation &
Omit<HTMLAttributes<HTMLDivElement>, "children"> &
object;

Avatar presentation plus ordinary attributes for the DOM host.

Name Type Description
service? SpriteService Optional for standalone use; a shell normally supplies SpriteProvider.
paused? boolean -
onState()? (state) => void Observe loading, ready, error, and disposal changes.

Spriteconstant

Section titled “Sprite”
Signature
const Sprite: ForwardRefExoticComponent<
AvatarPresentation &
Omit<HTMLAttributes<HTMLDivElement>, "children"> &
object &
RefAttributes<HTMLDivElement>
>;

Own one player; source and appearance changes do not remount its React host.

SpriteProvider()function

Section titled “SpriteProvider()”
Signature
function SpriteProvider(__namedParameters): Element;

Shell-owned renderer and asset configuration; no selected identity lives here.

Parameter Type
__namedParameters { service: SpriteService; children: ReactNode; }
__namedParameters.service SpriteService
__namedParameters.children ReactNode

Element