splat-transform API Reference - v1.10.2
    Preparing search index...

    Class Transform

    A source-to-engine coordinate transform comprising translation, rotation and uniform scale. Lives alongside a DataTable to describe how raw column data maps to PlayCanvas engine coordinates.

    const t = new Transform().fromEulers(0, 0, 180);
    console.log(t.isIdentity()); // false

    const inv = t.clone().invert();
    console.log(t.mul(inv).isIdentity()); // true
    Index

    Properties

    PLY: Readonly<Transform> = ...

    PLY coordinate convention: 180-degree rotation around Z. Used by PLY, splat, KSplat, SPZ, and legacy SOG formats.

    Methods

    • Tests whether this transform equals another within the given tolerance. Quaternion comparison accounts for double-cover (q and -q represent the same rotation).

      Parameters

      • other: Transform

        The transform to compare against.

      • epsilon: number = 1e-6

        Floating-point tolerance. Defaults to 1e-6.

      Returns boolean

      True if the transforms are equal within the tolerance.

    • Sets this transform to a rotation-only transform from Euler angles in degrees.

      Parameters

      • x: number

        Rotation around X axis in degrees.

      • y: number

        Rotation around Y axis in degrees.

      • z: number

        Rotation around Z axis in degrees.

      Returns Transform

      This transform (for chaining).

    • Fills the provided Mat4 with the TRS matrix for this transform.

      Parameters

      • result: Mat4

        The Mat4 to fill.

      Returns Mat4

      The filled Mat4.

    • Tests whether this transform is effectively identity within the given tolerance.

      Parameters

      • epsilon: number = 1e-6

        Floating-point tolerance. Defaults to 1e-6.

      Returns boolean

      True if identity within the tolerance.

    • Transforms a point by this TRS transform: result = translation + rotation * (scale * point).

      Parameters

      • point: Vec3

        The input point.

      • result: Vec3

        The Vec3 to write the result into (may alias point).

      Returns Vec3

      The transformed point.