UNPKG

gpu-curtains

Version:

gpu-curtains is a 3D WebGPU rendering engine. It can be used as a standalone 3D engine, but also includes extra classes focused on mapping 3d objects to DOM elements; It allows users to synchronize values such as position, sizing, or scale between them.

10 lines (8 loc) 174 B
const getUVCover = ( /* wgsl */ ` fn getUVCover(uv: vec2f, textureMatrix: mat3x3f) -> vec2f { return (textureMatrix * vec3f(uv, 1.0)).xy; }` ); export { getUVCover };