Scrawl-canvas API
    Preparing search index...

    Interface RenderInstance

    interface RenderInstance {
        actionPacket: (item: string, override?: CommonObjectInput) => any;
        afterClear?: DefaultInputFunction;
        afterCompile?: DefaultInputFunction;
        afterCreated?: DefaultInputFunction;
        afterShow?: DefaultInputFunction;
        clone: (item?: RenderFactoryInputs) => RenderInstance;
        commence?: DefaultInputFunction;
        error?: DefaultInputFunction;
        get: (item: string) => any;
        halt: () => void;
        importPacket: (
            item: string | string[],
            override?: CommonObjectInput,
        ) => any;
        isRunning: () => boolean;
        kill: (item?: any) => void;
        maxFrameRate?: number;
        name?: string;
        noTarget?: boolean;
        observer?: boolean | CommonObjectInput;
        onHalt?: DefaultInputFunction;
        onKill?: DefaultInputFunction;
        onRun?: DefaultInputFunction;
        order?: number;
        run: () => void;
        saveAsPacket: (item?: boolean | RenderSaveInputs) => string;
        set: (item?: RenderFactoryInputs) => RenderInstance;
        setDelta: (item?: RenderFactoryDeltaInputs) => RenderInstance;
        target?: string | TargetInstance | (string | TargetInstance)[];
        updateHook: (hook: string, func?: DefaultInputFunction) => void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    actionPacket: (item: string, override?: CommonObjectInput) => any
    afterCompile?: DefaultInputFunction
    afterCreated?: DefaultInputFunction
    get: (item: string) => any
    halt: () => void
    importPacket: (item: string | string[], override?: CommonObjectInput) => any
    isRunning: () => boolean
    kill: (item?: any) => void
    maxFrameRate?: number
    name?: string
    noTarget?: boolean
    observer?: boolean | CommonObjectInput
    order?: number
    run: () => void
    saveAsPacket: (item?: boolean | RenderSaveInputs) => string
    target?: string | TargetInstance | (string | TargetInstance)[]

    One or more render targets.

    Accepts a target name, a Canvas/Stack/Cell instance, or an array mixing names and instances. In most day-to-day use this will be a Canvas or Stack.

    If omitted, the render can still run when noTarget is true and the hook functions are being used for orchestration rather than drawing.

    updateHook: (hook: string, func?: DefaultInputFunction) => void

    Replace one of the Render cycle hook functions.

    Type Declaration

      • (hook: string, func?: DefaultInputFunction): void
      • Parameters

        • hook: string

          The hook name to replace; for example commence, afterClear, afterCompile, afterShow, or error.

        • Optionalfunc: DefaultInputFunction

          The function to assign to that hook. Pass undefined to clear a previously assigned hook.

        Returns void