Skip to main content

Module transform

Module transform 

Source
Expand description

Minimal column-major 4x4 matrix helpers for building 3D model transforms.

Column-major matches WGSL’s mat4x4<f32>: each inner [f32; 4] is a column, and the shader applies a matrix as m * vec4(pos, 1.0).

Functions§

identity
mul
Matrix product a * b (the transform b is applied first, then a).
rotation_x
rotation_y
rotation_z
scale
translation

Type Aliases§

Mat4
Column-major 4x4 matrix.