Skip to content

textmode.js / Textmodifier / image

Method: image()

ts
image(
   source, 
   width?, 
   height?): void;

Draw a framebuffer, image, video, or texture source to the currently bound framebuffer.

Parameters

ParameterTypeDescription
source| TextmodeFramebuffer | TextmodeImage | TextmodeTexture | TextmodeVideoSource to render.
width?numberWidth in grid cells. Defaults to an aspect-ratio-preserving fit.
height?numberHeight in grid cells. Defaults to an aspect-ratio-preserving fit.

Returns

void

Example