@lightningjs/renderer
    Preparing search index...

    Interface CoreShaderType<Props>

    CoreShaderType is a template for ShaderTypes the renderer. You could view a ShaderType as a configuration object that contains methods, and values that you can use to alter the way a node is drawn by the Renderer.

    interface CoreShaderType<Props extends object = any> {
        getCacheMarkers?: (props: Props) => string;
        props?: ShaderProps<Props>;
        time?: boolean | ((stage: Stage) => number);
    }

    Type Parameters

    • Props extends object = any
    Index

    Properties

    getCacheMarkers?: (props: Props) => string

    used for making a cache key to check for reusability, currently only used for webgl ShaderTypes but might be needed for other types of renderer

    Values you use to draw the Shader

    time?: boolean | ((stage: Stage) => number)

    timer that updates every loop, by default uses the stage elapsed time If you want to do a special calculation you can define a function. When you calculate your own value you can use the Stage timing values deltaTime, lastFrameTime, and currentFrameTime;