DriftTexture · function

resize

out[channels][outH][outW] resized from input[channels][inH][inW]. step, without aligned corners, is the source pixels a destination pixel covers, vertically and then horizontally, where it is not the ratio of the sizes.

Explained in DriftTexture.

function resize(out: Float32Array, input: Float32Array, channels: number, inH: number, inW: number, outH: number, outW: number, mode: 'bilinear' | 'bicubic' | 'nearest', alignCorners: boolean, step?: readonly [number, number]): void
import { resize } from '@driftengine/texture';

Parameters

ParameterTypeDescription
outFloat32Array
inputFloat32Array
channelsnumber
inHnumber
inWnumber
outHnumber
outWnumber
mode'bilinear' | 'bicubic' | 'nearest'
alignCornersboolean
step?readonly [number, number]