Skip to content

Math

The snaptrude.core.math namespace provides fundamental mathematical classes used for 3D geometry and transformations.

Classes

  • Vector3: Represents a vector in 3D space. Used for positions, directions, and scaling.
  • Matrix: Represents a 4x4 matrix. Used for transformations (translation, rotation, scaling).
typescript
import snaptrude from "snaptrude";

const position = new snaptrude.core.math.Vector3(10, 0, 5);