UNPKG

xgpu

Version:

XGPU is an extendable library for WebGPU that provides a higher-level, easy-to-use interface for building rendering engines or processing numeric data. It handles automatic data binding, buffer alignment, variable declarations in shaders, and more. XGPU i

15 lines (14 loc) 465 B
import { VertexAttribute } from "../VertexAttribute"; export class IVec2Buffer extends VertexAttribute { constructor(datas, offset) { if (datas != undefined && offset === undefined) { if (typeof datas === "number") { offset = datas; datas = undefined; } } super("", "sint32x2", offset); if (typeof (datas) != "number") this.datas = datas; } }