Skip to content

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Examples

Multiplies two matrices together and prints the result.

Renders a triagle and displays it in a window.

As above, but renders directly to a window surface.

On the browser textures can be created very easily using createImageBitmap() and device.queue.copyExternalImageToTexture(). In the dawn Node.js bindings the device.queue.copyExternalImageToTexture() function is unimplemented since there are no standardized image objects. This forces us to use device.queue.writeTexture() to create a texture from data that we have previously decoded. This example presents one of many possible ways to get a buffer of pixels from a file on disk. Here we are using the pngjs package to decode a .png file and show it on the screen.

// TODO: more