MCPcopy
hub / github.com/donmccurdy/glTF-Transform / createTexture

Function createTexture

packages/view/src/ImageProvider.ts:16–23  ·  view source on GitHub ↗

Generates a Texture from a Data URI, or otherh URL.

(name: string, uri: string)

Source from the content-addressed store, hash-verified

14
15/** Generates a Texture from a Data URI, or otherh URL. */
16function createTexture(name: string, uri: string): Texture {
17 const imageEl = document.createElement('img');
18 imageEl.src = uri;
19 const texture = new Texture(imageEl);
20 texture.name = name;
21 texture.flipY = false;
22 return texture;
23}
24
25// Placeholder images.
26const NULL_IMAGE_URI =

Callers 2

NullImageProviderClass · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected