ThreePipe
    Preparing search index...

    Interface MaterialPreview

    A material preview made by MaterialPreviewPlugin.

    interface MaterialPreview {
        canvas: HTMLCanvasElement;
        material: IMaterial;
        renderTime: number;
        shape: string;
        size: number;
        version: number;
        toDataURL(): string;
    }
    Index
    canvas: HTMLCanvasElement

    Canvas with the preview. The plugin draws the next preview of the same material, shape and size into the same canvas: put the canvas in the page and it updates in place, or copy it (drawImage, toDataURL) in the callback.

    material: IMaterial
    renderTime: number

    Time of the render and read back in ms.

    shape: string
    size: number
    version: number

    The material's change counter when the preview was rendered (counts its materialUpdate events).