Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/shader_canvas/core/common/src_readers.ts>readImageDataFromQuery

A rendering engine where you can write WebGL 2.0 shaders using custom tags.
Latest
function readImageDataFromQuery
import { readImageDataFromQuery } from "https://deno.land/x/shader_canvas@v1.1.1/core/common/src_readers.ts";

This function tries to read the image from an element specified by the src query string.

It returns a promise that resolves with the image data if the element is any of the supported image data inputs.

If the element is an HTMLImageElement it resolves after it is loaded or completed, otherwise the element is returned as is (WebGL2 supports these elements as image data sources).

Parameters

src: string